The Target Ring $R_q$
August 25, 20269 min readbeginner
We have arrived at the construction the chapter has been pointing at. This note assembles all the pieces into a single object, computes a fully worked product inside it, lists the…
We have arrived at the construction the chapter has been pointing at. This note assembles all the pieces into a single object, computes a fully worked product inside it, lists the few properties that will matter downstream, and writes down the specific values of and that Kyber and Dilithium use.
01.Definition
For a positive integer and a positive integer , the ring is
Read this from left to right. Start with the integers modulo , namely . Form polynomials with coefficients in , namely . Quotient by the ideal generated by , which means replacing every by during arithmetic.
Every element of is represented uniquely by a polynomial of degree strictly less than :
where each coefficient lives in . So an element of is a list of coefficients, each one a residue in . The ring has exactly elements.
Two elements are added by adding their coefficient lists slot by slot, with sums reduced modulo . Two elements are multiplied by doing schoolbook polynomial multiplication and then reducing the result modulo using the rule .
A small worked product in with
Let and . Elements of are polynomials of degree at most with coefficients in . The reduction rule is .
Take
Step 1. Schoolbook multiplication, ignoring the reduction by for now.
Expand each term:
Group by power of :
- :
- :
- :
- :
- :
So before reduction, .
Step 2. Reduce modulo , that is, replace every by .
. The rest of the polynomial has degree at most , so it is left alone.
Step 3. Reduce coefficients modulo . None of exceed , so the answer is already in canonical form:
That is one full multiplication in done by hand. Both reductions (by and by ) happen at the end, and you could equally well reduce intermediate values as you go, since reduction commutes with arithmetic. In hardware, reducing as you go keeps the data path narrow.
03.A second worked product, illustrating the negacyclic flip
Stay with , . Take
Schoolbook product: .
Reduce modulo : . In , the coefficient becomes . So the answer is , or equivalently if you prefer the centred representation instead of .
The minus sign is the negacyclic part of the negacyclic ring. If we had quotiented by instead of , the rule would be , and there would be no sign flip (that is the cyclic case). The choice of over is what makes this ring negacyclic, and it has consequences for the cryptanalysis. The schemes in this book all use .
Properties of in the cryptographic sizes
A few properties of are worth stating, since they are what makes the cryptography possible.
is a commutative ring with identity. It inherits its ring structure from via the quotient construction. The additive identity is the zero polynomial, and the multiplicative identity is the constant polynomial .
is finite. It has elements. For Kyber's parameters (, ), this is roughly elements. Each element fits in bits, which for Kyber is bits = bytes. A single element is the natural unit of bandwidth in this cryptography.
is not always a field. Even when is prime, the polynomial can be reducible (factor non-trivially) over , in which case is a proper ring, not a field. Whether this is a feature or a bug depends on the use. For Kyber and Dilithium, over factors fully into linear factors thanks to a careful choice of , and the factorisation is exactly what makes the Number Theoretic Transform fast.
Multiplication in has structure that hardware can exploit. A naive schoolbook multiplication of two degree- polynomials takes coefficient multiplications. The Number Theoretic Transform reduces this to , which for is the difference between roughly and roughly coefficient multiplications per product. The NTT is the subject of Chapter 4 and is the central data path of the hardware.
05.NIST parameter sets
The post-quantum standards fix specific values of and .
| Scheme | Coefficient bits | Element size | ||
|---|---|---|---|---|
| ML-KEM (FIPS 203, formerly Kyber) | bytes | |||
| ML-DSA (FIPS 204, formerly Dilithium) | bytes |
Both schemes use . That is a deliberate design choice: a single hardware NTT of length is enough to serve both schemes, and is the basis of every "unified accelerator" paper in the post-quantum literature. The two values of differ. Kyber's is small enough that a coefficient fits in bits, which is friendly to small-FPGA deployment. Dilithium's is larger, requiring bits per coefficient, but it is still less than a -bit word.
Both moduli are prime, and both satisfy
since and .
Only one of them satisfies the stronger congruence modulo , and the difference matters more than anything else on this page. Working it out:
The condition is exactly what a primitive -th root of unity needs in order to exist in , and that root is what the fast transform runs on. So ML-DSA gets the complete transform and ML-KEM does not.
That is not a defect in ML-KEM. It is a deliberate trade, and the NTT chapter explains both the workaround and why a modulus small enough to fit a coefficient in twelve bits was judged worth it.
06.Why this ring, not some other
Three properties make the right home for module-lattice cryptography.
The first is compactness. Each element packs coefficients into a single algebraic object. A vector of such elements (the secret key in Kyber is such a vector) shrinks key sizes by a factor of compared to a flat vector of scalars. That compactness is what makes lattice cryptography practical at all. RSA keys are around to bits. Kyber keys are around to bits. Larger, but not impossibly larger, and that is the difference between deployable and not.
The second is fast multiplication. The NTT exploits the structure of to multiply two elements in time instead of . Without this speedup, the cryptography would be slow enough to be unusable. The NTT lives inside this ring. It does not work for arbitrary polynomial moduli.
The third is security reduction. Deciding whether a given pair has the form for some short secret and small noise is conjectured to be as hard as the worst-case Shortest Vector Problem on lattices. This is the Ring-LWE problem, and it is the assumption on which Kyber's security rests. The structure of gives the proof. Switching to a different ring would invalidate the security argument.
These three properties are what the chapter has been building towards. Now that the ring is in hand, the cryptography itself, and the question of why lattices, can be tackled. That is the subject of the remaining chapters.
07.Chapter summary, in three lines
A ring is a set with two compatible operations. The integers modulo a prime form a finite field. Polynomials with coefficients in that field, quotiented by , form the ring where Kyber and Dilithium do their work.
If the symbol at the top of this chapter feels different now from how it looked at the start, the chapter has done its job. Chapter 2 explains why lattice-based cryptography exists in the first place: what the public-key cryptography of the last fifty years looked like, what Shor's algorithm broke, and how the NIST competition arrived at module-lattice schemes as the replacement.