Documentation

CslibFrontier.Crypto.Computational.MLDSA.RepresentativeOverlap

Representative and commitment address overlap in the signed ML-DSA game #

FIPS 204, Algorithms 7 and 8, use the public-key hash as the first 512 bits of a representative input and the message representative as the first 512 bits of a commitment input. Both roles use SHAKE256. In a fixed-oracle run, searching the successful signing log for a prefix match covers every overlap with a commitment for a logged message, for any choice of commitment high bits. The bound for the adaptive signing experiment is an original deduction from these encodings.

Raw SHAKE256 input of the first logged message whose 64-byte representative equals the public-key hash. Comparing this input with the encoded public key tests for a collision.

theorem Cslib.Crypto.MLDSA.FIPS204.matchingRepresentativeInput_of_overlap (H : Xofs) (s : Level) (pk : List Byte) {log : List Forgery} {g : Forgery} (hg : g ∈ log) (formatted : List Bool) (w : Fin s.params.k → Fin 256 → ℤ) (overlap : representativeInput (H.h256.readBytes pk 64) formatted = commitmentInput s w (H.messageRepresentative pk (formattedMessage g))) :

Equality of entire representative and commitment addresses implies that the search finds a match in the log. This includes new signatures on a previously signed context and message.

theorem Cslib.Crypto.MLDSA.FIPS204.QuantumSigningForger.matchingRepresentative_le (C : QuantumSigningForger) (base : Xofs) (s : Level) {a b : ℕ} (ha : 8 * (32 + 320 * s.params.k) ≤ a) (hb : 64 ≤ b) :
have run := fun (test : Xofs → List Byte → List Forgery → Bool) => (base.uniformPrefixes a b).bind fun (H : Xofs) => H.keyExperiment s fun (keys : KeyPair) => PMF.map (fun (z : Forgery × List Forgery) => test H keys.publicKey z.2) (C.transcript H s keys); (run fun (H : Xofs) (pk : List Byte) (log : List Forgery) => (H.matchingRepresentativeInput pk log).isSome).succProbability ≤ (run fun (H : Xofs) (pk : List Byte) (log : List Forgery) => Option.any (fun (y : List Bool) => decide (Keccak.bytesToBitsLE pk ≠ y ∧ H.h256.readBytes pk 64 = H.h256.read y 64)) (H.matchingRepresentativeInput pk log)).succProbability + (2 ^ 512)⁻¹

In the actual retained-controller experiment, a match in any successful signing reply costs at most the probability of the computed SHAKE256 collision plus 2⁻⁵¹² for the entire setup. The controller may choose its messages after coherent queries and earlier signing replies. Both probabilities use the same raw oracles throughout the original capped game.