HOL-Light: Add AArch64 poly_decompose_{32,88} correctness proofs#977
Draft
mkannwischer wants to merge 8 commits intomainfrom
Draft
HOL-Light: Add AArch64 poly_decompose_{32,88} correctness proofs#977mkannwischer wants to merge 8 commits intomainfrom
mkannwischer wants to merge 8 commits intomainfrom
Conversation
Add a HOL Light functional correctness proof for the aarch64 ML-DSA function poly_chknorm, which checks whether any polynomial coefficient has absolute value >= a given bound. This commit includes: - Functional correctness proof showing the assembly computes `bitval(?i. i < 256 /\ abs(ival(x i)) >= ival bound)` - autogen support for generating aarch64 HOL Light assembly - Update of s2n-bignum Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>
This also fixes the contract of poly_chknorm_native - it was incorrectly modelled as only returning -1 or 0, never 1. This was actually a proof gap - CBMC was not happy with 0U - ret. This commit changes it to use mld_ct_cmask_nonzero_u32 - which has exactly the behavior we want here. Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>
- Rewrite expressions during symbolic execution to keep system states readable - Keep quantified propositions folded to the point where case-by-case analysis is needed - Hoist all helper lemmas out of the main proof for better readability Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>
Add functional correctness proofs for polyz_unpack_17 and polyz_unpack_19. Closely following the decompress proofs from mlkem-native: pq-code-package/mlkem-native#1543 Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>
Add CBMC contracts for native AArch64 polyz_unpack_17 and polyz_unpack_19 following corresponding HOL-Light specs. Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>
Move ival bounds out of CORRECT postcondition and derive them as a corollary in SUBROUTINE_CORRECT. Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>
Add functional correctness proofs for the AArch64 assembly implementations of poly_decompose for both GAMMA2 variants: - poly_decompose_32 (GAMMA2 = (Q-1)/32 = 261888, used in ML-DSA-65/87) - poly_decompose_88 (GAMMA2 = (Q-1)/88 = 95232, used in ML-DSA-44) Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>
Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>
Contributor
CBMC Results (ML-DSA-44)Full Results (180 proofs)
|
Contributor
CBMC Results (ML-DSA-65)Full Results (180 proofs)
|
Contributor
CBMC Results (ML-DSA-87)Full Results (180 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.
polyz_unpack_{17,19}#971poly_decompose#922