2.2 The Closest Vector Problem
Finding the nearest lattice point to an arbitrary target, with approximation and bounded-distance decoding.
The Closest Vector Problem (CVP) is a generalization of SVP: instead of finding the lattice point nearest to the origin, you find the lattice point nearest to an arbitrary target point anywhere in the ambient space. The formal relationship with SVP follows from a reduction. A nearby target leads to the restricted problem of bounded distance decoding.
Intuition
Building on the forest picture from SVP: now you are dropped somewhere in the same repeating forest, but not on a tree. You stand in the mud between trees, and you want the tree closest to where you are.
That is the Closest Vector Problem (CVP). Two equally near trees illustrate a tie. Either one is a valid exact answer.
The Problem Statement
Definition 27 — Closest Vector Problem (CVP)
Input: A basis for lattice and a target point .
Output: The lattice vector minimizing over all .
Approximation variant (γ-CVP): Find with .
Related problem: SVP reduces to CVP while preserving the approximation factor. The variant comparison states the search and decision tasks separately.
Hardness: Stronger than SVP
CVP is at least as hard as SVP in a formal sense, and its inapproximability results are actually stronger than those known for SVP. While SVP is NP-hard to approximate only up to small constants, CVP is NP-hard to approximate within any constant — a qualitative difference.
Theorem 6 — CVP Hardness (Micciancio 2001, Dinur et al. 2003)
Exact CVP: NP-hard under deterministic polynomial-time reductions — even in the norm. This is stronger than the randomized reduction known for SVP.
Approximate CVP: For any constant , -CVP is NP-hard (Dinur et al. 2003). This means a polynomial-time 100× approximation would imply P = NP.
Under the Exponential Time Hypothesis (ETH), exact CVP in dimension cannot be solved in time (Bennett–Golovnev–Stephens-Davidowitz 2017): exponential-time algorithms are essentially the best one can hope for.
Babai’s Nearest Plane Algorithm
Babai’s nearest plane algorithm (1986) is the workhorse of lattice decoding — the algorithm that runs inside LWE decryption whenever a sufficiently good basis is available. It solves an approximate version of CVP in polynomial time, with quality depending entirely on the quality of the input basis.
Algorithm — Babai’s Nearest Plane (1986)
Input: An LLL-reduced (or better) basis with Gram–Schmidt orthogonalization , and a target .
Step-by-step:
1. Set .
2. For down to :
a. Compute the coefficient .
b. Round: subtract from .
3. Output (the nearest plane lattice point found).
Approximation guarantee: For an LLL-reduced basis, the output satisfies:
For a near-orthogonal basis (such as the secret key in LWE), the rounding error in each step is at most . If the error satisfies for every (for example, whenever ), the algorithm returns the exact closest vector . This is precisely the BDD guarantee exploited in LWE decryption. Note that it depends on the basis: it does not cover every target within of the lattice.
The key insight: Babai’s algorithm is correct whenever the error is small relative to the Gram–Schmidt norms . A short, nearly orthogonal basis (the secret key) makes all large, ensuring the rounding in each step is correct. A long, skewed basis (the public key) makes some very small, causing the rounding to fail.
A case where nearest plane misses the closest point
Take , , and target . Compare three methods on the same input.
- Round the basis coordinates. The coefficients are . Rounding both to zero returns the origin, at squared distance .
- Run nearest plane. The second Gram–Schmidt vector is . Its coefficient rounds to 0. The remaining horizontal coefficient is , which rounds to 1. The returned point has squared distance .
- Solve exactly. On the line , the nearest point is , at squared distance . The nearest point on is the Babai result. All other lattice lines have vertical distance at least , so is the unique closest point.
Bounded Distance Decoding (BDD)
In bounded distance decoding, the input supplies a target with an extra promise: it lies close to exactly one lattice point. This restricted form, called Bounded Distance Decoding (BDD), is often solvable efficiently — given the right tools.
Definition 28 — Bounded Distance Decoding (BDD)
A BDD instance is a CVP instance with the promise that the target satisfies:
Under this guarantee, the closest lattice point is unique (any other lattice point is at distance away). Uniqueness means there is a definitive right answer — no ambiguity.
A sufficient condition for Babai to recover the nearby lattice point is that the error norm is strictly below half the smallest Gram–Schmidt length of the supplied basis. The BDD promise in terms of alone does not give this basis-dependent guarantee.
The BDD View of Search-LWE
Lift the image of the public sample matrix modulo to the integers. A search-LWE sample vector is an image point plus a small error. Under the decoding promise, recovering the nearby lattice point yields the noiseless samples, from which a secret can be recovered when the matrix determines it uniquely. See Peikert’s survey, §4.2.
The ML-KEM encryption component decrypts by subtracting a secret-dependent polynomial product and rounding the coefficients. FIPS 203, Algorithm 15 gives the exact operation.
Suggest a correction to this section
Reductions Between CVP and SVP
Goldreich, Micciancio, Safra, and Seifert reduce approximate SVP to approximate CVP with the same factor and dimension. In the other direction, the following embedding relies on the target being close.
Kannan’s embedding in the close-target case
With appended column , the enlarged lattice contains for each original lattice point . If the target distance satisfies , choosing makes the residual of the unique closest point, together with its negative, the shortest nonzero vectors. Its length is . Layer zero has nonzero length at least, and layers with absolute index at least two have length at least. The remaining layers are ordered by distance to the target.
What changes for arbitrary targets?
A target outside that range can have competing vectors in other layers. The construction above gives a bounded-distance result. See the embedding guide for the role of the height scale.
Algorithms for CVP
Exact CVP via Enumeration
Exact CVP can be solved by adapting enumeration to search for the nearest lattice point instead of the shortest vector. The complexity is the same order as SVP enumeration: exponential in . Sieving can also be adapted for CVP — a “CVP sieve” starts with vectors near the target and reduces their distance iteratively.
Decoding Algorithms in Coding Theory
Nearest-codeword decoding is analogous to CVP, usually with a different metric such as Hamming distance. It models maximum-likelihood decoding for channels where closer codewords are more likely. A linear code over a prime field gives an integer lattice through Construction A.
The Gap between BDD and CVP
BDD is easy with a trapdoor
Some lattice trapdoors provide a short basis or equivalent information. When the error bound fits within the Gram–Schmidt guarantee, nearest plane decodes efficiently.
CVP is hard without a trapdoor
Complexity results depend on the problem, the decoding radius, and the reduction model. Worst-case hardness of unrestricted CVP does not by itself give an average-case hardness claim for a public-key distribution.
The unique SVP connection
BDD with a very small bound reduces to unique SVP (uSVP): finding a shortest vector up to sign when the second successive minimum is much longer. This is the lattice problem underlying the primal lattice attack on LWE, where the target is embedded as a short vector in a higher-dimensional lattice.
The Primal Attack on LWE
The most important CVP-based attack on LWE is the primal attack. It embeds the LWE instance into a higher-dimensional lattice where the solution (secret, error, and a −1) forms an unusually short vector. Recovering this short vector via SVP breaks LWE.
The Primal (Kannan) Attack on LWE
Given LWE samples , construct the lattice:
The vector lies in this lattice, since , and has norm where is the LWE error standard deviation. If this vector is the unique shortest vector in the lattice, BKZ can find it, breaking LWE.
Security parameters are chosen so that the error term is small enough for correctness but large enough that the embedded vector does not stand out enough for BKZ to find it — recovering it would require a huge block size.
Check Your Understanding
Q1. How does CVP differ from SVP?
Q2. Bounded Distance Decoding (BDD) promises the target is within λ₁/2 of the lattice. Why does that promise matter?
Q3. Babai’s nearest plane algorithm is run on the same target twice: once with a short, nearly orthogonal basis and once with a long, skewed basis of the same lattice. What happens?
Q4. In the primal attack on LWE, what does the attacker actually try to find?