Documentation

CslibFrontier.Crypto.Computational.MLDSA.ResponseBinding

Distinct responses to the same ML-DSA challenge #

Section 6.2.2 of CRYSTALS-Dilithium v3.1 treats the case where two different responses to one challenge recover the same commitment. Subtracting the two verification equations cancels the public-key term and produces a short nonzero vector in the kernel of [I | A]. The two blocks have the joint bound of equation (8).

The high bits recovered by the compressed verifier from a decoded signature.

def Cslib.Crypto.MLDSA.responseDifference {P : Params} (d : ℕ) (pk : PublicKey P) (σ σ' : CompressedSignature P) :
Fin (P.k + P.ℓ) → Fin P.n → ℤ

Equation (8)'s integer witness, with the difference of the two hint residuals in the identity block and the difference of the two responses in the matrix block.

theorem Cslib.Crypto.MLDSA.isSolution_responseDifference {P : Params} (hP : P.Valid) (hγq : 4 * P.γ₂ < P.q) (d : ℕ) (pk : PublicKey P) {σ σ' : CompressedSignature P} (hne : σ ≠ σ') (hc : σ.c = σ'.c) (hw : σ.recover d pk = σ'.recover d pk) (hz : ResponseShort P σ.z) (hz' : ResponseShort P σ'.z) :

The same-challenge case of Dilithium v3.1 §6.2.2. Distinct decoded responses recovering the same commitment yield an integer MSIS solution at the source radius.

A collision finder sees the public matrix and can choose the public vector along with both decoded signatures.

noncomputable def Cslib.Crypto.MLDSA.responseCollisionGame {P : Params} (find : Matrix (Fin P.k) (Fin P.ℓ) (Fin P.n → ZMod P.q) → ProbComp (ResponsePair P)) [NeZero P.q] (d : ℕ) :

Draw a uniform matrix. The finder wins by returning distinct short responses to a common challenge that recover the same commitment under its chosen public vector.

def Cslib.Crypto.MLDSA.responseCollisionSolver {P : Params} (find : Matrix (Fin P.k) (Fin P.ℓ) (Fin P.n → ZMod P.q) → ProbComp (ResponsePair P)) (d : ℕ) (A : Matrix (Fin P.k) (Fin P.ℓ) (Fin P.n → ZMod P.q)) :
ProbComp (Fin (P.k + P.ℓ) → Fin P.n → ℤ)

Run the finder once on the challenge matrix and return its response difference.

Concrete MSIS bound for the same-challenge, same-commitment case of §6.2.2.