Ring learning with errors

From HandWiki
Short description: Computational problem possibly useful for post-quantum cryptography

In post-quantum cryptography, ring learning with errors (RLWE) is a computational problem which serves as the foundation of new cryptographic algorithms, such as NewHope, designed to protect against cryptanalysis by quantum computers and also to provide the basis for homomorphic encryption. Public-key cryptography relies on construction of mathematical problems that are believed to be hard to solve if no further information is available, but are easy to solve if some information used in the problem construction is known. Some problems of this sort that are currently used in cryptography are at risk of attack if sufficiently large quantum computers can ever be built, so resistant problems are sought. Homomorphic encryption is a form of encryption that allows computation on ciphertext, such as arithmetic on numeric values stored in an encrypted database.

RLWE is more properly called learning with errors over rings and is simply the larger learning with errors (LWE) problem specialized to polynomial rings over finite fields.[1] Because of the presumed difficulty of solving the RLWE problem even on a quantum computer, RLWE based cryptography may form the fundamental base for public-key cryptography in the future just as the integer factorization and discrete logarithm problem have served as the base for public key cryptography since the early 1980s.[2] An important feature of basing cryptography on the ring learning with errors problem is the fact that the solution to the RLWE problem can be used to solve a version of the shortest vector problem (SVP) in a lattice (a polynomial-time reduction from this SVP problem to the RLWE problem has been presented[1]).

Background

The security of modern cryptography, in particular public-key cryptography, is based on the assumed intractability of solving certain computational problems if the size of the problem is large enough and the instance of the problem to be solved is chosen randomly. The classic example that has been used since the 1970s is the integer factorization problem. It is believed that it is computationally intractable to factor the product of two prime numbers if those prime numbers are large enough and chosen at random.[3] As of 2015 research has led to the factorization of the product of two 384-bit primes but not the product of two 512-bit primes. Integer factorization forms the basis of the widely used RSA cryptographic algorithm.

The ring learning with errors (RLWE) problem is built on the arithmetic of polynomials with coefficients from a finite field.[1] A typical polynomial [math]\displaystyle{ a(x) }[/math] is expressed as:

[math]\displaystyle{ a(x) = a_0 + a_1x + a_2x^2 + \ldots + a_{n-2}x^{n-2} + a_{n-1}x^{n-1} }[/math]

Polynomials can be added and multiplied in the usual fashion. In the RLWE context the coefficients of the polynomials and all operations involving those coefficients will be done in a finite field, typically the field [math]\displaystyle{ \mathbf{Z}/q\mathbf{Z} = \mathbf{F}_q }[/math] for a prime integer [math]\displaystyle{ q }[/math]. The set of polynomials over a finite field with the operations of addition and multiplication forms an infinite polynomial ring ([math]\displaystyle{ \mathbf{F}_q[x] }[/math]). The RLWE context works with a finite quotient ring of this infinite ring. The quotient ring is typically the finite quotient (factor) ring formed by reducing all of the polynomials in [math]\displaystyle{ \mathbf{F}_q[x] }[/math] modulo an irreducible polynomial [math]\displaystyle{ \Phi(x) }[/math]. This finite quotient ring can be written as [math]\displaystyle{ \mathbf{F}_q[x]/\Phi(x) }[/math] though many authors write [math]\displaystyle{ \mathbf{Z}_q[x]/\Phi(x) }[/math] .[1]

If the degree of the polynomial [math]\displaystyle{ \Phi(x) }[/math] is [math]\displaystyle{ n }[/math], the quotient ring becomes the ring of polynomials of degree less than [math]\displaystyle{ n }[/math] modulo [math]\displaystyle{ \Phi(x) }[/math] with coefficients from [math]\displaystyle{ F_q }[/math]. The values [math]\displaystyle{ n }[/math], [math]\displaystyle{ q }[/math], together with the polynomial [math]\displaystyle{ \Phi(x) }[/math] partially define the mathematical context for the RLWE problem.

Another concept necessary for the RLWE problem is the idea of "small" polynomials with respect to some norm. The typical norm used in the RLWE problem is known as the infinity norm (also called the uniform norm). The infinity norm of a polynomial is simply the largest coefficient of the polynomial when these coefficients are viewed as integers. Hence, [math]\displaystyle{ ||a(x)||_\infty = b }[/math] states that the infinity norm of the polynomial [math]\displaystyle{ a(x) }[/math] is [math]\displaystyle{ b }[/math]. Thus [math]\displaystyle{ b }[/math] is the largest coefficient of [math]\displaystyle{ a(x) }[/math].

The final concept necessary to understand the RLWE problem is the generation of random polynomials in [math]\displaystyle{ \mathbf{F}_q[x]/\Phi(x) }[/math] and the generation of "small" polynomials . A random polynomial is easily generated by simply randomly sampling the [math]\displaystyle{ n }[/math] coefficients of the polynomial from [math]\displaystyle{ \mathbf{F}_q }[/math], where [math]\displaystyle{ \mathbf{F}_q }[/math] is typically represented as the set [math]\displaystyle{ \{-(q-1)/2, ..., -1, 0, 1, ..., (q-1)/2\} }[/math].

Randomly generating a "small" polynomial is done by generating the coefficients of the polynomial from [math]\displaystyle{ \mathbf{F}_q }[/math] in a way that either guarantees or makes very likely small coefficients. When [math]\displaystyle{ q }[/math] is a prime integer, there are two common ways to do this:

  1. Using Uniform Sampling – The coefficients of the small polynomial are uniformly sampled from a set of small coefficients. Let [math]\displaystyle{ b }[/math] be an integer that is much less than [math]\displaystyle{ q }[/math]. If we randomly choose coefficients from the set: [math]\displaystyle{ \{ -b, -b+1, -b+2, \ldots , -2, -1, 0, 1, 2, \ldots , b-2, b-1, b \} }[/math] the polynomial will be small with respect to the bound ([math]\displaystyle{ b }[/math]).
  2. Using discrete Gaussian sampling – For an odd value for [math]\displaystyle{ q }[/math], the coefficients of the polynomial are randomly chosen by sampling from the set [math]\displaystyle{ \{ -(q-1)/2, \ldots , (q-1)/2 \} }[/math] according to a discrete Gaussian distribution with mean [math]\displaystyle{ 0 }[/math] and distribution parameter [math]\displaystyle{ \sigma }[/math]. The references describe in full detail how this can be accomplished. It is more complicated than uniform sampling but it allows for a proof of security of the algorithm. The paper "Sampling from Discrete Gaussians for Lattice-Based Cryptography on a Constrained Device" by Dwarakanath and Galbraith provide an overview of this problem.[4]

The RLWE Problem

The RLWE problem can be stated in two different ways: a "search" version and a "decision" version. Both begin with the same construction. Let

  • [math]\displaystyle{ a_i(x) }[/math] be a set of random but known polynomials from [math]\displaystyle{ \mathbf{F}_q[x]/\Phi(x) }[/math] with coefficients from all of [math]\displaystyle{ \mathbf{F}_q }[/math].
  • [math]\displaystyle{ e_i(x) }[/math] be a set of small random and unknown polynomials relative to a bound [math]\displaystyle{ b }[/math] in the ring [math]\displaystyle{ \mathbf{F}_q[x]/\Phi(x) }[/math].
  • [math]\displaystyle{ s(x) }[/math] be a small unknown polynomial relative to a bound [math]\displaystyle{ b }[/math] in the ring [math]\displaystyle{ \mathbf{F}_q[x]/\Phi(x) }[/math].
  • [math]\displaystyle{ b_i(x) = (a_i(x)\cdot s(x)) + e_i(x) }[/math].

The Search version entails finding the unknown polynomial [math]\displaystyle{ s(x) }[/math] given the list of polynomial pairs [math]\displaystyle{ ( a_i(x), b_i(x) ) }[/math].

The Decision version of the problem can be stated as follows. Given a list of polynomial pairs [math]\displaystyle{ ( a_i(x), b_i(x) ) }[/math], determine whether the [math]\displaystyle{ b_i(x) }[/math] polynomials were constructed as [math]\displaystyle{ b_i(x) = (a_i(x)\cdot s(x)) + e_i(x) }[/math] or were generated randomly from [math]\displaystyle{ \mathbf{F}_q[x]/\Phi(x) }[/math] with coefficients from all of [math]\displaystyle{ \mathbf{F}_q }[/math].

The difficulty of this problem is parameterized by the choice of the quotient polynomial ([math]\displaystyle{ \Phi(x) }[/math]), its degree ([math]\displaystyle{ n }[/math]), the field ([math]\displaystyle{ \mathbf{F}_q }[/math]), and the smallness bound ([math]\displaystyle{ b }[/math]). In many RLWE based public key algorithms the private key will be a pair of small polynomials [math]\displaystyle{ s(x) }[/math] and [math]\displaystyle{ e(x) }[/math]. The corresponding public key will be a pair of polynomials [math]\displaystyle{ a(x) }[/math], selected randomly from [math]\displaystyle{ \mathbf{F}_q[x]/\Phi(x) }[/math], and the polynomial [math]\displaystyle{ t(x)= (a(x)\cdot s(x)) + e(x) }[/math]. Given [math]\displaystyle{ a(x) }[/math] and [math]\displaystyle{ t(x) }[/math], it should be computationally infeasible to recover the polynomial [math]\displaystyle{ s(x) }[/math].

Security Reduction

In cases where the polynomial [math]\displaystyle{ \Phi(x) }[/math] is a cyclotomic polynomial, the difficulty of solving the search version of RLWE problem is equivalent to finding a short vector (but not necessarily the shortest vector) in an ideal lattice formed from elements of [math]\displaystyle{ \mathbf{Z}[x]/\Phi(x) }[/math] represented as integer vectors.[1] This problem is commonly known as the Approximate Shortest Vector Problem (α-SVP) and it is the problem of finding a vector shorter than α times the shortest vector. The authors of the proof for this equivalence write:

"... we give a quantum reduction from approximate SVP (in the worst case) on ideal lattices in [math]\displaystyle{ \mathbf{R} }[/math] to the search version of ring-LWE, where the goal is to recover the secret [math]\displaystyle{ s \in \mathbf{R}_q }[/math] (with high probability, for any [math]\displaystyle{ s }[/math]) from arbitrarily many noisy products."[1]

In that quote, The ring [math]\displaystyle{ \mathbf{R} }[/math] is [math]\displaystyle{ \mathbf{Z}[x]/\Phi(x) }[/math] and the ring [math]\displaystyle{ \mathbf{R}_q }[/math] is [math]\displaystyle{ \mathbf{F}_q[x]/\Phi(x) }[/math].

The α-SVP in regular lattices is known to be NP-hard due to work by Daniele Micciancio in 2001, although not for values of α required for a reduction to general learning with errors problem.[5] However, there is not yet a proof to show that the difficulty of the α-SVP for ideal lattices is equivalent to the average α-SVP. Rather we have a proof that if there are any α-SVP instances that are hard to solve in ideal lattices then the RLWE Problem will be hard in random instances.[1]

Regarding the difficulty of Shortest Vector Problems in Ideal Lattices, researcher Michael Schneider writes, "So far there is no SVP algorithm making use of the special structure of ideal lattices. It is widely believed that solving SVP (and all other lattice problems) in ideal lattices is as hard as in regular lattices."[6] The difficulty of these problems on regular lattices is provably NP-hard.[5] There are, however, a minority of researchers who do not believe that ideal lattices share the same security properties as regular lattices.[7]

Peikert believes that these security equivalences make the RLWE problem a good basis for future cryptography. He writes: "There is a mathematical proof that the only way to break the cryptosystem (within some formal attack model) on its random instances is by being able to solve the underlying lattice problem in the worst case" (emphasis in the original).[8]

RLWE Cryptography

A major advantage that RLWE based cryptography has over the original learning with errors (LWE) based cryptography is found in the size of the public and private keys. RLWE keys are roughly the square root of keys in LWE.[1] For 128 bits of security an RLWE cryptographic algorithm would use public keys around 7000 bits in length.[9] The corresponding LWE scheme would require public keys of 49 million bits for the same level of security.[1][failed verification] On the other hand, RLWE keys are larger than the keys sizes for currently used public key algorithms like RSA and Elliptic Curve Diffie-Hellman which require public key sizes of 3072 bits and 256 bits, respectively, to achieve a 128-bit level of security. From a computational standpoint, however, RLWE algorithms have been shown to be the equal of or better than existing public key systems.[10]

Three groups of RLWE cryptographic algorithms exist:

Ring learning with errors key exchanges (RLWE-KEX)

Main page: Ring learning with errors key exchange

The fundamental 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 basic idea comes from the associativity of matrix multiplications, and the errors are used to provide the security. The paper[11] appeared in 2012 after a provisional patent application was filed in 2012.

In 2014, Peikert[12] presented a key transport scheme following the same basic idea of Ding's, where the new idea of sending additional 1 bit signal for rounding in Ding's construction is also utilized. An RLWE version of the classic MQV variant of a Diffie-Hellman key exchange was later published by Zhang et al.[13] The security of both key exchanges is directly related to the problem of finding approximate short vectors in an ideal lattice.

Ring learning with errors signature (RLWE-SIG)

Main page: Ring learning with errors signature

A RLWE version of the classic Feige–Fiat–Shamir Identification protocol was created and converted to a digital signature in 2011 by Lyubashevsky.[14] The details of this signature were extended in 2012 by Gunesyu, Lyubashevsky, and Popplemann in 2012 and published in their paper "Practical Lattice Based Cryptography – A Signature Scheme for Embedded Systems."[15] These papers laid the groundwork for a variety of recent signature algorithms some based directly on the ring learning with errors problem and some which are not tied to the same hard RLWE problems.[16]

Ring learning with errors homomorphic encryption (RLWE-HOM)

