HOL-Light: Consolidate AArch64 poly_use_hint_32 _CORRECT theorems#1136
Open
jakemas wants to merge 1 commit into
Open
HOL-Light: Consolidate AArch64 poly_use_hint_32 _CORRECT theorems#1136jakemas wants to merge 1 commit into
jakemas wants to merge 1 commit into
Conversation
c078a93 to
843eb2d
Compare
Contributor
CBMC Results (ML-DSA-44, REDUCE-RAM)Full Results (200 proofs)
|
Contributor
CBMC Results (ML-DSA-87, REDUCE-RAM)Full Results (200 proofs)
|
Contributor
CBMC Results (ML-DSA-65, REDUCE-RAM)Full Results (200 proofs)
|
Contributor
CBMC Results (ML-DSA-87)Full Results (200 proofs)
|
Contributor
CBMC Results (ML-DSA-44)Full Results (200 proofs)
|
Contributor
CBMC Results (ML-DSA-65)Full Results (200 proofs)
|
Per #1085, the poly_use_hint proofs from #1037 expose a non-standard _CORRECT / _CORRECT_CODE split that doesn't appear in any other proof in mlkem-native or mldsa-native. This consolidates poly_use_hint_32 into a single FIPS 204-aligned _CORRECT theorem and a single _SUBROUTINE_CORRECT, matching the convention used by every other proof in the codebase. Internal intermediates _CORRECT_CODE, _CORRECT_BOUND_CODE, and _SUBROUTINE_CORRECT_CODE are removed. The new _CORRECT places the input-bound antecedents (val(x i) < 8380417 /\ val(y i) <= 1) inside the postcondition (decompose-style), matching the shape used by poly_decompose_32 / poly_decompose_88. The ARM symbolic execution doesn't depend on input ranges; the bounds are picked up after stepping to discharge the FIPS-equivalence and val < 16 corollary. Mechanics: - The FIPS 204 / code-aligned equivalence section (MLDSA_USE_HINT_32_EQUIV) moves above the correctness proof. - _CORRECT runs the 878-step ARM symbolic execution unconditionally, then picks up the bound antecedents from the postcondition. - Per-element FIPS-equality closed via a derived EC_FINAL helper after IMP_REWRITE_TAC[MLDSA_USE_HINT_32_EQUIV]. - val < 16 corollary closed by reducing val(word ..) to MOD via VAL_WORD and discharging via the bound on mldsa_use_hint_32_code. - _SUBROUTINE_CORRECT derives from _CORRECT via ARM_ADD_RETURN_NOSTACK_TAC. The _88 variant will follow in a separate PR. Verified end-to-end: the new proof closes in 19:01 wall time, exit 0, no axioms. Closes part of #1085. Signed-off-by: Jake Massimo <jakemas@amazon.com>
843eb2d to
ba270a2
Compare
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.
Summary
Consolidates the
poly_use_hint_32AArch64 HOL-Light proofs to use the same_CORRECT/_SUBROUTINE_CORRECTshape as every other proof in the codebase, addressing #1085.The
_CORRECT_CODE/_CORRECT_BOUND_CODE/_SUBROUTINE_CORRECT_CODEintermediates are removed; the public_CORRECTis now stated directly in FIPS 204 terms (mldsa_use_hint_32) with the< 16bound as a corollary, following the pattern outlined in #1037 (comment):MLDSA_USE_HINT_32_EQUIV) moves above the correctness proof._CORRECTusesENSURES_STRENGTHEN_POSTto bridge the FIPS-aligned postcondition to the code-aligned form before symbolic execution; the strengthening branch closes viaIMP_REWRITE_TAC[MLDSA_USE_HINT_32_EQUIV]and a short bound discharge._SUBROUTINE_CORRECTderives directly from_CORRECTviaARM_ADD_RETURN_NOSTACK_TAC.The
_88variant will follow in a separate PR.Validated end-to-end against the equivalent file in s2n-bignum (
arm/proofs/mldsa_poly_use_hint_32.ml), where the same refactor proves in 25:10 wall time.Closes part of #1085. If we are happy with
_32I can make the same changes to_88Test plan
AArch64 HOL Light proof for poly_use_hint_32_aarch64_asm.SpassesPOLY_USE_HINT_32_AARCH64_ASM_SUBROUTINE_CORRECTandPOLY_USE_HINT_32_AARCH64_ASM_SUBROUTINE_SAFEretain identical signatures (verified locally)