Ring Learning With Errors Key Exchange
   HOME

TheInfoList



OR:

In
cryptography Cryptography, or cryptology (from grc, , translit=kryptós "hidden, secret"; and ''graphein'', "to write", or ''-logia'', "study", respectively), is the practice and study of techniques for secure communication in the presence of adver ...
, a public key exchange algorithm is a
cryptographic algorithm In cryptography, encryption is the process of encoding information. This process converts the original representation of the information, known as plaintext, into an alternative form known as ciphertext. Ideally, only authorized parties can decip ...
which allows two parties to create and share a secret key, which they can use to encrypt messages between themselves. The
ring learning with errors 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 ...
key exchange (RLWE-KEX) is one of a new class of public key exchange algorithms that are designed to be secure against an adversary that possesses a
quantum computer Quantum computing is a type of computation whose operations can harness the phenomena of quantum mechanics, such as superposition, interference, and entanglement. Devices that perform quantum computations are known as quantum computers. Though ...
. This is important because some
public key algorithm Public-key cryptography, or asymmetric cryptography, is the field of cryptographic systems that use pairs of related keys. Each key pair consists of a public key and a corresponding private key. Key pairs are generated with cryptographic alg ...
s in use today will be easily broken by a quantum computer if such computers are implemented. RLWE-KEX is one of a set of post-quantum cryptographic algorithms which are based on the difficulty of solving certain mathematical problems involving lattices. Unlike older lattice based cryptographic algorithms, the RLWE-KEX is provably reducible to a known hard problem in lattices.


Background

