ArticleslgStudy

computer science

Ring learning with errors

Ring learning with errors is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Ring learning with errors rather than just read about it. In short: 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 inf…

Key takeaways

  • Ring learning with errors belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Ring learning with errors to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Ring learning with errors from memory before moving on to harder problems.

Reference excerpt

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. 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. 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. 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).

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. 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. A typical polynomial a(x) is expressed as:

a(x)=a0+a1x+a2x2+…+an−2xn−2+an−1xn−1 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 𝐙/q𝐙=𝐅q for a prime integer q. The set of polynomials over a finite field with the operations of addition and multiplication forms an infinite polynomial ring (𝐅q[x]). 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 𝐅q[x] modulo an irreducible polynomial Φ(x). This finite quotient ring can be written as 𝐅q[x]/Φ(x) though many authors write 𝐙q[x]/Φ(x) . If the degree of the polynomial Φ(x) is n, the quotient ring becomes the ring of polynomials of degree less than n modulo Φ(x) with coefficients from Fq. The values n, q, together with the polynomial Φ(x) 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, ||a(x)||∞=b states that the infinity norm of the polynomial a(x) is b. Thus b is the largest coefficient of a(x). The final concept necessary to understand the RLWE problem is the generation of random polynomials in 𝐅q[x]/Φ(x) and the generation of "small" polynomials . A random polynomial is easily generated by simply randomly sampling the n coefficients of the polynomial from 𝐅q, where 𝐅q is typically represented as the set {−(q−1)/2,...,−1,0,1,...,(q−1)/2}. Randomly generating a "small" polynomial is done by generating the coefficients of the polynomial from 𝐅q in a way that either guarantees small coefficients or makes them very likely. When q is a prime integer, 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: {−b,−b+1,−b+2,…,−2,−1,0,1,2,…,b−2,b−1,b} the polynomial will be small with respect to the bound (b). Using discrete Gaussian sampling – For an odd value for q, the coefficients of the polynomial are randomly chosen by sampling from the set {−(q−1)/2,…,(q−1)/2} 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. The paper "Sampling from Discrete Gaussians for Lattice-Based Cryptography on a Constrained Device" by Dwarakanath and Galbraith provides an overview of this problem.

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

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Ring learning with errors

Start with the simplest possible case. Write down what Ring learning with errors claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Ring learning with errors before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Ring learning with errors ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Ring learning with errors

In research
Ring learning with errors appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Ring learning with errors in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Ring learning with errors is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computational hardness assumptions, Computational problems, Lattice-based cryptography, so understanding it makes those chapters shorter.
In everyday life
Look for Ring learning with errors outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Ring learning with errors” →

How to study Ring learning with errors in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Ring learning with errors means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Ring learning with errors out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Ring learning with errors in simple terms?

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…

Why does Ring learning with errors matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Ring learning with errors?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Ring learning with errors.

Tags

  • Computational hardness assumptions
  • Computational problems
  • Lattice-based cryptography
  • Post-quantum cryptography

Keep exploring