Learning with errors

From HandWiki
Short description: Mathematical problem in cryptography

In cryptography, learning with errors (LWE) is a mathematical problem that is widely used to create secure encryption algorithms.[1] It is based on the idea of representing secret information as a set of equations with errors. In other words, LWE is a way to hide the value of a secret by introducing noise to it.[2] In more technical terms, it refers to the computational problem of inferring a linear n-ary function f over a finite ring from given samples yi=f(𝐱i) some of which may be erroneous. The LWE problem is conjectured to be hard to solve,[1] and thus to be useful in cryptography.

More precisely, the LWE problem is defined as follows. Let q denote the ring of integers modulo q and let qn denote the set of n-vectors over q. There exists a certain unknown linear function f:qnq, and the input to the LWE problem is a sample of pairs (𝐱,y), where 𝐱qn and yq, so that with high probability y=f(𝐱). Furthermore, the deviation from the equality is according to some known noise model. The problem calls for finding the function f, or some close approximation thereof, with high probability.

The LWE problem was introduced by Oded Regev in 2005[3] (who won the 2018 Gödel Prize for this work), it is a generalization of the parity learning problem. Regev showed that the LWE problem is as hard to solve as several worst-case lattice problems. Subsequently, the LWE problem has been used as a hardness assumption to create public-key cryptosystems,[3][4] such as the ring learning with errors key exchange by Peikert.[5]

Definition

Denote by 𝕋=/ the additive group on reals modulo one. Let 𝐬qn be a fixed vector. Let ϕ be a fixed probability distribution over 𝕋. Denote by A𝐬,ϕ the distribution on qn×𝕋 obtained as follows.

  1. Pick a vector 𝐚qn from the uniform distribution over qn,
  2. Pick a number e𝕋 from the distribution ϕ,
  3. Evaluate t=𝐚,𝐬/q+e, where 𝐚,𝐬=i=1naisi is the standard inner product in qn, the division is done in the field of reals (or more formally, this "division by q" is notation for the group homomorphism q𝕋 mapping 1q to 1/q+𝕋), and the final addition is in 𝕋.
  4. Output the pair (𝐚,t).

The learning with errors problem LWEq,ϕ is to find 𝐬qn, given access to polynomially many samples of choice from A𝐬,ϕ.

For every α>0, denote by Dα the one-dimensional Gaussian with zero mean and variance α2/(2π), that is, the density function is Dα(x)=ρα(x)/α where ρα(x)=eπ(|x|/α)2, and let Ψα be the distribution on 𝕋 obtained by considering Dα modulo one. The version of LWE considered in most of the results would be LWEq,Ψα

Decision version

The LWE problem described above is the search version of the problem. In the decision version (DLWE), the goal is to distinguish between noisy inner products and uniformly random samples from qn×𝕋 (practically, some discretized version of it). Regev[3] showed that the decision and search versions are equivalent when q is a prime bounded by some polynomial in n.

Intuitively, if we have a procedure for the search problem, the decision version can be solved easily: just feed the input samples for the decision problem to the solver for the search problem. Denote the given samples by {(𝐚i,𝐛i)}qn×𝕋. If the solver returns a candidate 𝐬, for all i, calculate {𝐚i,𝐬𝐛i}. If the samples are from an LWE distribution, then the results of this calculation will be distributed according χ, but if the samples are uniformly random, these quantities will be distributed uniformly as well.

Solving search assuming decision

For the other direction, given a solver for the decision problem, the search version can be solved as follows: Recover 𝐬 one coordinate at a time. To obtain the first coordinate, 𝐬1, make a guess kZq, and do the following. Choose a number rq uniformly at random. Transform the given samples {(𝐚i,𝐛i)}qn×𝕋 as follows. Calculate {(𝐚i+(r,0,,0),𝐛i+(rk)/q)}. Send the transformed samples to the decision solver.

If the guess k was correct, the transformation takes the distribution A𝐬,χ to itself, and otherwise, since q is prime, it takes it to the uniform distribution. So, given a polynomial-time solver for the decision problem that errs with very small probability, since q is bounded by some polynomial in n, it only takes polynomial time to guess every possible value for k and use the solver to see which one is correct.

After obtaining 𝐬1, we follow an analogous procedure for each other coordinate 𝐬j. Namely, we transform our 𝐛i samples the same way, and transform our 𝐚i samples by calculating 𝐚i+(0,,r,,0), where the r is in the jth coordinate.[3]

Peikert[4] showed that this reduction, with a small modification, works for any q that is a product of distinct, small (polynomial in n) primes. The main idea is if q=q1q2qt, for each q, guess and check to see if 𝐬j is congruent to 0modq, and then use the Chinese remainder theorem to recover 𝐬j.

Average case hardness

Regev[3] showed the random self-reducibility of the LWE and DLWE problems for arbitrary q and χ. Given samples {(𝐚i,𝐛i)} from A𝐬,χ, it is easy to see that {(𝐚i,𝐛i+𝐚i,𝐭)/q} are samples from A𝐬+𝐭,χ.

So, suppose there was some set 𝒮qn such that |𝒮|/|qn|=1/poly(n), and for distributions A𝐬,χ, with 𝐬𝒮, DLWE was easy.

Then there would be some distinguisher 𝒜, who, given samples {(𝐚i,𝐛i)}, could tell whether they were uniformly random or from A𝐬,χ. If we need to distinguish uniformly random samples from A𝐬,χ, where 𝐬 is chosen uniformly at random from qn, we could simply try different values 𝐭 sampled uniformly at random from qn, calculate {(𝐚i,𝐛i+𝐚i,𝐭)/q} and feed these samples to 𝒜. Since 𝒮 comprises a large fraction of qn, with high probability, if we choose a polynomial number of values for 𝐭, we will find one such that 𝐬+𝐭𝒮, and 𝒜 will successfully distinguish the samples.

Thus, no such 𝒮 can exist, meaning LWE and DLWE are (up to a polynomial factor) as hard in the average case as they are in the worst case.

Hardness results

Regev's result

For a n-dimensional lattice L, let smoothing parameter ηε(L) denote the smallest s such that ρ1/s(L*{𝟎})ε where L* is the dual of L and ρα(x)=eπ(|x|/α)2 is extended to sets by summing over function values at each element in the set. Let DL,r denote the discrete Gaussian distribution on L of width r for a lattice L and real r>0. The probability of each xL is proportional to ρr(x).

The discrete Gaussian sampling problem(DGS) is defined as follows: An instance of DGSϕ is given by an n-dimensional lattice L and a number rϕ(L). The goal is to output a sample from DL,r. Regev shows that there is a reduction from GapSVP100nγ(n) to DGSnγ(n)/λ(L*) for any function γ(n)1.

Regev then shows that there exists an efficient quantum algorithm for DGS2nηε(L)/α given access to an oracle for LWEq,Ψα for integer q and α(0,1) such that αq>2n. This implies the hardness for LWE. Although the proof of this assertion works for any q, for creating a cryptosystem, the modulus q has to be polynomial in n.

Peikert's result

Peikert proves[4] that there is a probabilistic polynomial time reduction from the GapSVPζ,γ problem in the worst case to solving LWEq,Ψα using poly(n) samples for parameters α(0,1), γ(n)n/(αlogn), ζ(n)γ(n) and q(ζ/n)ωlogn).

Use in cryptography

The LWE problem serves as a versatile problem used in construction of several[3][4][6][7] cryptosystems. In 2005, Regev[3] showed that the decision version of LWE is hard assuming quantum hardness of the lattice problems GapSVPγ (for γ as above) and SIVPt with t=O(n/α)). In 2009, Peikert[4] proved a similar result assuming only the classical hardness of the related problem GapSVPζ,γ. The disadvantage of Peikert's result is that it bases itself on a non-standard version of an easier (when compared to SIVP) problem GapSVP.

Public-key cryptosystem

Regev[3] proposed a public-key cryptosystem based on the hardness of the LWE problem. The cryptosystem as well as the proof of security and correctness are completely classical. The system is characterized by m,q and a probability distribution χ on 𝕋. The setting of the parameters used in proofs of correctness and security is

  • q2, usually a prime number between n2 and 2n2.
  • m=(1+ε)(n+1)logq for an arbitrary constant ε
  • χ=Ψα(n) for α(n)o(1/nlogn), where Ψβ is a probability distribution obtained by sampling a normal variable with mean 0 and standard variation β2π and reducing the result modulo 1.

The cryptosystem is then defined by:

  • Private key: Private key is an 𝐬qn chosen uniformly at random.
  • Public key: Choose m vectors 𝐚1,,𝐚mqn uniformly and independently. Choose error offsets e1,,em𝕋 independently according to χ. The public key consists of (𝐚i,bi=𝐚i,𝐬/q+ei)i=1m
  • Encryption: The encryption of a bit x{0,1} is done by choosing a random subset S of [m] and then defining Enc(x) as
