CBMC: Functional specs for make_hint and hint unpacking#1287
CBMC: Functional specs for make_hint and hint unpacking#1287mkannwischer wants to merge 1 commit into
make_hint and hint unpacking#1287Conversation
CBMC Results (ML-DSA-65, REDUCE-RAM)
Full Results (209 proofs)
|
CBMC Results (ML-DSA-87, REDUCE-RAM)
Full Results (209 proofs)
|
CBMC Results (ML-DSA-44, REDUCE-RAM)
Full Results (209 proofs)
|
CBMC Results (ML-DSA-87)
Full Results (209 proofs)
|
CBMC Results (ML-DSA-44)
Full Results (209 proofs)
|
CBMC Results (ML-DSA-65)
Full Results (209 proofs)
|
|
I support strengthening the functional specification as much as CBMC allows. However, we need to find a way around the unnecessary complexity it imposes on caller that don't care about the added functional properties. Perhaps there is a (clean) way one can mark |
Wouldn't that be the same as an assertion at the end of the function? |
064b853 to
f9cab4d
Compare
Strengthen the contracts beyond type/memory safety: pin mld_make_hint's return value to the exact hint predicate, and prove mld_sig_unpack_hints sets h->coeffs[p] exactly for the hint indices decoded for row i. The mld_sig_unpack_hints postcondition is wrapped in functional() so it is verified in its own proof and discarded by callers that don't rely on the additional post-condition. Otherwise the sign_verify_internal proof blows up. - Resolves #1099 Signed-off-by: Matthias J. Kannwischer <matthias@zerorisc.com>
f9cab4d to
ae94c4a
Compare
|
No luck with fixing |
Yes, functionally it is, but as you say, conceptually it belongs in the contract. |
I can't think of anything I like. For the time being, I think we should start with an assertion. |
As in you do not like what i have right now? |
|
Yes, I'm not convinced by the approach yet; you can shoot yourself in the foot by using a functional spec but not proving it. Of course we're doing it the other way around, but nothing enforces it? |
Strengthen the contracts beyond type/memory safety: pin mld_make_hint's return value to the exact hint predicate, and prove mld_sig_unpack_hints sets h->coeffs[p] exactly for the hint indices decoded for row i.