Decision Module-LWE #
The decision Module-LWE experiments over the negacyclic ring R_q = ℤ_q[X] / (X^n + 1)
([LPR10], [DKL+18]), with polynomials stored as coefficient vectors
Fin n → ZMod q. The real experiment ModuleLWE.realExperiment draws a uniform module matrix A
and gives the distinguisher A and the sample A · s + e (ModuleLWE.sample) for a secret s
and an error vector e; the random experiment ModuleLWE.randomExperiment gives it a uniform
pair. For a secret law and an error law, the real game ModuleLWE.realGame draws s and e and
runs the real experiment, ModuleLWE.randomGame runs the random one, and ModuleLWE.advantage is
the distance between them. These are the games of the ML-KEM and ML-DSA reductions, whose secrets
are short rather than uniform. Module-LWE is LWE over the ring Negacyclic (ZMod q) n
(ModuleLWE.advantage_eq_lweAdvantage).
DecisionModuleLWEWith m d n q secret error is the asymptotic assumption with an m κ × d κ
module matrix over ℤ_{q κ}[X] / (X^{n κ} + 1), a secret law secret κ and an error law
error κ: every distinguisher that is uniform strict PPT on encodings
(ModuleLWE.Distinguisher.IsPPT) has negligible advantage between the real game for these laws and
the random game. A distinguisher machine reads the unary security parameter and the encoded sample
(ModuleLWE.encInput_apply). With short secret and error laws, this is the assumption of the
CRYSTALS-Kyber and CRYSTALS-Dilithium submissions ([ABD+21], §4.3;
[BDK+21], §6.1). DecisionModuleLWE m d n q noise is the case of a uniform secret
and independent polynomial errors from noise κ (decisionModuleLWE_iff_decisionModuleLWEWith).
A distinguisher outputs a bit, so DecisionModuleLWEWith is the same assumption as the
indistinguishability of the encoded samples ModuleLWE.realEnsemble and
ModuleLWE.uniformEnsemble against word-level distinguishers (decisionModuleLWEWith_iff_encoded).
Clients that reduce on encoded words use DecisionModuleLWEWith.encoded.
DecisionModuleLWEWith is a hypothesis against uniform classical strict polynomial-time programs.
It makes no assertion of hardness for any particular parameter family or laws, and no relation to
DecisionLWE at modulus 2 ^ w is proved. It is meaningful only for a family whose parameters grow
with the security parameter; at one fixed parameter set it fails unless the real sample is exactly
uniform (see DecisionModuleLWEWith).
Main definitions #
Cslib.Crypto.ModuleLWE.sample: the sampleA · s + e.Cslib.Crypto.ModuleLWE.realExperiment,Cslib.Crypto.ModuleLWE.randomExperiment: the fixed-instance experiments.Cslib.Crypto.ModuleLWE.realGame,Cslib.Crypto.ModuleLWE.randomGame,Cslib.Crypto.ModuleLWE.advantage: the games and advantage for a secret law and an error law.Cslib.Crypto.ModuleLWE.encodeSample: the encoding of a pair(A, b).Cslib.Crypto.ModuleLWE.Input,Cslib.Crypto.ModuleLWE.encInput: the input of a distinguisher and its encoding.Cslib.Crypto.ModuleLWE.Distinguisher,Cslib.Crypto.ModuleLWE.Distinguisher.IsPPT: typed distinguishers and their efficiency.Cslib.Crypto.DecisionModuleLWEWith: the decision Module-LWE assumption for a secret law and an error law.Cslib.Crypto.DecisionModuleLWE: its case with a uniform secret and independent polynomial errors.Cslib.Crypto.ModuleLWE.sampleLaw,Cslib.Crypto.ModuleLWE.realEnsemble,Cslib.Crypto.ModuleLWE.uniformEnsemble: the sample law and the encoded samples.
Main results #
Cslib.Crypto.ModuleLWE.flattenPolyVec_sample: Module-LWE samples flatten to standard LWE matrix-vector relations underexpandModuleMatrix.Cslib.Crypto.ModuleLWE.advantage_eq_lweAdvantage: Module-LWE is LWE over the ringNegacyclic (ZMod q) n.Cslib.Crypto.ModuleLWE.realGame_eq_uniform_bind,Cslib.Crypto.ModuleLWE.randomGame_eq: the games with the matrix drawn first and with one uniform pair, as key generation draws them.Cslib.Crypto.decisionModuleLWEWith_iff_encoded:DecisionModuleLWEWithis the word-level assumption.Cslib.Crypto.decisionModuleLWE_iff_decisionModuleLWEWith:DecisionModuleLWEis the case of a uniform secret.
Implementation notes #
ModuleLWE.encInput encodes the layout ModuleLWE.Input.words (the security parameter and the
encoded sample), so a typed distinguisher is a word-level distinguisher run on its input's words
(IsPPTOn.exists_bool_factor). The converse direction of decisionModuleLWEWith_iff_encoded
therefore replaces the typed distinguisher by that word-level one outright, with no congruence
argument for the games.
References #
- V. Lyubashevsky, C. Peikert and O. Regev, On Ideal Lattices and Learning with Errors over Rings
- L. Ducas et al., CRYSTALS-Dilithium: A Lattice-Based Digital Signature Scheme
- R. Avanzi et al., CRYSTALS-Kyber: Algorithm Specifications and Supporting Documentation (version 3.02), 4 August 2021, §4.3 (p. 19) and §4.4 (pp. 21–22)
- S. Bai et al., CRYSTALS-Dilithium: Algorithm Specifications and Supporting Documentation (Version 3.1), 8 February 2021, §6.1 (p. 23) and §6.2 (p. 24)
Samples #
Structured-to-unstructured Module-LWE identity: flattening ModuleLWE.sample A s e gives
the standard LWE vector expandModuleMatrix A *ᵥ flattenPolyVec s + flattenPolyVec e.
A Module-LWE sample is the LWE sample A *ᵥ s + e over Negacyclic (ZMod q) n.
Module-LWE pairs of fixed shape are determined by their encodings when q ≠ 0.
Fixed-instance experiments #
The real decision Module-LWE experiment for the secret s and error e: draw a uniform
module matrix A and run the distinguisher on A and A · s + e.
The random decision Module-LWE experiment: run the distinguisher on a uniform module matrix
A and an independent uniform vector b.
The real decision Module-LWE game for a secret law and an error law: draw s ← secretLaw and
e ← errorLaw, then run realExperiment s e.
The decision Module-LWE advantage of a distinguisher for a secret law and an error law.
The real game with the matrix drawn first, as key generation draws it.
Module-LWE is LWE over the negacyclic ring #
Module-LWE is LWE over Negacyclic (ZMod q) n. The Module-LWE advantage for a secret
law and an error law is the LWE advantage over the ring for their coefficientwise images, against
the distinguisher that reads coefficients.
Encoded samples #
Encoded real Module-LWE ensemble at each security parameter, for the secret law secret κ and
the error law error κ.
Distinguishers #
The input of a decision Module-LWE distinguisher with an m κ × d κ module matrix over
ℤ_{q κ}[X] / (X^{n κ} + 1): the security parameter κ, a module matrix A and a vector b,
which is A · s + e in the real experiment and uniform in the random one.
A decision Module-LWE input is determined by its words.
The encoding of a decision Module-LWE input: the framed unary security parameter followed by
the encoded pair (A, b) (encInput_apply). Its sample part is the word realEnsemble and
uniformEnsemble sample.
The decision Module-LWE input layout.
A decision Module-LWE distinguisher: given the security parameter κ, a module matrix A
and a vector b of the shape, degree and modulus at κ, it outputs a bit.
Distinguisher.IsPPT states its efficiency on encodings.
A decision Module-LWE distinguisher is PPT when one uniform strict PPT machine reads
encInput and writes the distinguisher's output bit.
Word-level distinguishers #
The typed distinguisher that runs a word-level distinguisher on the encoded pair (A, b).
A word-level distinguisher on the encoded real sample runs the real game for the same laws.
A word-level distinguisher on the encoded uniform sample runs the random game.
The decision Module-LWE assumption with an m κ × d κ module matrix over
ℤ_{q κ}[X] / (X^{n κ} + 1), secret law secret κ and error law error κ: every PPT
distinguisher has negligible advantage between ModuleLWE.realGame (secret κ) (error κ) and
ModuleLWE.randomGame.
With short laws this is the assumption of the CRYSTALS submissions, in asymptotic form. Kyber v3.02
([ABD+21], §4.3, p. 19) defines Adv^mlwe_{m,k,η} with (s, e) ← β_η^k × β_η^m for the
centered binomial law β_η, and its Module-LWER problem without compression (§4.4 and footnote 3,
pp. 21–22) draws s ← β_{η₁}^k and e ← β_{η₂}^m. Dilithium v3.1 ([BDK+21], §6.1,
p. 23) defines MLWE_{m,k,D} with s₁ ← D^k and s₂ ← D^m, and §6.2, eq. (6), p. 24 takes D
uniform on S_η. The sources define concrete advantages and take them to be small at their
parameter sets; here every uniform classical strict PPT distinguisher has negligible advantage over
the family. This is a hypothesis, not a theorem of hardness for any laws, and makes no claim about
quantum adversaries; with uniform errors it holds trivially.
The assumption is meaningful only for a family whose parameters grow with κ. When m, d, n,
q and the laws do not depend on κ, as at any FIPS 203 or FIPS 204 parameter set, the real and
random games are two fixed distributions. Unless the real sample is exactly uniform, a
polynomial-time distinguisher that looks the sample up in a fixed finite table has constant
advantage, so the assumption fails.
The decision Module-LWE assumption with an m κ × d κ module matrix over
ℤ_{q κ}[X] / (X^{n κ} + 1) and error law noise κ for each polynomial: every PPT distinguisher
has negligible advantage between ModuleLWE.realGame, with a uniform secret and independent
errors, and ModuleLWE.randomGame. It is DecisionModuleLWEWith for these laws
(decisionModuleLWE_iff_decisionModuleLWEWith). This is a hypothesis against uniform classical
strict PPT distinguishers, not a theorem of hardness or a claim about quantum adversaries.
Source. [DKL+18], Section 4.1, p. 249, defines the advantage against the decisional
MLWE_{m,k,D} problem over R_q = ℤ_q[X]/(X^n + 1) (Section 2.1, p. 242) for a distribution D
on R_q: the gap between (A, t) with A ← R_q^{m×k} and t ← R_q^m, and (A, A s₁ + s₂) with
s₁ ← D^k and s₂ ← D^m. Here k = d κ and the errors are drawn from D = noise κ. This
definition differs from the source as follows.
- The secret is uniform on
R_q^k, not drawn fromD^k. This form follows fromMLWE_{m,k,D}: a distinguisher for it, run on(A, t + A u)for an independent uniformu, has the same advantage there. ML-KEM and ML-DSA need the short secrets thatDecisionModuleLWEWithadmits. - The degree
n κand modulusq κare arbitrary, where Ducas et al. fixn = 256and the primeq = 8380417. - Every uniform classical strict PPT distinguisher has negligible advantage over the family, where the source defines a concrete advantage at one parameter set.
DecisionModuleLWE is DecisionModuleLWEWith for a uniform secret and independent polynomial
errors drawn from noise κ.
DecisionModuleLWEWith is the word-level decision Module-LWE assumption. Quantifying over
distinguishers that read the encoded sample as a word gives the same assumption as quantifying
over typed distinguishers. A typed distinguisher's machine reads exactly that word; conversely, a
word distinguisher is typed by encoding its input, and a typed one is a word distinguisher run on
that word (IsPPTOn.exists_bool_factor), since its output is a single bit.
Under DecisionModuleLWEWith, the encoded real and uniform samples are computationally
indistinguishable to word-level distinguishers.