Decision LWE #
The decision learning-with-errors experiments over a finite commutative ring R
([Reg09], [GSW13], Section 2): the real experiment LWE.realExperiment
draws a uniform matrix A and gives the distinguisher A and A *ᵥ s + e for a secret s and
an error vector e; the random experiment LWE.randomExperiment gives it a uniform pair. For a
secret law and an error law, the real game LWE.realGame draws s and e and runs the real
experiment, LWE.randomGame runs the random one, and LWE.advantage is the distance between them.
DecisionLWE n m w noise is the asymptotic assumption at modulus 2 ^ w κ, with n κ secret
coordinates and m κ samples: every distinguisher that is uniform strict PPT on encodings
(LWE.Distinguisher.IsPPT) has negligible advantage between the real game with a uniform secret
and independent errors from noise κ and the random game. A distinguisher machine reads the unary
security parameter and the row-major binary word of the matrix [b | A] (LWE.encInput_apply).
A distinguisher outputs a bit, so DecisionLWE is the same assumption as the indistinguishability
of the encoded real and uniform matrices LWE.realEnsemble and LWE.uniformEnsemble against
word-level distinguishers (decisionLWE_iff_encoded). Clients that reduce on encoded words use
DecisionLWE.encoded.
DecisionLWE is a hypothesis against uniform classical strict polynomial-time programs. It makes no
assertion of hardness for any particular parameter or error family. In particular, using a bounded
noise distribution does not identify it with a discrete Gaussian or establish a worst-case lattice
reduction.
Main definitions #
Cslib.Crypto.LWE.realExperiment,Cslib.Crypto.LWE.randomExperiment: the fixed-instance experiments over a finite commutative ring.Cslib.Crypto.LWE.realGame,Cslib.Crypto.LWE.randomGame,Cslib.Crypto.LWE.advantage: the games and advantage for a secret law and an error law.Cslib.Crypto.LWE.augmentedMatrix: the matrix[b | A]of an LWE sample.Cslib.Crypto.LWE.Input,Cslib.Crypto.LWE.encInput: the input of a distinguisher at modulus2 ^ w κand its encoding.Cslib.Crypto.LWE.Distinguisher,Cslib.Crypto.LWE.Distinguisher.IsPPT: typed distinguishers and their efficiency.Cslib.Crypto.DecisionLWE: the decision-LWE assumption.Cslib.Crypto.DecisionLWEWithErrors: the same assumption with a joint law on the error vector, novel to this library. It has the form of [FMR20], Definition 4.5, but at modulus2 ^ w κ, outside that definition's range of primeq = poly(n).Cslib.Crypto.LWE.publicMatrix,Cslib.Crypto.LWE.publicMatrixLaw: the matrix[B * t + e | B]and its law, as produced by key generation.Cslib.Crypto.LWE.realEnsemble,Cslib.Crypto.LWE.uniformEnsemble: the encoded matrices.
Main results #
Cslib.Crypto.decisionLWE_iff_encoded:DecisionLWEis the word-level assumption.Cslib.Crypto.decisionLWE_iff_decisionLWEWithErrors:DecisionLWEis the case of independent error coordinates.Cslib.Crypto.LWE.realGame_uniform_error_eq_randomGame,Cslib.Crypto.LWE.advantage_uniform_error_eq_zero: with uniform errors the real game is the random game, so every distinguisher has advantage0.Cslib.Crypto.LWE.uniformOfFintype_augmentedMatrix:[b | A]of a uniform pair is uniform.Cslib.Crypto.LWE.length_of_mem_support_realEnsemble: every real sample has the declared length.Cslib.Crypto.LWE.length_of_mem_support_uniformEnsemble: the comparison uses the same length.
References #
- O. Regev, On lattices, learning with errors, random linear codes, and cryptography
- C. Gentry, A. Sahai and B. Waters, Homomorphic Encryption from Learning with Errors: Conceptually-Simpler, Asymptotically-Faster, Attribute-Based, Section 2
- B. Fuller, X. Meng and L. Reyzin, Computational Fuzzy Extractors
Encoded matrices #
The real public word contains exactly one fixed-width residue for each matrix entry.
Uniform public words have the same complete serialized length as real public words.
Fixed-instance experiments #
The real decision-LWE experiment for the secret s and error e: draw a uniform matrix A
and run the distinguisher on A and A *ᵥ s + e.
The real decision-LWE game for a secret law and an error law: draw s ← secretLaw and
e ← errorLaw, then run realExperiment s e.
The decision-LWE advantage of a distinguisher for a secret law and an error law.
With uniform errors the real game is the random game, for every secret law: A *ᵥ s + e is
uniform and independent of (A, s).
The matrix of a sample #
[b | A] for a uniform matrix A and an independent uniform vector b is uniform.
Distinguishers at modulus 2 ^ w #
The input of a decision-LWE distinguisher with n κ secret coordinates, m κ samples and
modulus 2 ^ w κ: the security parameter κ, a matrix A and a vector b, which is
A *ᵥ s + e in the real experiment and uniform in the random one.
- secParam : ℕ
The security parameter, given to machines in unary.
The public matrix.
The target vector.
A decision-LWE input is determined by its words.
The encoding of a decision-LWE input: the framed unary security parameter followed by the
row-major binary word of [b | A] (encInput_apply). Its matrix part is the word realEnsemble
and uniformEnsemble sample.
The decision-LWE input layout.
The security parameter of a decision-LWE input is computable in polynomial time from its encoding.
The word of the matrix [b | A] of a decision-LWE input is computable in polynomial time from
its encoding.
A decision-LWE distinguisher: given the security parameter κ, a matrix A and a vector b
of the dimensions and modulus at κ, it outputs a bit. Distinguisher.IsPPT states its
efficiency on encodings.
A decision-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 binary word of [b | A].
A word-level distinguisher on the encoded real matrix runs the real game with a uniform secret
and independent errors from noise κ.
A word-level distinguisher on the encoded uniform matrix runs the random game.
The decision-LWE assumption with n κ secret coordinates, m κ samples, modulus 2 ^ w κ
and a joint law errors κ on the whole error vector: every PPT distinguisher has negligible
advantage between LWE.realGame, with a uniform secret and an error vector drawn from errors κ,
and LWE.randomGame. The coordinates of the error vector need not be independent or identically
distributed, which is the form needed when a noisy source supplies the errors, as in the LWE fuzzy
extractor. DecisionLWE is the case of independent coordinates. This is a hypothesis against
uniform classical strict PPT distinguishers, not a theorem of hardness or a claim about quantum
adversaries; whether it holds depends on the error laws.
Status. This assumption is novel to this library. It has the form of dist-LWE_{n,m,q,χ} of
[FMR20], Definition 4.5 (p. 13 of the ePrint revision of June 23, 2020), with
χ := errors κ an arbitrary distribution on the whole error vector, but at modulus 2 ^ w κ,
outside that definition's range of prime q = poly(n): the two ranges meet only at q = 2.
Fuller, Meng and Reyzin use the source reading W as that error law (Section 4, p. 11):
Lemma 4.7 (p. 14) assumes Definition 4.5 in dimension n - k for any χ, and Theorem 4.11
(p. 17) assumes it for the uniform source over 𝒵^m, where 𝒵 = [−2^{b−1}, 2^{b−1}].
Relation to standard assumptions. DecisionLWE is the case of independent coordinates
(decisionLWE_iff_decisionLWEWithErrors). For other laws, neither this assumption nor FMR's
prime-modulus form is proved or cited to imply the other, and hardness can differ between the two
moduli for the same law. Take an error law supported on even residues. At each κ with
w κ > 0 and m κ > n κ, reducing A and b modulo 2 and testing whether A s ≡ b (mod 2)
has a solution separates the games: in the real game it always has one, and in the random game
with probability at most 2 ^ (n κ - m κ) ≤ 1/2. At w κ = 0 the modulus is 1 and the two games
coincide. The test needs n κ, m κ and w κ to locate the entries in its input, so it is PPT
when n, m and w are computable in polynomial time in unary, and the assumption then fails if
w κ > 0 and m κ > n κ for infinitely many κ. At an odd prime q, multiplying by 2⁻¹
turns errors 2 e' into e'.
Deviations from Definition 4.5.
- The modulus
2 ^ w κreplaces the primeq = poly(n), which FMR need for decoding (footnote 2, p. 13), andwmay make it superpolynomial. FMR's evidence for the assumption does not cover this modulus: Theorems 4.6 and 4.8 (pp. 13–14), which derive it for uniform-interval errors from LWE with Gaussian errors, and Theorem 5.2 (p. 18), which derives it for symbol-fixing sources from uniform errors, are all for primeq. - Distinguishers are uniform strict PPT programs and the advantage must be negligible, where
Definition 4.5 is concrete: advantage at most
εagainst distinguishers of sizes_sec. - The theorem that assumes it chooses the dimension.
FuzzyExtractor.computationallySecure_lweFuzzyExtractor_of_decisionLWEWithErrorsassumes it in dimensionl = n - k, following Lemma 4.7, where Theorem 4.11 writesdist-LWE(n,m,q,𝒵^m)in dimensionn; hardness in dimensionn - kimplies hardness in dimensionn. n,mandware arbitrary functions of a separate security parameterκ, where Definition 4.5 takesnas the security parameter andm, q = poly(n). A distinguisher's clock is polynomial in the length of its encoded input (LWE.Distinguisher.IsPPT), which is framed unaryκfollowed by them κ * (n κ + 1) * w κbits of[b | A](LWE.encInput). For arbitraryn,mandwthat length need not be polynomial inκ. When they are computable in polynomial time in unary, as the theorem that assumes it requires, the length is at leastκand polynomial inκ, so the clock is polynomial inκ. A family whose dimension grows slowly inκ, such asn κ = ⌊log κ⌋, then asks for hardness against adversaries superpolynomial in the dimension, which is more than standard LWE asks.
Plausibility. It is the problem that FMR study, moved to the modulus of the library's
DecisionLWE, its case of independent coordinates. At prime modulus, FMR derive it from LWE with
Gaussian errors, directly for uniform-interval sources (Theorems 4.6 and 4.8) and through them for
symbol-fixing sources (Theorem 5.2). No such derivation at modulus 2 ^ w κ is proved here or
cited, and whether the assumption holds depends on the error law.
The decision-LWE assumption with n κ secret coordinates, m κ samples, modulus 2 ^ w κ
and error law noise κ for each coordinate: every PPT distinguisher has negligible advantage
between LWE.realGame, with a uniform secret and independent errors, and LWE.randomGame. It is
DecisionLWEWithErrors for the product error law (decisionLWE_iff_decisionLWEWithErrors). This
is a hypothesis against uniform classical strict PPT distinguishers, not a theorem of hardness or a
claim about quantum adversaries.
Source. [Reg09] (the author's version of May 2, 2009), Section 2, p. 15, defines, for any
integer p ≥ 2 and any distribution χ on ℤ_p, the distribution A_{s,χ} of pairs
(a, ⟨a, s⟩ + e) with a uniform on ℤ_pⁿ and e ← χ, and the search problem LWE_{p,χ}.
Section 4, Lemma 4.1, p. 30, concerns the decision variant: distinguishing A_{s,χ} from the
uniform distribution for a non-negligible fraction of the secrets s. Here the secret is uniform
and the advantage is averaged over it. This definition differs from the source as follows.
- The modulus is
2 ^ w κ, a restriction of Regev's range of integersp ≥ 2(Section 2, p. 15); atw κ = 0it is1, where the real and random games coincide. Regev's worst-case hardness for the decision variant covers none of these moduli: his decision-to-search reduction, Lemma 4.2, p. 31, needs a primep ≤ poly(n), which leaves only2, and his main theorem, Theorem 3.1, p. 18, needsαp > 2√nwithα < 1, which fails atp = 2. - The distinguisher receives exactly
m κsamples, as the rows ofAandb, where Regev's algorithms draw samples fromA_{s,χ}as they need them. - The noise law is arbitrary; Regev's hardness results are for Gaussian noise (
Ψ_α, and its discretizationΨ̄_αfor the decision variant). - Distinguishers are uniform classical strict PPT programs in the security parameter
κ, where Regev's efficient algorithms run in time polynomial inn.
DecisionLWE is DecisionLWEWithErrors for the error vector with independent coordinates
drawn from noise κ.
DecisionLWE is the word-level decision-LWE assumption. Quantifying over distinguishers
that read the encoded matrix [b | A] 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 DecisionLWE, the encoded real and uniform matrices are computationally
indistinguishable to word-level distinguishers.