-
Notifications
You must be signed in to change notification settings - Fork 26
Strengthen preconditions on polyveck_add() and polyvecl_add() #724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
mkannwischer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @rod-chapman.
I think the pre-conditions can be simplified unless I am missing something.
Adds explicit bounds constraints on the inputs to these two functions. These significantly reduce the state space of the inputs, and therefore reduce the space that CBMC/Z3 has to search to find a proof. Calling functions (attempt_signature_generataion() and crypto_sign_keypair_internal() ) re-prove OK with these pre-conditions in place. Signed-off-by: Rod Chapman <[email protected]>
Signed-off-by: Rod Chapman <[email protected]>
2e3b6d1 to
833a812
Compare
|
New proof numbers for MLDSA-87 on my Mac, following removal of the redundant preconditions, plus proofs of the 2 calling functions: |
mkannwischer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for not noticing this earlier, but I belive the functional post-condition is no longer needed after #637.
That could further improve proof time.
Maybe the poly_add() contract can be adjusted accordingly (not sure about this part).
|
The post-condition and loop invariant of polyvecl_add() can be weakened as you suggest. The same for polyveck_add() cannot be done, since the stronger post-condition is required to prove crypto_sign_keypair_internal() I will commit and push now. |
Signed-off-by: Rod Chapman <[email protected]>
Adds explicit bounds constraints on the inputs to these two functions. These significantly reduce the state space of the inputs, and therefore reduce the space that CBMC/Z3 has to search to find a proof.
Calling functions (attempt_signature_generataion() and crypto_sign_keypair_internal() ) re-prove OK with
these pre-conditions in place.
Proof times on macOS (before this PR) from main, for each parameter set:
Proof times after this PR: