Documentation

CslibFrontier.Crypto.Computational.MLDSA.CommitmentEntropy

Counting preimages of an ML-DSA signing commitment #

The preimage count of Barbosa et al. [BarbosaEtAl2023, Appendix A.1, equation (21), p. 34], used in [FallahpourFehrHuang2025, §4.1, equation (6)], bounds the largest atom of the rounded commitment by counting preimages on the first ℓ rows. Both inequalities use 2γ₁ − 1 per mask coefficient. The FIPS 204 interval [1 − γ₁, γ₁] contains 2γ₁ integers, giving (2γ₁)^(nℓ) masks here. At a prescribed high part, each coefficient has at most 2γ₂ + 1 possible low parts. Each reconstructed vector has at most as many preimages as the kernel of the square submatrix.

theorem Cslib.Crypto.MLDSA.commitmentGuessProbability_le_kernel (P : Params) [NeZero P.q] (hγ : 0 < P.γ₁) (h₂ : 0 < P.γ₂) (hq : 2 * P.γ₁ < P.q) (hdim : P.ℓ ≤ P.k) (A : Matrix (Fin P.k) (Fin P.ℓ) (Fin P.n → ZMod P.q)) :
have top := A.submatrix (Fin.castLE hdim) id; commitmentGuessProbability P hγ A ≤ ↑(Nat.card { y : Fin P.ℓ → Fin P.n → ZMod P.q // moduleSISMap top y = 0 }) * ↑(2 * P.γ₂ + 1) ^ (P.ℓ * P.n) / ↑(2 * P.γ₁) ^ (P.ℓ * P.n)

The largest commitment probability for a fixed public matrix, in terms of the size of the kernel on the first ℓ rows. This applies also when the square submatrix is singular.

The integral exponent in the rounded-commitment preimage bound for each FIPS 204 level. A kernel of size K gives maximum commitment probability at most K / 2^b.

Number of masks that the first ℓ rows of the public matrix send to zero, counted on the entire coefficient module. This equals one for an invertible square submatrix.

A fixed public matrix costs its actual kernel size in the concrete signing-commitment bound. The powers of two use the mask intervals and rounding widths from FIPS 204, Table 1.