HOL-Light/AArch64: Port proofs from mlkem-native#965
Open
Conversation
After PR #948 merged, mldsa-native and mlkem-native use identical AArch64 assembly for Keccak-F1600. Therefore, the HOL-light proofs on mlkem-native for Keccak-F1600 can also apply to mldsa-native as well. This commit port the hol-light proof for AArch64 FIPS202 backend from mlkem-native to mldsa-native, also update to CI workflow. The commit changes according to follwoing step: 1. Added keccak_f1600_*.S assembly files to proofs/hol_light/aarch64/, copied from mldsa/src/fips202/native/aarch64/src/ and modified with reference to mlkem. 2. Ported the HOL-Light proofs keccak_f1600_*.ml and keccak_spec.ml from mlkem-native to mldsa-native. 3. Updated the Makefile to include all newly added keccak_f1600_*.o objects. 4. Tested locally using `tests hol_light`. 5. Updated the CI workflow .github/workflows/hol_light.yml to add the series of Keccak F1600 HOL-Light proofs to the hol_light_proofs field. Signed-off-by: willieyz <willie.zhao@chelpis.com>
Contributor
CBMC Results (ML-DSA-65)Full Results (175 proofs)
|
Contributor
CBMC Results (ML-DSA-44)Full Results (175 proofs)
|
Contributor
CBMC Results (ML-DSA-87)Full Results (175 proofs)
|
mkannwischer
requested changes
Feb 17, 2026
Contributor
mkannwischer
left a comment
There was a problem hiding this comment.
Thanks @willieyz. Happy Near Year!
| mldsa/keccak_f1600_x1_scalar.o \ | ||
| mldsa/keccak_f1600_x1_v84a.o \ | ||
| mldsa/keccak_f1600_x2_v84a.o \ | ||
| mldsa/keccak_f1600_x4_v8a_scalar.o \ |
Contributor
There was a problem hiding this comment.
Here something is off in terms of whitespace.
Contributor
There was a problem hiding this comment.
These files should be autogenerated, see https://github.com/pq-code-package/mlkem-native/blob/ab3e6c00ac3d335e890929ef61791315e9192142/scripts/autogen#L2464
| @@ -0,0 +1,297 @@ | |||
| (* | |||
| * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | |||
| * SPDX-License-Identifier: Apache-2.0 OR ISC OR MIT-0 | |||
Contributor
There was a problem hiding this comment.
Please update the HOL-Light README, see https://github.com/pq-code-package/mlkem-native/blob/main/proofs/hol_light/README.md
Comment on lines
+1038
to
+1061
| (`!a rc A1 A2 A3 A4 pc stackpointer. | ||
| aligned 16 stackpointer /\ | ||
| nonoverlapping (a,800) (stackpointer,216) /\ | ||
| ALLPAIRS nonoverlapping | ||
| [(a,800); (stackpointer,216)] | ||
| [(word pc,LENGTH keccak_f1600_x4_v8a_scalar_mc); (rc,192)] | ||
| ==> ensures arm | ||
| (\s. aligned_bytes_loaded s (word pc) keccak_f1600_x4_v8a_scalar_mc /\ | ||
| read PC s = word (pc + KECCAK_F1600_X4_V8A_SCALAR_CORE_START) /\ | ||
| read SP s = stackpointer /\ | ||
| C_ARGUMENTS [a; rc] s /\ | ||
| wordlist_from_memory(a,25) s = A1 /\ | ||
| wordlist_from_memory(word_add a (word 200),25) s = A2 /\ | ||
| wordlist_from_memory(word_add a (word 400),25) s = A3 /\ | ||
| wordlist_from_memory(word_add a (word 600),25) s = A4 /\ | ||
| wordlist_from_memory(rc,24) s = round_constants) | ||
| (\s. read PC s = word(pc + KECCAK_F1600_X4_V8A_SCALAR_CORE_END) /\ | ||
| wordlist_from_memory(a,25) s = keccak 24 A1 /\ | ||
| wordlist_from_memory(word_add a (word 200),25) s = | ||
| keccak 24 A2 /\ | ||
| wordlist_from_memory(word_add a (word 400),25) s = | ||
| keccak 24 A3 /\ | ||
| wordlist_from_memory(word_add a (word 600),25) s = | ||
| keccak 24 A4) |
Contributor
There was a problem hiding this comment.
Please also add the corresponding CBMC proofs for those functions - i think the contract are alreaday there.
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.
After PR #948 merged, mldsa-native and mlkem-native use identical AArch64 assembly for Keccak-F1600. Therefore, the HOL-light proofs on mlkem-native for Keccak-F1600 can also apply to mldsa-native as well.
This PR port the hol-light proof for AArch64 FIPS202 backend from mlkem-native to mldsa-native, also update to CI workflow.
The PR changes according to follwoing step:
proofs/hol_light/aarch64/, copied frommldsa/src/fips202/native/aarch64/src/and modified with reference to mlkem.keccak_f1600_*.mlandkeccak_spec.mlfrom mlkem-native to mldsa-native.keccak_f1600_*.oobjects.tests hol_light..github/workflows/hol_light.ymlto add the series of Keccak F1600 HOL-Light proofs to thehol_light_proofsfield.