ML-DSA high-order and low-order rounding #
ML-DSA (CRYSTALS-Dilithium, [DKL+18], standardized as [NIST24a]) uses two
coefficient decompositions. Power2Round compresses the public key by writing
r = r₁ 2^d + r₀ with a centered low part. Decompose rounds commitments with the range
α = 2 γ₂, using a special wrap-around rule needed by the hint mechanism.
power2Round is Algorithm 35 of [NIST24a], p. 40. It takes the canonical representative
r⁺ ∈ [0, q) and its centered remainder r₀ = r⁺ mod± 2^d, and returns
((r⁺ - r₀) / 2^d, r₀). The coefficientwise power2RoundVec is the operation used on the
uncompressed public-key vector t; reconstruction and the bound |t₀| ≤ 2^(d-1) are the facts
used in the self-target MSIS calculation of [BDK+21], Section 6.2.1, Eq. (10).
For Decompose, the centered remainder is r₀ = r⁺ mod± α ∈ (-γ₂, γ₂]. The algorithm returns
(r₁, r₀) = ((r⁺ - r₀) / α, r₀), except in the one wrap-around case
r⁺ - r₀ = q - 1, where it returns (0, r₀ - 1). HighBits and LowBits are the two
components.
This module defines the decomposition on ZMod q and proves the facts that the scheme and its
security reduction use:
Power2Roundreconstructs its input and its low part has magnitude at most2^(d-1)(intCast_power2Round_high_mul_add_low,abs_power2Round_low_le);- the coefficientwise public-key decomposition reconstructs every coefficient and satisfies the
same low-part bound (
power2RoundVec_reconstruct,abs_power2RoundVec_low_le); - the commitment decomposition reconstructs its input:
r = r₁ · α + r₀inℤ_q(intCast_highBits_mul_add_lowBits); - the low bits are short,
|r₀| ≤ γ₂(abs_lowBits_le), and the high bits lie in[0, (q - 1) / α)(highBits_nonneg,highBits_lt); - the decomposition is unique: any representation
r = a · α + bwith0 ≤ a < (q - 1) / αand-γ₂ < b ≤ γ₂is the decomposition ofr(decompose_intCast_mul_add). The wrap-around rule is exactly what makes this hold ata = 0,b < 0. The wrap-around case can itself outputr₀ = -γ₂, outside this box (e.g.r = q - γ₂when2 γ₂ ∣ q - 1), so the decomposition does not always land in the box; - consequently, adding a short
swith‖s‖_∞ ≤ βto a value whose low bits satisfy|r₀| < γ₂ - βleaves the high bits unchanged and shifts the low bits bys(highBits_add_of_abs_lowBits_lt,lowBits_add_of_abs_lowBits_lt). This is the rounding fact behind ML-DSA's correctness: the verifier recomputesHighBits(A y - c s₂), which equals the signer'sHighBits(A y).
Main definitions #
Cslib.Crypto.MLDSA.power2Round,Cslib.Crypto.MLDSA.power2RoundVec: the scalar and coefficientwisePower2Roundalgorithm of [NIST24a].Cslib.Crypto.MLDSA.decompose,Cslib.Crypto.MLDSA.highBits,Cslib.Crypto.MLDSA.lowBits: theDecompose,HighBitsandLowBitsalgorithms.
Main results #
Cslib.Crypto.MLDSA.intCast_power2Round_high_mul_add_low,Cslib.Crypto.MLDSA.abs_power2Round_low_le:Power2Roundreconstruction and range.Cslib.Crypto.MLDSA.power2RoundVec_reconstruct,Cslib.Crypto.MLDSA.abs_power2RoundVec_low_le: coefficientwise compression facts.Cslib.Crypto.MLDSA.intCast_highBits_mul_add_lowBits: commitment reconstruction.Cslib.Crypto.MLDSA.abs_lowBits_le,Cslib.Crypto.MLDSA.highBits_nonneg,Cslib.Crypto.MLDSA.highBits_lt: ranges of the two components.Cslib.Crypto.MLDSA.decompose_intCast_mul_add: uniqueness of the decomposition.Cslib.Crypto.MLDSA.highBits_add_of_abs_lowBits_lt,Cslib.Crypto.MLDSA.lowBits_add_of_abs_lowBits_lt: stability of the high bits under short perturbations.
References #
Public-key power-of-two rounding #
The integer outputs of power-of-two rounding reconstruct the canonical representative.
Power2Round reconstruction. The two outputs reconstruct the input modulo q.
Commitment rounding #
The Decompose algorithm of [NIST24a] with rounding range 2 γ₂: from the canonical
representative r⁺ = r.val ∈ [0, q) and the centered remainder r₀ = r⁺ mod± 2 γ₂, return
((r⁺ - r₀) / (2 γ₂), r₀), or (0, r₀ - 1) in the wrap-around case r⁺ - r₀ = q - 1.
Uniqueness of the decomposition. If r = a · 2 γ₂ + b in ℤ_q with
0 ≤ a < (q - 1) / (2 γ₂) and -γ₂ < b ≤ γ₂, then decompose r = (a, b).
Adding a short perturbation to a value with small low bits: the decomposition of r + s is
(HighBits r, LowBits r + s), where s is read through its centered representative.
High bits are stable under short perturbations. If |s| ≤ β and
|LowBits r| < γ₂ - β, then HighBits (r + s) = HighBits r.