Main page: Homomorphic encryption

The purpose of homomorphic encryption is to allow the computations on sensitive data to occur on computing devices that should not be trusted with the data. These computing devices are allowed to process the ciphertext which is output from a homomorphic encryption. In 2011, Brakersky and Vaikuntanathan, published "Fully Homomorphic Encryption from Ring-LWE and Security for Key Dependent Messages" which builds a homomorphic encryption scheme directly on the RLWE problem.[17]

References

  1. 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 Lyubashevsky, Vadim; Peikert, Chris; Regev, Oded (2012). "On Ideal Lattices and Learning with Errors Over Rings". Cryptology ePrint Archive. http://eprint.iacr.org/2012/230. 
  2. Peikert, Chris (2014). "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. 
  3. Shor, Peter (20 November 1994). "Algorithms for quantum computation: discrete logarithms and factoring". 35th Annual Symposium on Foundations of Computer Science. Santa Fe: IEEE. doi:10.1109/SFCS.1994.365700. ISBN 0-8186-6580-7. "This paper gives Las Vegas algorithms for finding discrete logarithms and factoring integers on a quantum computer that take a number of steps which is polynomial in the input size, e.g., the number of digits of the integer to be factored. These two problems are generally considered hard on a classical computer and have been used as the basis of several proposed cryptosystems." 
  4. Dwarakanath, Nagarjun C.; Galbraith, Steven D. (2014-03-18). "Sampling from discrete Gaussians for lattice-based cryptography on a constrained device". Applicable Algebra in Engineering, Communication and Computing 25 (3): 159–180. doi:10.1007/s00200-014-0218-3. ISSN 0938-1279. 
  5. 5.0 5.1 Micciancio, D. (January 1, 2001). "The Shortest Vector in a Lattice is Hard to Approximate to within Some Constant". SIAM Journal on Computing 30 (6): 2008–2035. doi:10.1137/S0097539700373039. ISSN 0097-5397. 
  6. Schneider, Michael (2011). "Sieving for Shortest Vectors in Ideal Lattices". Cryptology ePrint Archive. http://eprint.iacr.org/2011/458. 
  7. "cr.yp.to: 2014.02.13: A subfield-logarithm attack against ideal lattices". http://blog.cr.yp.to/20140213-ideal.html. 
  8. "What does GCHQ's "cautionary tale" mean for lattice cryptography?". http://web.eecs.umich.edu/~cpeikert/soliloquy.html. 
  9. Singh, Vikram (2015). "A Practical Key Exchange for the Internet using Lattice Cryptography". Cryptology ePrint Archive. http://eprint.iacr.org/2015/138. 
  10. Verbauwhede, Ruan de Clercq, Sujoy Sinha Roy, Frederik Vercauteren, Ingrid (2014). "Efficient Software Implementation of Ring-LWE Encryption". Cryptology ePrint Archive. http://eprint.iacr.org/2014/725. 
  11. Ding, Jintai; Xie, Xiang; Lin, Xiaodong (2012-01-01). "A Simple Provably Secure Key Exchange Scheme Based on the Learning with Errors Problem". Cryptology ePrint Archive. http://eprint.iacr.org/2012/688. 
  12. Peikert, Chris (2014-01-01). "Lattice Cryptography for the Internet". Cryptology ePrint Archive. http://eprint.iacr.org/2014/070. 
  13. Zhang, Jiang; Zhang, Zhenfeng; Ding, Jintai; Snook, Michael; Dagdelen, Özgür (2014). "Authenticated Key Exchange from Ideal Lattices". Cryptology ePrint Archive. http://eprint.iacr.org/2014/589. 
  14. Lyubashevsky, Vadim (2011). "Lattice Signatures Without Trapdoors". Cryptology ePrint Archive. http://eprint.iacr.org/2011/537. 
  15. Güneysu, Tim; Lyubashevsky, Vadim; Pöppelmann, Thomas (2012). Prouff, Emmanuel. ed. Practical Lattice-Based Cryptography: A Signature Scheme for Embedded Systems. Lecture Notes in Computer Science. Springer Berlin Heidelberg. pp. 530–547. doi:10.1007/978-3-642-33027-8_31. ISBN 978-3-642-33026-1. 
  16. "BLISS Signature Scheme". http://bliss.di.ens.fr/. 
  17. Brakerski, Zvika; Vaikuntanathan, Vinod (2011). Rogaway, Phillip. ed. Fully Homomorphic Encryption from Ring-LWE and Security for Key Dependent Messages. Lecture Notes in Computer Science. Springer Berlin Heidelberg. pp. 505–524. doi:10.1007/978-3-642-22792-9_29. ISBN 978-3-642-22791-2.