Repository navigation
Conversation
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.
ML-DSA-65 (FIPS 204) as a
Signature, stacked on #54 (signatures that can abort).Construction (
Cryptlib/Primitives/Sign/MLDSA/)Sampling.lean: VCVio'sExtern/MLDSA/Sampling.lean(Apache-2.0, attributed) with the native SHAKE bindings replaced by VCVio's pure-Lean Keccak, the same swap ML-KEM's primitives make. The sampler bounds (sampleInBall_norm,sampleInBall_l1Norm,expandS_bound,expandMask_get_cInfNorm_le) carry over unchanged, since they hold for any stream.MLDSA.lean:prims p, VCVio's concrete rounding, NTT and encodings with those samplers, andscheme p hp : Signature;mldsa65Signatureis ML-DSA-65.Correctness:
FIPS204.correct: for keys from any seed, a signature the signing loop returns verifies. It instantiates VCVio'sfipsSign_fipsVerify_correct'withuseHint_makeHint,hide_low);wApprox_eq, re-proved from onlyt = A·s₁ + s₂, Power2Round and the NTT laws. VCVio's version takes the wholePrimitives.Laws, including the random-oracle fieldkeyVector_t0_determined, which no concrete instance can satisfy;cs2_bound, fromSampleInBall's ℓ₁ count andExpandS's range.It depends on
propext,Classical.choiceandQuot.soundonly, pinned inSign/Check.lean.As a
SignatureM' = 0 ‖ 0 ‖ M), hedged with 32 bytes per signature from the signing state.signaborts after 1000 rejected attempts (ML-DSA-65 needs about five on average), or if the key or signature encoding would not decode back to itself. That check is run, not proved: VCVio has no encoding round-trip lemmas. With it,verify_signfollows fromcorrect. Proving the round trips would let the check go.Tests:
mldsa_testagainst NIST ACVP-Server vectors for ML-DSA-65, extracted byscripts/extract_acvp_mldsa.pywith.sha256sidecars:All pass. So do sign/verify round trips through
mldsa65Signature, which reject another message and a changed signature; signing takes about 90 ms. HashML-DSA (pre-hash) is not implemented. Added tomake test,make test-mldsaand CI.make test(all suites),make axioms.