Roots of Unity in a Finite Field
August 25, 20266 min readbeginner
The classical Fast Fourier Transform evaluates at complex numbers e^2i k / n. There are no complex numbers in Z_q.
The classical Fast Fourier Transform evaluates at complex numbers . There are no complex numbers in . This note finds replacements inside the field itself, and discovers a condition on that decides whether the whole method is available at all.
01.What we are looking for
An element of is a primitive th root of unity when
The first condition says returns to after steps. The second says it does not do so any earlier. The number is called the order of .
The second condition matters as much as the first. The element satisfies for every and is useless, because its powers are all the same value and evaluating at the same point times determines nothing.
02.When they exist
Theorem. The non-zero elements of under multiplication form a cyclic group of order . It contains an element of order if and only if divides .
Cyclic means there is a single element , called a generator, whose powers run through every non-zero element exactly once. Given a generator, an element of order is
and that exponent is a whole number precisely when divides . That is the whole content of the theorem.
Working it out in
Take , so . The divisors of are , so contains primitive roots of unity of exactly those orders and no others. There is no primitive cube root of unity in , because does not divide .
A generator is . Its powers, which appeared in Chapter 2, are
which is all sixteen non-zero residues, confirming it generates.
So a primitive th root is , and a primitive th root is .
But is not the only element of order . Check :
The value shows the order divides , and rules out order or less. So has order exactly as well, and it is the one this chapter uses, because its powers are pleasant to compute with by hand.
04.The negacyclic requirement
Evaluation and Interpolation ended on a mismatch. The natural construction computes modulo , and needs modulo .
The fix is to evaluate not at the th roots of unity but at the roots of , which are the elements whose th power is rather than .
Here is where to find them. Let be a primitive th root of unity. Then , so , so is either or . It cannot be , because that would make the order at most rather than . Therefore
Now take the odd powers . Each raised to the th power gives
So all of them are roots of , and they are distinct because has order .
Those are the evaluation points. Evaluating at the roots of the reduction polynomial is what makes the reduction invisible to the transform, and therefore what makes pointwise multiplication compute the correct negacyclic product.
The requirement is now explicit:
Check it for the running example. With , we need , which holds, and is the primitive th root found above. The four evaluation points are
Verify each is a root of modulo :
All four check out. The evaluation grid is .
The quirk
Now apply the same test to the modulus ML-KEM actually uses, and it fails.
For ML-KEM, and . Then
The requirement is that divides . It does not, because carries only eight factors of two and needs nine.
So contains no primitive th root of unity, and the full length- negacyclic transform this chapter is building does not exist for ML-KEM's parameters.
What does exist is a primitive th root, since divides exactly. FIPS 203 uses , and it can be checked that has order exactly modulo , with .
That is enough to run the transform for seven levels instead of eight. Rather than splitting all the way down to single values, the recursion stops one level early, leaving polynomials of degree less than . Pointwise multiplication is then not quite pointwise: each of the pairs is a small product of linear polynomials rather than a single coefficient multiplication.
This is the incomplete NTT, and every ML-KEM implementation in existence carries it. It costs roughly a factor of two against what a complete transform would achieve.
It is reasonable to ask why NIST accepted a modulus that does not quite fit. The answer is that is small, small enough that a product of two residues fits in bits and a coefficient in . That keeps multipliers narrow, keeps memory small, and keeps vectorised software fast. A modulus one bit larger with a friendlier factorisation would have paid for its clean transform everywhere else.
06.ML-DSA has no such problem
For ML-DSA, , and
Thirteen factors of two, and only nine are needed. So comfortably, a primitive th root exists, FIPS 204 uses , and the complete length- negacyclic transform runs exactly as described in this chapter.
The modulus was chosen with the transform in mind, which is what the special form is for. It also makes reduction cheap, as Chapter 7 will show.
With the evaluation points in hand, the next note defines the transform and computes one.