Lab 05 · The new math: lattices
Warped Pegboard
The same grid of pegs, described two ways. One description makes a hard question quick; the other hides the answer.
Picture an orchard planted in a perfect grid.
Every tree stands where you land if you take some whole number of steps in one direction and some whole number in another. Give someone short, square steps and they can walk to any tree, or find the tree nearest to where they stand, without thinking.
Now describe the same orchard with long, slanted steps that point almost the same way. Every tree is still reachable, and not one tree has moved. But finding the nearest tree becomes a guessing game. Same orchard, a worse map.
Skew the rulers. Watch the shortcut miss.
Find the nearest peg
Pick a needle. Try the rounding shortcut, then skew the rulers and watch it miss.
NearestChecking every peg finds (2, 0).
Shortcut hitRounding lands on the same peg. Now skew the rulers.
GoalFind a needle and a skew where the shortcut misses.
An intuition builder, not a security proof. In two dimensions a computer finds the nearest peg at any skew; real schemes use hundreds of dimensions. Educational, not for production use. See all labs
Now it has a name.
Finish the lab to see the real terms. They will make sense once you have done it by hand.
The pegs form a lattice: every point you can reach by whole-number steps along a few directions. The directions you choose are a basis. Many different bases describe the same lattice, which is why the pegs never moved when you skewed the rulers.
A short, nearly square basis is a good basis. With it, rounding finds the nearest peg. A long, skewed basis is a bad basis: it describes the same pegs, but rounding lands on the wrong one. Lattice cryptography keeps the good basis as the private key and hands out a bad one as the public key. Finding the nearest peg with only the bad basis is the closest-vector problem, and in hundreds of dimensions nobody knows a fast way to do it.
Why this matters for quantum
Lattices get tested too
In November 2026 an internal Claude research model found a new quantum attack on structured lattices, with proofs checked by machine Anthropic (GitHub). Independent cryptographers called its scale galactic: far too costly to matter against the real standards, though they expect it to improve CIRG. The UK NCSC said deployed ML-KEM and ML-DSA are not threatened and its advice is unchanged NCSC. The takeaway for builders: keep migrating, combine a lattice scheme with a classical one (a hybrid), and design systems that can swap algorithms. Read Did AI crack RSA? for the full story.
Explain it to a colleague.
What a good answer covers
- To doThe pegs are the same; only the description changed.
- To doThe tidy basis is the secret; the skewed one is public.
- To doWhere the pegboard picture stops working.