Documentation

CslibFrontier.Crypto.Computational.MLDSA.CompressedKeyOnly

ML-DSA compressed-verification key-only reduction #

The Dilithium v3.1 verifier does not hash HighBits(Az - ct) directly. It uses the rounded public-key component t₁, computes r = Az - c t₁ 2ᵈ, and recovers the hashed high part as UseHint(h, r, 2γ₂). Section 6.2.1, equations (9)--(12), rewrites every verifying key-only forgery as a solution of self-target Module-SIS. This module formalizes that algebra and the resulting semantic key-only reduction.

This remains the simplified proof model: the public input is the full pair (A, t), from which verification computes t₁; the hash is fixed; and there are no signing queries. Seed expansion, codecs, message representatives, the hint-weight check, bounded signing failure, strong unforgeability, and classical/QROM Fiat--Shamir transformations are not represented here.

Main definitions #

Main results #

References #

A signature for the compressed-verification proof surface: response z, hint vector h, and challenge c. Unlike the final FIPS 204 byte string, this semantic value has no codec or malformed-input behavior.

theorem Cslib.Crypto.MLDSA.CompressedSignature.ext {P : Params} {x y : CompressedSignature P} (z : x.z = y.z) (h : x.h = y.h) (c : x.c = y.c) :
x = y
def Cslib.Crypto.MLDSA.publicKeyHighTerm (P : Params) (d : ℕ) (pk : PublicKey P) :
Fin P.k → Fin P.n → ZMod P.q

The public-key high term t₁ 2ᵈ, computed from the full semantic t.

def Cslib.Crypto.MLDSA.publicKeyLowPart (P : Params) (d : ℕ) (pk : PublicKey P) :
Fin P.k → Fin P.n → ZMod P.q

The public-key low term t₀, computed from the full semantic t.

Power2Round gives t = t₁ 2ᵈ + t₀ coefficientwise.

def Cslib.Crypto.MLDSA.compressedVerifierCommitment (P : Params) (d : ℕ) (pk : PublicKey P) (z : Fin P.ℓ → Fin P.n → ZMod P.q) (c : Fin P.n → ZMod P.q) :
Fin P.k → Fin P.n → ZMod P.q

The compressed verifier's commitment r = A z - c (t₁ 2ᵈ).

The compressed commitment is the uncompressed commitment plus c t₀. This is an algebraic bridge derived from Power2Round, not a separate statement of FIPS 204.

def Cslib.Crypto.MLDSA.compressedVerify (P : Params) (d : ℕ) (H : Hash P) (pk : PublicKey P) (msg : List Bool) (σ : CompressedSignature P) :

Compressed verification in the simplified proof model. It checks the response and challenge, then hashes UseHint(h, A z - c t₁ 2ᵈ, 2γ₂). The final FIPS hint-weight and byte-codec checks are not part of this semantic surface.

The low component u' = u + c t₀ from equation (10), where u is the arbitrary-hint residual of equation (9).

The self-target candidate read from a compressed-verification forgery.

The conservative self-target radius from Dilithium v3.1 equation (7).

theorem Cslib.Crypto.MLDSA.selfTargetMap_compressedForgeryLowPart {P : Params} [NeZero P.q] (d : ℕ) (pk : PublicKey P) (σ : CompressedSignature P) :
selfTargetMap P pk (compressedForgeryLowPart P d pk σ) σ.z σ.c = fun (i : Fin P.k) (j : Fin P.n) => ↑(useHint P.q P.γ₂ (σ.h i j) (compressedVerifierCommitment P d pk σ.z σ.c i j) * ↑(2 * P.γ₂))

Equations (9)--(10): adding the forged low component to A z - c t gives the hinted high part multiplied by 2γ₂.

theorem Cslib.Crypto.MLDSA.highBits_selfTargetMap_compressedForgeryLowPart {P : Params} (hP : P.Valid) (hγq : 4 * P.γ₂ < P.q) (d : ℕ) (pk : PublicKey P) (σ : CompressedSignature P) :
highBitsVec P (selfTargetMap P pk (compressedForgeryLowPart P d pk σ) σ.z σ.c) = fun (i : Fin P.k) => useHintVec P.q P.γ₂ (σ.h i) (compressedVerifierCommitment P d pk σ.z σ.c i)

The high bits of the full self-target product of the corrected witness are exactly the high bits recovered from the hint and the rounded public key.

theorem Cslib.Crypto.MLDSA.isSelfTargetSolution_of_compressedVerify {P : Params} (hP : P.Valid) (hγq : 4 * P.γ₂ < P.q) {d : ℕ} (hd : 0 < d) {H : Hash P} {pk : PublicKey P} {msg : List Bool} {σ : CompressedSignature P} (h : compressedVerify P d H pk msg σ = true) :

A compressed-verification forgery is a self-target solution. This is the formal counterpart of Dilithium v3.1 Section 6.2.1, equations (9)--(12), with the source condition q > 4γ₂ explicit.

Compressed key-only games and reductions #

The compressed key-only forgery experiment for a fixed public key.

noncomputable def Cslib.Crypto.MLDSA.compressedKoaGame (P : Params) (d : ℕ) (keys : PMF (PublicKey P)) (H : Hash P) (adv : PublicKey P → ProbComp (List Bool × CompressedSignature P)) :

The compressed key-only forgery game under a supplied key distribution.

def Cslib.Crypto.MLDSA.compressedForgeryDistinguisher (P : Params) (d : ℕ) (H : Hash P) (adv : PublicKey P → ProbComp (List Bool × CompressedSignature P)) (A : Matrix (Fin P.k) (Fin P.ℓ) (Fin P.n → ZMod P.q)) (t : Fin P.k → Fin P.n → ZMod P.q) :

The Module-LWE distinguisher induced by a compressed key-only forger.

The self-target solver induced by a compressed key-only forger.

theorem Cslib.Crypto.MLDSA.compressedKoaGame_keyLaw {P : Params} [NeZero P.q] (d : ℕ) (secret : PMF (ZMod P.q)) (H : Hash P) (adv : PublicKey P → ProbComp (List Bool × CompressedSignature P)) :
compressedKoaGame P d (keyLaw P secret) H adv = ModuleLWE.realGame (Probability.PMF.pi fun (x : Fin P.ℓ) => Probability.PMF.pi fun (x : Fin P.n) => secret) (Probability.PMF.pi fun (x : Fin P.k) => Probability.PMF.pi fun (x : Fin P.n) => secret) (compressedForgeryDistinguisher P d H adv)

The honest-key compressed game is the real short-law Module-LWE game of the explicit distinguisher.

The uniform-key compressed game is the random Module-LWE game of the explicit distinguisher.

For every key distribution, compressed forging is at most as likely as solving self-target Module-SIS through the explicit reduction.

Finite key-only bound in the compressed, polynomial-challenge model. Against honest keys, success is at most the short-law Module-LWE advantage of the explicit distinguisher plus the uniform-key success probability of the explicit self-target solver. This semantic finite-game inequality supplies neither executable resource bounds nor an asymptotic/negligible corollary.