(iS𝐚i,x2+iSbi)
  • Decryption: The decryption of (𝐚,b) is 0 if b𝐚,𝐬/q is closer to 0 than to 12, and 1 otherwise.

The proof of correctness follows from choice of parameters and some probability analysis. The proof of security is by reduction to the decision version of LWE: an algorithm for distinguishing between encryptions (with above parameters) of 0 and 1 can be used to distinguish between As,χ and the uniform distribution over qn×𝕋

CCA-secure cryptosystem

Peikert[4] proposed a system that is secure even against any chosen-ciphertext attack.

Key exchange

The idea of using LWE and Ring LWE for key exchange was proposed and filed at the University of Cincinnati in 2011 by Jintai Ding. The idea comes from the associativity of matrix multiplications, and the errors are used to provide the security. The paper[8] appeared in 2012 after a provisional patent application was filed in 2012.

The security of the protocol is proven based on the hardness of solving the LWE problem. In 2014, Peikert presented a key-transport scheme[9] following the same basic idea of Ding's, where the new idea of sending an additional 1-bit signal for rounding in Ding's construction is also used. The "new hope" implementation[10] selected for Google's post-quantum experiment,[11] uses Peikert's scheme with variation in the error distribution.

See also

References

  1. 1.0 1.1 Regev, Oded (2009). "On lattices, learning with errors, random linear codes, and cryptography". Journal of the ACM 56 (6): 1–40. doi:10.1145/1568318.1568324. 
  2. Lyubashevsky, Vadim; Peikert, Chris; Regev, Oded (November 2013). "On Ideal Lattices and Learning with Errors over Rings" (in en). Journal of the ACM 60 (6): 1–35. doi:10.1145/2535925. ISSN 0004-5411. https://dl.acm.org/doi/10.1145/2535925. 
  3. 3.0 3.1 3.2 3.3 3.4 3.5 3.6 3.7 Oded Regev, “On lattices, learning with errors, random linear codes, and cryptography,” in Proceedings of the thirty-seventh annual ACM symposium on Theory of computing (Baltimore, MD, USA: ACM, 2005), 84–93, http://portal.acm.org/citation.cfm?id=1060590.1060603.
  4. 4.0 4.1 4.2 4.3 4.4 4.5 Chris Peikert, “Public-key cryptosystems from the worst-case shortest vector problem: extended abstract,” in Proceedings of the 41st annual ACM symposium on Theory of computing (Bethesda, MD, USA: ACM, 2009), 333–342, http://portal.acm.org/citation.cfm?id=1536414.1536461.
  5. Peikert, Chris (2014-10-01). "Lattice Cryptography for the Internet". in Mosca, Michele. Post-Quantum Cryptography. Lecture Notes in Computer Science. 8772. Springer International Publishing. pp. 197–219. doi:10.1007/978-3-319-11659-4_12. ISBN 978-3-319-11658-7. 
  6. Chris Peikert and Brent Waters, “Lossy trapdoor functions and their applications,” in Proceedings of the 40th annual ACM symposium on Theory of computing (Victoria, British Columbia, Canada: ACM, 2008), 187-196, http://portal.acm.org/citation.cfm?id=1374406.
  7. Craig Gentry, Chris Peikert, and Vinod Vaikuntanathan, “Trapdoors for hard lattices and new cryptographic constructions,” in Proceedings of the 40th annual ACM symposium on Theory of computing (Victoria, British Columbia, Canada: ACM, 2008), 197-206, http://portal.acm.org/citation.cfm?id=1374407.
  8. Lin, Jintai Ding, Xiang Xie, Xiaodong (2012-01-01). "A Simple Provably Secure Key Exchange Scheme Based on the Learning with Errors Problem". Cryptology ePrint Archive. https://eprint.iacr.org/2012/688. 
  9. Peikert, Chris (2014-01-01). "Lattice Cryptography for the Internet". Cryptology ePrint Archive. https://eprint.iacr.org/2014/070. 
  10. Alkim, Erdem; Ducas, Léo; Pöppelmann, Thomas; Schwabe, Peter (2015-01-01). "Post-quantum key exchange - a new hope". Cryptology ePrint Archive. https://eprint.iacr.org/2015/1092. 
  11. "Experimenting with Post-Quantum Cryptography" (in en-US). Google Online Security Blog. https://security.googleblog.com/2016/07/experimenting-with-post-quantum.html.