Since the 1980s the security of cryptographic
key exchange Key exchange (also key establishment) is a method in cryptography by which cryptographic keys are exchanged between two parties, allowing use of a cryptographic algorithm. If the sender and receiver wish to exchange encrypted messages, each m ...
s and
digital signature A digital signature is a mathematical scheme for verifying the authenticity of digital messages or documents. A valid digital signature, where the prerequisites are satisfied, gives a recipient very high confidence that the message was created b ...
s over the Internet has been primarily based on a small number of
public key Public-key cryptography, or asymmetric cryptography, is the field of cryptographic systems that use pairs of related keys. Each key pair consists of a public key and a corresponding private key. Key pairs are generated with cryptographic alg ...
algorithms. The security of these algorithms is based on a similarly small number of computationally hard problems in classical computing. These problems are the difficulty of factoring the product of two carefully chosen prime numbers, the difficulty to compute
discrete logarithms In mathematics, for given real numbers ''a'' and ''b'', the logarithm log''b'' ''a'' is a number ''x'' such that . Analogously, in any group ''G'', powers ''b'k'' can be defined for all integers ''k'', and the discrete logarithm log''b'' ...
in a carefully chosen finite field, and the difficulty of computing discrete logarithms in a carefully chosen
elliptic curve In mathematics, an elliptic curve is a smooth, projective, algebraic curve of genus one, on which there is a specified point . An elliptic curve is defined over a field and describes points in , the Cartesian product of with itself. If ...
group. These problems are very difficult to solve on a classical computer (the type of computer the world has known since the 1940s through today) but are rather easily solved by a relatively small
quantum computer Quantum computing is a type of computation whose operations can harness the phenomena of quantum mechanics, such as superposition, interference, and entanglement. Devices that perform quantum computations are known as quantum computers. Though ...
using only 5 to 10 thousand of bits of memory. There is optimism in the computer industry that larger scale quantum computers will be available around 2030. If a
quantum computer Quantum computing is a type of computation whose operations can harness the phenomena of quantum mechanics, such as superposition, interference, and entanglement. Devices that perform quantum computations are known as quantum computers. Though ...
of sufficient size were built, all of the public key algorithms based on these three classically hard problems would be insecure. This public key cryptography is used today to secure Internet websites, protect computer login information, and prevent our computers from accepting malicious software. Cryptography that is not susceptible to attack by a quantum computer is referred to as quantum safe, or
post-quantum cryptography In cryptography, post-quantum cryptography (sometimes referred to as quantum-proof, quantum-safe or quantum-resistant) refers to cryptographic algorithms (usually public-key algorithms) that are thought to be secure against a cryptanalytic attack b ...
. One class of quantum resistant cryptographic algorithms is based on a concept called "
learning with errors Learning with errors (LWE) is the computational problem of inferring a linear n-ary function f over a finite ring from given samples y_i = f(\mathbf_i) some of which may be erroneous. The LWE problem is conjectured to be hard to solve, and thus to ...
" introduced by Oded Regev in 2005. A specialized form of Learning with errors operates within the
ring of polynomials In mathematics, especially in the field of algebra, a polynomial ring or polynomial algebra is a ring (which is also a commutative algebra) formed from the set of polynomials in one or more indeterminates (traditionally also called variables ...
over a
finite field In mathematics, a finite field or Galois field (so-named in honor of Évariste Galois) is a field that contains a finite number of elements. As with any field, a finite field is a set on which the operations of multiplication, addition, subtr ...
. This specialized form is called
ring learning with errors 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 ...
or RLWE. There are a variety of cryptographic algorithms which work using the RLWE paradigm. There are
public-key encryption Public-key cryptography, or asymmetric cryptography, is the field of cryptographic systems that use pairs of related keys. Each key pair consists of a public key and a corresponding private key. Key pairs are generated with cryptographic alg ...
algorithms,
homomorphic encryption Homomorphic encryption is a form of encryption that permits users to perform computations on its encrypted data without first decrypting it. These resulting computations are left in an encrypted form which, when decrypted, result in an identical ...
algorithms, and RLWE digital signature algorithms in addition to the public key, key exchange algorithm presented in this article A key exchange algorithm is a type of public key algorithm which establishes a shared secret key between two communicants on a communications link. The classic example of a key exchange is the
Diffie–Hellman key exchange Diffie–Hellman key exchangeSynonyms of Diffie–Hellman key exchange include: * Diffie–Hellman–Merkle key exchange * Diffie–Hellman key agreement * Diffie–Hellman key establishment * Diffie–Hellman key negotiation * Exponential key exc ...
. The exchange consists of one transmission from one end of the line and one transmission from the other end of the link. Diffie–Hellman and
Elliptic Curve Diffie–Hellman In mathematics, an ellipse is a plane curve surrounding two focus (geometry), focal points, such that for all points on the curve, the sum of the two distances to the focal points is a constant. It generalizes a circle, which is the special ty ...
are the two most popular key exchange algorithms. The RLWE Key Exchange is designed to be a " quantum safe" replacement for the widely used Diffie–Hellman and
elliptic curve Diffie–Hellman In mathematics, an ellipse is a plane curve surrounding two focus (geometry), focal points, such that for all points on the curve, the sum of the two distances to the focal points is a constant. It generalizes a circle, which is the special ty ...
key exchanges that are used to secure the establishment of secret keys over untrusted communications channels. Like Diffie–Hellman and Elliptic Curve Diffie–Hellman, the Ring-LWE key exchange provides a cryptographic property called "
forward secrecy In cryptography, forward secrecy (FS), also known as perfect forward secrecy (PFS), is a feature of specific key agreement protocols that gives assurances that session keys will not be compromised even if long-term secrets used in the session key ...
"; the aim of which is to reduce the effectiveness of
mass surveillance Mass surveillance is the intricate surveillance of an entire or a substantial fraction of a population in order to monitor that group of citizens. The surveillance is often carried out by local and federal governments or governmental organizati ...
programs and ensure that there are no long term secret keys that can be compromised that would enable bulk decryption.


Introduction

Starting with a
prime A prime number (or a prime) is a natural number greater than 1 that is not a product of two smaller natural numbers. A natural number greater than 1 that is not prime is called a composite number. For example, 5 is prime because the only ways ...
integer q, the Ring-LWE key exchange works in the
ring of polynomials In mathematics, especially in the field of algebra, a polynomial ring or polynomial algebra is a ring (which is also a commutative algebra) formed from the set of polynomials in one or more indeterminates (traditionally also called variables ...
modulo a polynomial \Phi(x) with coefficients in the field of integers mod q (i.e. the ring R_q := Z_q / \Phi(x)). Multiplication and addition of polynomials will work in the usual fashion with results of a multiplication reduced mod \Phi(x). The idea of using LWE and Ring LWE for key exchange was first 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 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 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 selected for Google's post-quantum experiment, uses Peikert's scheme with variation in the error distribution. For somewhat greater than 128
bits of security In cryptography, security level is a measure of the strength that a cryptographic primitive — such as a cipher or hash function — achieves. Security level is usually expressed as a number of "bits of security" (also security strengt ...
, Singh presents a set of parameters which have 6956-bit public keys for the Peikert's scheme. The corresponding private key would be roughly 14,000 bits. An RLWE version of the classic MQV variant of a Diffie–Hellman key exchange was later published by Zhang et al. in 2014. The security of both key exchanges is directly related to the problem of finding approximate short vectors in an ideal lattice. This article will closely follow the RLWE work of Ding in "A Simple Provably Secure Key Exchange Scheme Based on the Learning with Errors Problem". For this presentation a typical polynomial is expressed as: : a(x) = a_0 + a_1 x + a_2 x^2 + \cdots + a_ x^ + a_ x^ + a_ x^ The coefficients a_i of this polynomial are integers mod ''q''. The polynomial \Phi(x) will be the
cyclotomic polynomial In mathematics, the ''n''th cyclotomic polynomial, for any positive integer ''n'', is the unique irreducible polynomial with integer coefficients that is a divisor of x^n-1 and is not a divisor of x^k-1 for any Its roots are all ''n''th primiti ...
. When ''n'' is a power of 2 then \Phi(x) = x^n +1. The RLWE-KEX uses polynomials which are considered "small" with respect to a measure called the "
infinity norm In mathematical analysis, the uniform norm (or ) assigns to real- or complex-valued bounded functions defined on a set the non-negative number :\, f\, _\infty = \, f\, _ = \sup\left\. This norm is also called the , the , the , or, when th ...
." The infinity norm for a polynomial is simply the value of the largest coefficient of the polynomial when the coefficients are considered as integers in Z rather than Zq (i.e.from the set ). The algorithm's security depends on an ability to generate random polynomials which are small with respect to the infinity norm. This is done simply by randomly generating the coefficients for a polynomial (sn-1, ..., s0) which are guaranteed or very likely to be small. There are two common ways to do this: # Using Uniform Sampling – The coefficients of the small polynomial are uniformly sampled from a set of small coefficients. Let ''b'' be an integer that is much less than ''q''. If we randomly choose coefficients from the set: the polynomial will be small with respect to the bound (b). Singh suggest using b = 5. Thus coefficients would be chosen from the set . # Using Discrete Gaussian Sampling – For an odd value for q, the coefficients are randomly chosen by sampling from the set according to a discrete Gaussian distribution with mean 0 and distribution parameter ''σ''. 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. An overview of Gaussian sampling is found in a presentation by Peikert. For the rest of this article, the random small polynomials will be sampled according to a distribution which is simply specified as D. Further q will be an odd prime such that q is congruent to 1 mod 4 and 1 mod 2n. Other cases for q and n are thoroughly discussed in "A Toolkit for Ring-LWE Cryptography" and in Singh's "Even More Practical Key Exchange for the Internet using Lattice Cryptography." and another paper by Singh. A fixed public polynomial, a(x), shared by all users of the network. It is deterministically generated from a cryptographically secure source. Given ''a''(''x'') as stated, we can randomly choose small polynomials ''s''(''x'') and ''e''(''x'') to be the "private key" in a public key exchange. The corresponding public key will be the polynomial ''p''(''x'') = ''a''(''x'')''s''(''x'') + 2''e''(''x'').


The key exchange

The key exchange will take place between two devices. There will be an initiator for the key exchange designated as (I) and a respondent designated as (R). Both I and R know ''q'', ''n'', ''a''(''x''), and have the ability to generate small polynomials according to the distribution \chi_\alpha with parameter \alpha. The distribution \chi_\alpha is usually the discrete Gaussian distribution on the ring R_q = Zq \Phi(x). The description which follows does not contain any explanation of why the key exchange results in the same key at both ends of a link. Rather, it succinctly specifies the steps to be taken. For a thorough understanding of why the key exchange results in the initiator and responder having the same key, the reader should look at the referenced work by Ding et al. The key exchange begins with the initiator (I) doing the following: Initiation: # Generate two polynomials s_I and e_I with small coefficients by sampling from the distribution \chi_\alpha. # Compute p_I = as_I + 2e_I. # The initiator sends the polynomial p_I to the Responder. Response: # Generate two polynomials s_R and e_R with small coefficients by sampling from the distribution \chi_\alpha. # Compute p_R = as_R + 2e_R. # Generate a small e'_R from \chi_\alpha. Compute k_R = p_Is_R+ 2e'_R . Then k_R = as_Is_R + 2e_Is_R + 2e'_R''.'' # Use the signal function \operatorname to find w = \operatorname(k_R) . This is computed by applying Sig function on each coefficient of k_R # Respondent side's key stream sk_R = \operatorname_2(k_R,w) is calculated, based on the reconciliation information w and the polynomial k_R. # The Respondent sends p_R and w to the Initiator. Finish: # Receive p_R and w from the Responder. # Sample e'_I from \chi_\alpha and Compute k_I = p_Rs_I + 2e'_I = as_Is_R + 2e_Rs_I + 2e'_I. # Initiator side's key stream is produced as sk_I = \operatorname_2(k_I,w) from the reconciliation information w and polynomial k_I. In the above key exchange, \operatorname is the signal function defined as below: Define subset \mathbf:=\ of Zq = \. Here, \lfloor.\rfloor and \lfloor.\rceildenotes the floor and the rounding to the nearest integer respectively. Function \operatorname is the characteristic function of the complement of E. \operatorname: Zq \rightarrow \: \operatorname(v) = \begin 0, & \text v \in E \\ 1, & \text v \notin E. \end \operatorname_2 is the mod 2 operation to eliminate the error terms defined as follows: \operatorname_2 (v,w) = \biggl(v + w.\frac\Biggr)\bmod q\bmod 2 Note that the values of k_I and k_R are only approximately equal. In order to extract a shared key using this approximate equal values, a reconciliation function, also known as a signal function is used. This function indicates the region in which each coefficient of a polynomial v in R_q lies and helps to make sure that the error terms in k_R and k_I do not result in different mod q operations. The methods of reconciliation and key string generation depends on the specific RLWE-KEX scheme in question. Some method is based on modular arithmetic, while others may be based on high-dimension geometry. If the key exchange worked properly, the initiator's string and the respondent's string will be the same. Depending on the specifics of the parameters chosen, there is an extremely small probability that this key exchange will fail to produce the same key. Parameters for the key exchange can be chosen to make the probability of failure in the key exchange very small; much less than the probability of undetectable garbles or device failures.


Parameter choices

The RLWE-KEX exchange presented above worked in the Ring of Polynomials of degree ''n'' − 1 or less mod a polynomial \Phi(x). The presentation assumed that n was a power of 2 and that q was a prime which was congruent to 1 (mod 2n). Following the guidance given in Peikert's paper, Singh suggested two sets of parameters for the RLWE-KEX. For 128 bits of security, ''n'' = 512, ''q'' = 25601, and \Phi(x) = x^ + 1 For 256 bits of security, ''n'' = 1024, ''q'' = 40961, and \Phi(x) = x^ + 1 Because the key exchange uses random sampling and fixed bounds there is a small probability that the key exchange will fail to produce the same key for the initiator and responder. If we assume that the Gaussian parameter ''σ'' is \frac and the uniform sampling bound (''b'') = 5 (see Singh), then the probability of key agreement failure is less than 2−71 for the 128-bit secure parameters and less than 2−91 for the 256-bit secure parameters. In their November 2015 paper, Alkim, Ducas, Pöppelmann, and Schwabe recommend the following parameters n = 1024, q =12289, and \Phi(x) = x1024 + 1. This represents a 70% reduction in public key size over the n = 1024 parameters of Singh, and was submitted to NIST's
Post-Quantum Cryptography Standardization Post-Quantum Cryptography Standardization is a program and competition by NIST to update their standards to include post-quantum cryptography. It was announced at PQCrypto 2016. 23 signature schemes and 59 encryption/ KEM schemes were submitted b ...
project under the name
NewHope In post-quantum cryptography, NewHope is a key-agreement protocol by Erdem Alkim, Léo Ducas, Thomas Pöppelmann, and Peter Schwabe that is designed to resist quantum computer attacks. NewHope is based on a mathematical problem ring learning with ...
. Also in their November 2015 paper, Alkim, Ducas, Pöppelmann and Schwabe recommend that the choice of the base polynomial for the key exchange ( a(x) above ) be either generated randomly from a secure random number generator for each exchange or created in a verifiable fashion using a "nothing up my sleeve" or NUMS technique. An example of parameters generated in this way are the prime numbers for the Internet Key Exchange (RFC 2409) which embed the digits of the mathematical constant pi in the digital representation of the prime number. Their first method prevents amortization of attack costs across many key exchanges at the risk of leaving open the possibility of a hidden attack like that described by Dan Bernstein against the NIST elliptic curves. The NUMS approach is open to amortization but generally avoids the Bernstein attack if only common mathematical constants such as pi and e are used.


Key exchange security

The security of this key exchange is based on the underlying hardness of
ring learning with errors 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 ...
problem that has been proven to be as hard as the worst case solution to the
shortest vector problem In computer science, lattice problems are a class of optimization problems related to mathematical objects called lattices. The conjectured intractability of such problems is central to the construction of secure lattice-based cryptosystems: Lat ...
(SVP) in an ideal lattice. The best method to gauge the practical security of a given set of lattice parameters is the BKZ 2.0 lattice reduction algorithm. According to the BKZ 2.0 algorithm the key exchange parameters listed above will provide greater than 128 or 256 bits of security, respectively.


Implementations

In 2014 Douglas Stebila mad
a patch
for OpenSSL 1.0.1f. based on his work and others published in "Post-quantum key exchange for the TLS protocol from the ring learning with errors problem." Software implementing the work of Singh is found on GitHub a
https://github.com/vscrypto/ringlwe.
ref name=":1" />


Other approaches

A variant of the approach described above is an authenticated version in the work of Zhang, Zhang, Ding, Snook and Dagdelen in their paper, "Post Quantum Authenticated Key Exchange from Ideal Lattices." The concept of creating what has been called a Diffie–Hellman-like Key Exchange using lattices with a reconciliation function appears to have first been presented by French researchers Aguilar, Gaborit, Lacharme, Schrek, and Zemor at PQCrypto 2010 in their talk, "Noisy Diffie–Hellman Protocols." In November 2015, Alkim, Ducas, Pöppelmann, and Schwabe built on the prior work of Peikert and used what they believe is a more conservative costing of lattice attacks to recommend parameters. Software based on the work of Alkim, Ducas, Pöppelmann, and Schwabe is found on GitHub at https://github.com/tpoeppelmann/newhope


See also

*
Post-quantum cryptography In cryptography, post-quantum cryptography (sometimes referred to as quantum-proof, quantum-safe or quantum-resistant) refers to cryptographic algorithms (usually public-key algorithms) that are thought to be secure against a cryptanalytic attack b ...
*
Lattice-based cryptography Lattice-based cryptography is the generic term for constructions of cryptographic primitives that involve lattices, either in the construction itself or in the security proof. Lattice-based constructions are currently important candidates for pos ...
*
Ideal lattice cryptography In discrete mathematics, ideal lattices are a special class of lattices and a generalization of cyclic lattices. Vadim Lyubashevsky.Lattice-Based Identification Schemes Secure Under Active Attacks In ''Proceedings of the Practice and theory in pu ...
*
Ring learning with errors signature Digital signatures are a means to protect digital information from intentional modification and to authenticate the source of digital information. Public key cryptography provides a rich set of different cryptographic algorithms the create digital s ...
*
Ring learning with errors 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 ...


References

{{reflist Cryptographic algorithms Post-quantum cryptography Lattice-based cryptography