Documentation

CslibFrontier.Crypto.Computational.MLDSA.PriorCommitmentRefresh

Sampling a commitment digest after native signing and coherent SHAKE queries #

The mask fixes the packed commitment suffix before the forger chooses a message. A second independent digest table supplies all words with this suffix. Conditional on the earlier interaction using the original table, the digest at the subsequently chosen message representative can be redrawn exactly. The cost of separating the earlier interaction depends on the largest atom of the mask commitment and on the earlier signing and coherent queries. This is an original one-attempt comparison for the byte signer of [NIST24a], Algorithm 7 and Appendix C, using the quantum query disturbance argument of [BBBV97].

noncomputable def Cslib.Crypto.MLDSA.FIPS204.QuantumSigningForger.commitmentTrialGame (C : QuantumSigningForger) (s : Level) (H : Xofs) (keys : KeyPair) (index : ℕ) (j : Fin 814) (rows : List (FixedBytes 2 → FixedBytes (maskPolyBytes s))) (write : Bool) :

Fresh-digest strong-forgery decision in the private mask-expansion experiment with a selected mask drawn from the FIPS coefficient box. The two zero-based indices select a signing request and an attempt within its minimum Appendix C cap. Earlier native calls and retries can finish before the selected attempt. If it is reached, read the shared commitment digest, or install a fresh digest and keep it on rejection. The continuing signer and verifier see that same stream. The supplied row tape uses the convention of expansionContinuation.

theorem Cslib.Crypto.MLDSA.FIPS204.QuantumSigningForger.abs_commitmentTrialGame_write_sub_read_le (C : QuantumSigningForger) (s : Level) (H : Xofs) (keys : KeyPair) (index : ℕ) (j : Fin 814) (rows : List (FixedBytes 2 → FixedBytes (maskPolyBytes s))) {qH : ℕ} (hash : C.XofCallsLe qH) :
have p := fun (write : Bool) => (C.commitmentTrialGame s H keys index j rows write).succProbability; |↑(p true) - ↑(p false)| ≤ (do let sk ← decodePrivate s keys.secretKey let A ← H.expandA s sk.rho have δ : ℝ := (commitmentGuessProbability s.params ⋯ A).toReal pure (2 * (4 * ↑qH * √δ + (815 * ↑index + (1 + ↑↑j)) * δ))).getD 0

Replacing the shared commitment digest by a fresh uniform digest in a selected native signing attempt after adaptive signing and coherent SHAKE queries. The bound on fresh-digest wins charges earlier quantum queries, at most 815 table reads per earlier request, a representative lookup, and all preceding retries within this request. Each branch resumes the actual forger and FIPS verifier, including errors, log entries and the residual quantum device.