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 BB for lattice Λ\Lambda and a target point t∈Rnt \in \mathbb{R}^n.

Output: The lattice vector v∗∈Λv^* \in \Lambda minimizing ∥t−v∥\|t - v\| over all v∈Λv \in \Lambda.

Approximation variant (γ-CVP): Find v∈Λv \in \Lambda with ∥t−v∥≤γ⋅dist(t,Λ)\|t - v\| \leq \gamma \cdot \mathrm{dist}(t, \Lambda).

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 ℓ∞\ell_\infty norm. This is stronger than the randomized reduction known for SVP.

Approximate CVP: For any constant γ>1\gamma > 1, γ\gamma-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 nn cannot be solved in 2o(n)2^{o(n)} 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.

Coordinate rounding, nearest plane, and exact CVP

Click to drop a target t (or drag it). Switch bases or load the worked counterexample to compare the three outputs.

b₁b₂True closest pointCoordinate rounding answer
Coordinate rounding
(2.20, 1.50) · 0.91
Nearest plane
(2.20, 1.50) · 0.91
Exact closest point
(1.20, 1.30) · 0.32
Rounding right (reduced)
0 / 0
Rounding right (input)
0 / 0

Click anywhere to drop a target point t, then compare the two bases.

What to notice: Coordinate rounding picks a corner of the shaded basis cell. Nearest plane rounds one orthogonal projection at a time. The closest-point calculation checks every layer that could beat its initial nearest-plane candidate. The two approximations can return different points on the same input.

Algorithm — Babai’s Nearest Plane (1986)

Input: An LLL-reduced (or better) basis B=(b1,…,bn)B = (b_1, \ldots, b_n) with Gram–Schmidt orthogonalization B~=(b~1,…,b~n)\tilde{B} = (\tilde{b}_1, \ldots, \tilde{b}_n), and a target t∈Rnt \in \mathbb{R}^n.

Step-by-step:
1. Set v←tv \leftarrow t.
2. For i=ni = n down to 11:
 a. Compute the coefficient ci=⟨v,b~i⟩/⟨b~i,b~i⟩c_i = \langle v, \tilde{b}_i \rangle / \langle \tilde{b}_i, \tilde{b}_i \rangle.
 b. Round: subtract ⌊ci⌉⋅bi\lfloor c_i \rceil \cdot b_i from vv.
3. Output t−vt - v (the nearest plane lattice point found).

Approximation guarantee: For an LLL-reduced basis, the output v^\hat{v} satisfies:

∥t−v^∥≤2(n−1)/2⋅dist(t,Λ)\|t - \hat{v}\| \leq 2^{(n-1)/2} \cdot \mathrm{dist}(t, \Lambda)

For a near-orthogonal basis (such as the secret key in LWE), the rounding error in each step is at most ∥b~i∥/2\|\tilde{b}_i\|/2. If the error e=t−v∗e = t - v^* satisfies ∣⟨e,b~i⟩∣/∥b~i∥2<1/2|\langle e, \tilde{b}_i \rangle| / \|\tilde{b}_i\|^2 < 1/2 for every ii (for example, whenever ∥e∥<min⁡i∥b~i∥/2\|e\| < \min_i \|\tilde{b}_i\|/2), the algorithm returns the exact closest vector v∗v^*. This is precisely the BDD guarantee exploited in LWE decryption. Note that it depends on the basis: it does not cover every target within λ1/2\lambda_1/2 of the lattice.

The key insight: Babai’s algorithm is correct whenever the error e=t−v∗e = t - v^* is small relative to the Gram–Schmidt norms ∥b~i∥\|\tilde{b}_i\|. A short, nearly orthogonal basis (the secret key) makes all ∥b~i∥\|\tilde{b}_i\| large, ensuring the rounding in each step is correct. A long, skewed basis (the public key) makes some ∥b~i∥\|\tilde{b}_i\| very small, causing the rounding to fail.

A case where nearest plane misses the closest point

Take b1=(2,0)b_1=(2,0), b2=(1,2)b_2=(1,2), and target t=(11/10,9/10)t=(11/10,9/10). Compare three methods on the same input.

  1. Round the basis coordinates. The coefficients are (13/40,9/20)(13/40,9/20). Rounding both to zero returns the origin, at squared distance 202/100202/100.
  2. Run nearest plane. The second Gram–Schmidt vector is (0,2)(0,2). Its coefficient rounds to 0. The remaining horizontal coefficient is 11/2011/20, which rounds to 1. The returned point (2,0)(2,0) has squared distance 162/100162/100.
  3. Solve exactly. On the line y=2y=2, the nearest point is (1,2)(1,2), at squared distance 122/100122/100. The nearest point on y=0y=0 is the Babai result. All other lattice lines have vertical distance at least 29/1029/10, so (1,2)(1,2) 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 tt satisfies:

dist(t,Λ)<λ1(Λ)2\mathrm{dist}(t, \Lambda) < \frac{\lambda_1(\Lambda)}{2}

Under this guarantee, the closest lattice point is unique (any other lattice point is at distance ≥λ1−dist(t,Λ)>λ1/2\geq \lambda_1 - \mathrm{dist}(t, \Lambda) > \lambda_1/2 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 λ1\lambda_1 alone does not give this basis-dependent guarantee.

The BDD View of Search-LWE

Lift the image of the public sample matrix modulo qq 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 (t,M)(t,M), the enlarged lattice contains(v−t,−M)(v-t,-M) for each original lattice point vv. If the target distance satisfies 0<d<λ1/20<d<\lambda_1/2, choosing M=dM=d makes the residual of the unique closest point, together with its negative, the shortest nonzero vectors. Its length is 2d\sqrt2d. Layer zero has nonzero length at leastλ1\lambda_1, and layers with absolute index at least two have length at least2d2d. 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 nn. 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 d≪λ1d \ll \lambda_1 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 (s,e,−1)(s, e, -1) (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 mm LWE samples (A,b=As+e)(A, b = As + e), construct the lattice:

Λ={(x,y,w)∈Zn+m+1:Ax+y+w b≡0(modq)}\Lambda = \{ (x, y, w) \in \mathbb{Z}^{n+m+1} : Ax + y + w\, b \equiv 0 \pmod{q} \}

The vector (s,e,−1)(s, e, -1) lies in this lattice, since As+e−b=0As + e - b = 0, and has norm ≈σm+n\approx \sigma \sqrt{m+n} where σ\sigma 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

  1. Q1. How does CVP differ from SVP?

  2. Q2. Bounded Distance Decoding (BDD) promises the target is within λ₁/2 of the lattice. Why does that promise matter?

  3. 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?

  4. Q4. In the primal attack on LWE, what does the attacker actually try to find?

References and Further Reading

Key papers on CVP

Micciancio & Regev, “Lattice-based Cryptography” (2009) — §3–4 cover CVP hardness in depth. PDF ↗

Regev, “On Lattices, Learning with Errors...” (2005) — gives a quantum reduction from worst-case approximate lattice problems to average-case LWE. ACM ↗