Exercises
August 25, 20265 min readbeginner
Answers follow each question. Try them before reading on, since the whole point of small parameters is that these are checkable by hand.
Answers follow each question. Try them before reading on, since the whole point of small parameters is that these are checkable by hand.
1. A second basis of
Let be the identity matrix and
Verify that generates the same lattice by finding a unimodular with .
Answer. Since is the identity, itself. Its determinant is
which is , so is unimodular and by the rule in Good and Bad Bases.
Sanity-check it the other way. The columns and are both in , so . And while , both integer combinations, so .
02.2. The shortest vectors of the running lattice
For and , list the lattice points closest to the origin by norm. Confirm the shortest length and count how many points achieve it.
Answer. Ordered by Euclidean norm, the closest non-zero points are
then
then and at .
So , achieved by exactly four points. They are two vectors and their negations: and .
Four rather than two because and are genuinely different lattice vectors that happen to share a length. That is a coincidence of this lattice, not a general rule.
03.3. A determinant-1 lattice with a long shortest vector
Construct with whose shortest vector is longer than . How close can you get to Minkowski's bound of ?
Answer. The best packing in the plane is the hexagonal lattice. Take
Both have length , the angle between them is , and the determinant is . Rescale by to bring the determinant to , and the shortest vector becomes
Minkowski's bound at , is , so the hexagonal lattice reaches about of it. That gap is not slack in your construction. The hexagonal lattice is provably optimal in two dimensions, so is the true maximum and Minkowski's bound is simply not tight.
04.4. Why noise is not optional
Take the worked LWE instance with but set every error to zero. Recover .
Answer. With no noise the samples are exact, so and
The determinant of modulo is , which is non-zero, so is invertible and
Exact, in one step.
Compare with Noise Breaks Linear Algebra, where the same inversion on the noisy returned . Three errors of magnitude at most one turned a one-step solve into an unrelated answer.
05.5. The variance of the centred binomial
Show that has variance .
Answer. Write with all bits independent and uniform.
Each term takes the value with probability , with probability , and with probability . Its mean is zero by symmetry, and its variance is
The terms are independent, and variances of independent variables add, so
Checking directly: gives variance , and gives . Both match.
6. Why a larger makes LWE easier
Argue why raising while holding the error distribution fixed weakens LWE. What is the role of ?
Answer. What matters is not the absolute size of the noise but its size relative to the modulus, the ratio .
The noise hides the secret by making each equation ambiguous. If stays fixed while grows, each error covers a smaller fraction of , so each sample pins the secret down more tightly. In the extreme, enormous against means the noise barely perturbs anything and the system is nearly exact, which is solvable.
Geometrically, from The Learning With Errors Problem: the observed sits at distance from a lattice point, and the lattice spacing scales with . Larger with fixed means the target sits proportionally closer to its lattice point, and bounded-distance decoding gets easier as that ratio shrinks.
This is why ML-KEM's small is a security-conscious choice rather than only an efficiency one. It keeps comfortably large while also keeping coefficients at 12 bits.
7. The lattice
Let . Exhibit a basis and compute the determinant.
Answer. A basis is
Each has an even coordinate sum, so each is in , and integer combinations preserve that parity, so the lattice they generate is inside .
The determinant of the matrix with those rows is .
That value is the sanity check on completeness. is exactly half of , keeping one parity class out of two, and has determinant . A sublattice of index has determinant , which is what came out, so the three vectors generate all of and not a smaller piece of it.