Conversation
|
addresses #919 |
CBMC Results (ML-DSA-44)Full Results (176 proofs)
|
CBMC Results (ML-DSA-65)Full Results (176 proofs)
|
CBMC Results (ML-DSA-87)Full Results (176 proofs)
|
mkannwischer
left a comment
There was a problem hiding this comment.
Thanks @dkostic! I took the liberty to add the corresponding CBMC contract and proof.
The specs should still be moved into common/ to be shared with the x86 proofs. Rest looks very good to me.
0b391cd to
1bf5302
Compare
6285a26 to
581acd0
Compare
mkannwischer
left a comment
There was a problem hiding this comment.
Thanks @dkostic for the changes! I took the liberty to revert some of the changes you made to the hol_light workflow as they are not needed.
Rest looks good to me now.
@hanno-becker, could you take another look, please?
hanno-becker
left a comment
There was a problem hiding this comment.
Overall this looks excellent, thank you @dkostic!
The only minor point is the avoidance of hardcoded lengths constants in the scripts. Could you follow the pattern in mlkem-native to avoid hardcoded lengths and thereby make the proof scripts agnostic to re-running SLOTHY?
3eb9c3e to
62ee2b6
Compare
Port the ML-DSA Forward NTT implementation and its HOL Light proof of correctness from s2n-bignum to mldsa-native. The proof verifies the AArch64 NEON NTT implementation at the object-code level, showing that the output coefficients are congruent to the forward NTT of the input modulo 8380417, with bounded output coefficients. A constant-time and memory safety proof is also included. New files: - aarch64/mldsa/mldsa_ntt.S: Assembly derived from dev/aarch64_opt/src/ntt.S - aarch64/proofs/mldsa_ntt.ml: HOL Light proof (MLDSA_NTT_CORRECT, MLDSA_NTT_SUBROUTINE_CORRECT, and MLDSA_NTT_SUBROUTINE_SAFE theorems) - aarch64/proofs/mldsa_specs.ml: Self-contained ML-DSA specifications and congruence/bounds propagation infrastructure, ported from s2n-bignum's common/mlkem_mldsa.ml with only ARM ML-DSA relevant definitions - aarch64/proofs/subroutine_signatures.ml: ML-DSA subroutine signatures for the safety proof infrastructure Modified files: - aarch64/proofs/aarch64_utils.ml: Add MEMORY_128_FROM_32_TAC - aarch64/Makefile: Add mldsa_ntt to build targets Signed-off-by: dkostic <dkostic@amazon.com>
Add CBMC contract for mld_ntt_asm matching the bounds from the AArch64 NTT HOL Light proof (input: abs <= 8380416, output: abs <= 75423752). Add corresponding CBMC proof for mld_ntt_native using the contract. Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>
Consolidate the shared ML-DSA specifications and congruence/bounds propagation infrastructure into a single file at proofs/hol_light/common/mldsa_specs.ml, used by both AArch64 and x86_64 proofs. The merged file contains: - Shared: bitreverse8, reorder, BITREVERSE8_CLAUSES, congruence/bounds infrastructure (CONGBOUND_WORD_*, ASM_CONGBOUND_RULE, etc.), SIMD simplification tactics - x86_64-specific: AVX2 NTT ordering, mldsa_montred/barred/montmul - AArch64-specific: arm_mldsa_forward_ntt, arm_mldsa_barmul ASM_CONGBOUND_RULE now handles both arm_mldsa_barmul and mldsa_montred/barred/montmul cases. Signed-off-by: dkostic <dkostic@amazon.com>
Signed-off-by: dkostic <dkostic@amazon.com>
62ee2b6 to
f7b4f98
Compare
hanno-becker
left a comment
There was a problem hiding this comment.
LGTM. Thanks a lot @dkostic!
Port the ML-DSA Forward NTT implementation and its HOL Light proof of correctness from s2n-bignum to mldsa-native. The proof verifies the AArch64 NEON NTT implementation at the object-code level, showing that the output coefficients are congruent to the forward NTT of the input modulo 8380417, with bounded output coefficients. A constant-time and memory safety proof is also included.
New files:
Modified files:
aarch64/proofs/aarch64_utils.ml: Add MEMORY_128_FROM_32_TAC
aarch64/Makefile: Add mldsa_ntt to build targets
Resolves HOL-Light: Prove AArch64 NTT #919