Add HOL Light rej_uniform_eta proofs for AArch64#1040
Draft
Conversation
a3673e9 to
0213d92
Compare
Contributor
CBMC Results (ML-DSA-44)
Full Results (187 proofs)
|
0213d92 to
4558665
Compare
Contributor
CBMC Results (ML-DSA-65)
Full Results (187 proofs)
|
4558665 to
73d8d61
Compare
Contributor
CBMC Results (ML-DSA-87)
Full Results (187 proofs)
|
Contributor
Author
IS expected, adding eta2 proof, still under construction. |
73d8d61 to
a7cc582
Compare
77cb935 to
f986df8
Compare
7607d25 to
37dfafd
Compare
Add formal correctness proof for the AArch64 mld_rej_uniform_eta4_asm function, which performs rejection sampling with eta=4 for ML-DSA. The proof verifies that the assembly implementation correctly: - Extracts 4-bit nibbles from input bytes - Filters nibbles < 9 using SIMD comparison + TBL permutation - Maps accepted values n to (4 - n) as signed 32-bit integers - Returns at most 256 coefficients with the correct count Verified against the compiled object code (post-hoc, not trusting the assembler) using the s2n-bignum ARM verification framework in HOL Light. All 86 AArch64 instructions are mechanically verified across every execution path (360+ ARM simulation steps). No CHEAT_TAC remains. New files: - mldsa_rej_uniform_eta4.S: standalone assembly for proof bytecodes - mldsa_rej_uniform_eta4.ml: 547-line HOL Light correctness proof - mldsa_rej_uniform_eta_table.ml: 256-entry lookup table constants Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Jake Massimo <jakemas@amazon.com>
Replace WOP-based loop structure with buflen DIV 8 iterations. This fixes the post-loop BCS handling (CHEAT 3): since 8 divides buflen, the loop exhausts the entire buffer and the back-edge BCS is deterministically not taken after the last iteration. The intermediate postcondition at pc+256 now tracks REJ_NIBBLES_ETA4(inlist) directly without existential quantification or niblen < 272 bound. Remaining CHEATs: loop body (SIMD->spec), writeback phase. Signed-off-by: Jake Massimo <jakemas@amazon.com> Co-authored-by: Claude <noreply@anthropic.com>
37dfafd to
ddd97de
Compare
Contributor
CBMC Results (ML-DSA-44, REDUCE-RAM)⏭️ 16 proof(s) skipped (see
Full Results (187 proofs)
|
Contributor
CBMC Results (ML-DSA-87, REDUCE-RAM)⏭️ 16 proof(s) skipped (see
Full Results (187 proofs)
|
Contributor
CBMC Results (ML-DSA-65, REDUCE-RAM)⏭️ 16 proof(s) skipped (see
Full Results (187 proofs)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #924 (when complete)
Depends on s2n-bignum PRs awslabs/s2n-bignum#378 and awslabs/s2n-bignum#379 (USHLL/SSHLL/MOVI instruction decoding) and a subsequent s2n-bignum nix pin update.
Lots of clean up todo, just checking CI.