Note

LWE (Learning With Errors)

A fundamental lattice-based cryptographic problem that forms the basis of many post-quantum secure encryption schemes.

By Roman Akhtariev

Learning With Errors (LWE) is a computational problem that serves as the foundation for many modern cryptographic constructions, particularly those designed to be secure against quantum computers.

Definition

An LWE ciphertext is a pair (b,a)(b, a) where:

  • bZqb \in \mathbb{Z}_q is a scalar
  • aZqNa \in \mathbb{Z}_q^N is a vector of NN elements

The phase (decryption result) is computed as:

μ=b+a,s\mu = b + \langle a, s \rangle

where ss is the secret key vector and ,\langle \cdot, \cdot \rangle denotes the inner product.

Security

The LWE problem asks: given many samples (ai,bi)(a_i, b_i) where bi=ai,s+eib_i = \langle a_i, s \rangle + e_i for small errors eie_i, recover the secret ss.

This problem is believed to be hard even for quantum computers, making LWE a cornerstone of post-quantum cryptography.

Key Properties

  • Worst-case to average-case reduction: LWE's hardness can be reduced to worst-case hardness of certain lattice problems
  • Homomorphic: LWE ciphertexts support additive homomorphism naturally
  • Noise growth: Operations increase noise; too much noise prevents correct decryption