Conversation
69faa1d to
b0c1344
Compare
CBMC Results (ML-DSA-44)Full Results (175 proofs)
|
CBMC Results (ML-DSA-87)Full Results (175 proofs)
|
CBMC Results (ML-DSA-65)Full Results (175 proofs)
|
be17ae1 to
1b560ad
Compare
mkannwischer
left a comment
There was a problem hiding this comment.
Thanks @jakemas. The pre- and post-conidtions look good to me except for the MAYCHANGE (see comment below).
Can we already add a CBMC proof to not risk forgetting it later?
| MAYCHANGE [ZMM0; ZMM1; ZMM2; ZMM3; ZMM4; ZMM5; ZMM6; ZMM7; ZMM8; ZMM9; ZMM10; ZMM11; ZMM12; ZMM13; ZMM14; ZMM15] ,, | ||
| MAYCHANGE [RAX] ,, MAYCHANGE SOME_FLAGS ,, |
There was a problem hiding this comment.
Shouldn't those be covered by MAYCHANGE_REGS_AND_FLAGS_PERMITTED_BY_ABI? I don't see this stated explicitly for other proofs.
There was a problem hiding this comment.
I've always had to include these in my proofs, here are other examples of this:
- https://github.com/pq-code-package/mlkem-native/blob/main/proofs/hol_light/x86_64/proofs/mlkem_intt.ml#L1057-L1060
- https://github.com/pq-code-package/mlkem-native/blob/main/proofs/hol_light/x86_64/proofs/mlkem_ntt.ml#L1068-L1071
- https://github.com/pq-code-package/mldsa-native/blob/main/proofs/hol_light/x86_64/proofs/mldsa_ntt.ml#L4406-L4408
My understanding is that it is a consequence of this issue: awslabs/s2n-bignum#256
There was a problem hiding this comment.
For the correctness of the function body (without ret) I think it's OK to be more specific as to what's actually being used.
| ==> let zi = | ||
| read(memory :> bytes32(word_add a (word(4 * i)))) s in | ||
| (ival zi == mldsa_inverse_ntt (ival o x) i) (mod &8380417) /\ | ||
| abs(ival zi) <= &8380416)) |
There was a problem hiding this comment.
One could try to prove a much smaller bound here. We know the bound is definitely smaller than 3/4*q in absolute value. Not necessary though, I think.
There was a problem hiding this comment.
Echoing that, it would be good to know for future changes what the actual bound is that comes out of the symbolic execution.
There was a problem hiding this comment.
I completely agree, I can do some follow up investigations as to the bound found within symbolic execution.
There was a problem hiding this comment.
I believe the actual bound that comes out of the symbolic execution is abs(ival zi) <= &4197972 (i.e., ~MLDSA_Q/2). I'm running some tests now to confirm.
| read (memory :> bytes64 stackpointer) s = returnaddress /\ | ||
| C_ARGUMENTS [a; zetas] s /\ | ||
| wordlist_from_memory(zetas,624) s = MAP (iword: int -> 32 word) mldsa_complete_qdata /\ | ||
| (!i. i < 256 ==> abs(ival(x i)) <= &8380416) /\ |
There was a problem hiding this comment.
The bounds exactly match what's required by the CBMC contract.
Could you please add the corresponding proof (see #806)?
There was a problem hiding this comment.
Ok, added CBMC proof contract.
1091827 to
0377594
Compare
mkannwischer
left a comment
There was a problem hiding this comment.
Somehow you have removed the intt proof and pushed the nttunpack proof. Can you please restore the intt proof?
0377594 to
0076d6e
Compare
Thank you, I tried to rebase but pushed the wrong branch! |
Signed-off-by: Jake Massimo <jakemas@amazon.com>
0076d6e to
2c2a426
Compare
Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>
Proof takes ~2hrs:
HOL-Light / x86_64 HOL Light proof for mldsa_intt.S (pull_request) Successful in 117m
Also added CBMC proof: