LLL lattice basis reduction

LLL lattice basis reduction

LLL basis reduction is a mathematical algorithm that transforms an unfavorable description of a lattice – a regular grid of points in space – into a description that is as short and orthogonal as possible. It is an important tool in cryptography and is intensely discussed today because it makes several classical encryption schemes vulnerable to attack.

Picture a lattice grid: points evenly distributed throughout space, like the atoms in a crystal. Every such lattice can be fully described by a collection of direction vectors – arrows that indicate how to get from one point to another. This collection is called a basis. The problem: the same set of points can be described by many different bases, some of them very unwieldy, others very compact. LLL basis reduction, named after the mathematicians Arjen Lenstra, Hendrik Lenstra, and László Lovász, who published the algorithm in 1982, automatically transforms a bad basis into a good one. A good basis has short vectors that are as close to orthogonal to one another as possible.

Significance for cryptography and security

Many encryption schemes rely on certain mathematical problems being very hard to solve. One of these is the so-called shortest vector problem: given a bad basis of a lattice, find the shortest connecting arrow that occurs in the lattice. This sounds geometrically harmless, but in high dimensions it is extremely demanding computationally – and this is exactly what some cryptographic schemes rely on.

LLL does not solve this problem exactly, but it delivers an approximation that in practice is often sufficient to break encryptions. Shortly after its publication, it became clear that LLL could break several schemes considered secure at the time. This immediately made the algorithm a central topic in security research.

Today, LLL is also relevant in the context of quantum computers. Classical schemes such as RSA are considered insecure against quantum computers. As a replacement, so-called lattice-based schemes are being developed – encryption methods based on the difficulty of lattice problems. LLL serves as the benchmark here: a new scheme is only considered secure if LLL and its further developments cannot break it either.

How the reduction proceeds

The algorithm works through the basis vectors step by step. In each step, it checks two neighboring vectors against two conditions: are they already short enough? Are they already sufficiently orthogonal to one another? If not, it subtracts a multiple of one from the other – similar to division with remainder from school – or swaps the order of the two.

This procedure is a variant of the so-called Gram-Schmidt orthogonalization, a classical method from linear algebra. The crucial difference: Gram-Schmidt works with real numbers and produces an exactly orthogonal basis, but in doing so leaves the lattice. LLL, by contrast, always stays within the lattice, because it only takes integer steps. It pays for this restriction with the fact that the resulting vectors are not perfectly orthogonal, only approximately so.

The algorithm’s running time grows polynomially with the size of the input. This means: the higher the dimension, the slower it runs – but the increase is manageable, not explosive. In dimensions up to about 100, LLL is very fast. In the extremely high dimensions of modern lattice-based cryptography – often 500 to over 1000 – however, it reaches its limits, which is what makes these schemes protective.

Where LLL shows up in practice

In cryptography research, LLL is the standard tool for testing how robust a scheme is. Anyone designing a new lattice-based scheme must show that LLL – even in improved variants such as BKZ, the Block-Korkine-Zolotarev algorithm – cannot break the scheme. The American standardization institute NIST published the first official post-quantum standards in 2024, and their security was measured significantly against this benchmark.

Outside of cryptography, LLL is used in number theory to factorize polynomials, that is, to break them down into simpler parts. This is in fact how it first became known in 1982: it solved an open problem in algebra at the time that had previously been inaccessible using purely lattice-based methods.

In news articles, LLL usually comes up when reporting on the state of post-quantum cryptography, or when security researchers demonstrate that a particular encryption product chose weaker parameters than stated – and is therefore vulnerable to attack using LLL. Readers of such reports can thus understand LLL as a kind of security touchstone: an algorithm that any serious encryption must be able to withstand.

Latest News

Subscribe free. Unsubscribe the second it sucks.

High-signal news across AI, business, UX, and tech. Every morning.