Documentation

CslibFrontier.Crypto.Computational.MLDSA.QuantumKeyOnly

Coherent key-only extraction with the FIPS 204 commitment digest #

A clocked classical controller operates a persistent quantum device and can make coherent XOR queries to the matrix and commitment tables. Its only input is the rounded public-key bytes. Both the forger and the final byte verifier use the same fixed-length raw commitment table. The verifier and the systematic lattice check use Algorithm 29 on its digest.

Dilithium v3.1 [BDK+21], §§6.1–6.2.1, gives the SelfTargetMSIS adversary coherent access to a function into the sparse challenge set. FIPS 204 [NIST24a], Algorithms 8 and 29, exposes and compares the digest before expanding it. This module proves the forward extraction for this byte interface. A reduction to the polynomial-valued oracle must still simulate the exposed digest register.

@[reducible, inline]

One raw Algorithm 8 query word, returning all bits of its digest in little-endian order.

Read the digest at the literal FIPS word corresponding to a module product. An input whose message representative has the wrong width is outside the verifier's interface.

On the full canonical grid the expanded random-oracle table has independent coordinates, each with precisely the pushforward of a uniform digest through Algorithm 29. This computes its joint law including the probability of exhaustion.

The oracle word involves neither truncation nor padding on a verifier input. Substituting the SHAKE256 commitment-digest register yields FIPS 204 byte verification at the supplied matrix A.

Full matrix response in row, column, coefficient, bit order. Twenty-three low bits recover the entire canonical representative modulo the FIPS modulus.

The output begins with a framed bit-string message and framed context bits, followed by the signature bits. Non-byte-aligned context or signature fields decode to a rejecting empty signature.

One retained finite classical machine, clock and active device width. Its output is interpreted by readForgery. Private fair coins and quantum measurements may drive its later gates or coherent queries.

noncomputable def Cslib.Crypto.MLDSA.FIPS204.QuantumKeyOnly.forgeryGame (s : Level) (C : Controller) (H : DigestTable s) (E : FixedBytes 32 → PublicMatrix s) (rho : FixedBytes 32) (t : Fin s.params.k → Poly) :

Fixed-table verification after the native coherent run.

Check the canonical full product, shortness and expanded digest of a systematic witness.

noncomputable def Cslib.Crypto.MLDSA.FIPS204.QuantumKeyOnly.solver (s : Level) (C : Controller) (H : DigestTable s) (E : FixedBytes 32 → PublicMatrix s) (rho : FixedBytes 32) (t : Fin s.params.k → Poly) :
PMF (List Bool × (Fin (s.params.k + s.params.ℓ + 1) → Fin 256 → ℤ))

Run the same controller once, then extract the message and short systematic witness from its final word. Quantum registers are discarded only after its final output.

theorem Cslib.Crypto.MLDSA.FIPS204.QuantumKeyOnly.forgeryGame_le_solver (s : Level) (C : Controller) (H : DigestTable s) (E : FixedBytes 32 → PublicMatrix s) (rho : FixedBytes 32) (t : Fin s.params.k → Poly) :
(forgeryGame s C H E rho t) true ≤ (PMF.map (accepts s H (SharedDigest.systematic s (E rho) t)) (solver s C H E rho t)) true

Every accepted byte forgery yields a short witness whose last polynomial is Algorithm 29 of the same oracle digest at its systematic product. This is a straight-line bound for each table and public key, without measuring, rewinding or resampling any coherent query.

Sample each entire oracle once. Key generation reads the matrix at the published seed, and the controller continues with the same coherent table. Secrets and errors are sampled coefficientwise from the Dilithium short law.

On the challenge (A,t), program the public seed to A in the fixed matrix table before any coherent query. The device implements XOR against that whole updated function.

Programming an independent challenge matrix at the published seed gives exactly the honest joint law, including the entire device's coherent access to the matrix function.

The self-target experiment receives the public systematic matrix. It publishes the public bytes reconstructed from its two nonidentity blocks and runs one coherent controller with the digest table shared by its final witness test.

Finite key-only bound with two coherent random oracles. The first term is the explicit distinguisher's advantage on the short-secret Module-LWE and uniform challenge laws. The second is its straight-line systematic solver's success with the byte-digest oracle and Algorithm 29. Both reductions use independent ideal auxiliary tables.