Post-quantum polynomial multiplication, in hardware.
A streaming number-theoretic transform core for CRYSTALS-Kyber / ML-KEM. As few as 16 cycles per multiplication, zero block RAM, and a throughput you set. Delivered for your FPGA, or ported to your ASIC.
Highlights
- Polynomial multiplication for CRYSTALS-Kyber / ML-KEM: degree 256, modulus 3329
- One ring covers ML-KEM-512, ML-KEM-768, and ML-KEM-1024
- Degree and modulus set per delivery, for other algorithms
- 1, 2, 4, or 8 butterfly units per stage. Doubling them doubles throughput
- 128, 64, 32, or 16 cycles per Kyber multiplication
- Zero block RAM
- Each stage starts as soon as the coefficients it needs are ready
- Twiddle factors computed on the fly, with no bit-reversal step
- Streaming interface with backpressure
- Verified against an independent schoolbook multiplier, with code coverage
Overview
The Qryptic polynomial multiplier streams two polynomials through a forward number-theoretic transform, a pairwise multiply, an inverse transform, and a final scale, and streams the product out. The implemented and measured build is CRYSTALS-Kyber / ML-KEM, which follows the FIPS 203 transform. Its final scale is 3303, which is 128−1 mod 3329.
Degree and modulus are chosen for each delivery. A different degree changes the number of transform stages, and a different modulus changes the coefficient width and the modular reduction. You also choose how many butterfly units sit in each stage, which trades area for multiplications per second.
Each stage keeps only its own alignment storage, in registers and distributed memory. The schedule emits coefficients in exactly the order the multiply consumes them, so throughput is not spent on reordering.
Applications
- ML-KEM key generation, encapsulation, and decapsulation
- Other polynomial multiplies, once degree and modulus are set
- Hardware security modules
- FPGA security subsystems
- ASIC multiply blocks
Technology
- Clock measured at 260 MHz on a Virtex-7 board
- Place-and-route, out of context
- Delivered for an FPGA device, or ported to an ASIC, as scoped
One streaming pipeline.
Coefficients flow through without waiting for a full polynomial. One coefficient beat goes in per clock when there is no backpressure.
The second polynomial can be transformed inside the core, or it can arrive already transformed. The second option is the usual choice when a public matrix has been prepared ahead of time, and it saves area.
Key features
- Streaming multiply of two polynomials, one coefficient beat per clock when there is no backpressure
- Kyber arithmetic follows the FIPS 203 transform: forward transform, pairwise multiply, inverse transform, and a final scale by 3303
- Degree, set per delivery: a longer polynomial adds transform stages
- Modulus, set per delivery: the coefficient width and the reduction follow the modulus. The Kyber build uses 12-bit coefficients
- Each beat carries 2 × (units per stage) coefficients, paired from the low and high halves of the polynomial
- If the hardware does not transform the second polynomial, that polynomial arrives in step with the transformed first polynomial
- No block RAM for coefficients or for a twiddle table
Interface
- Clock, and an active-low reset
- Two input polynomials and one output polynomial, each as coefficient beats marked valid or not
- Backpressure: if the consumer does not accept the current output beat, that beat holds and both inputs are held
- An optional bus wrapper on the streaming interface
Deliverables
- RTL configured for the agreed degree, modulus, butterfly units per stage, and treatment of the second polynomial
- The streaming interface described above
- A bus wrapper, when a bus is requested
- Verification: the tests, the test report, and code coverage
Kyber build: degree 256, modulus 3329.
Clock and throughput were measured on a Virtex-7 board at 260 MHz. LUT, flip-flop, LUTRAM, and DSP counts are from place-and-route on Artix-7 xc7a100tiftg256-1L.
Second polynomial arrives already transformed
| Units per stage | Cycles | LUT | Flip-flops | LUTRAM | DSP | Clock | Multiplications / s |
|---|---|---|---|---|---|---|---|
| 1 | 128 | 4,482 | 4,139 | 567 | 22 | 260 MHz | 2.03 million |
| 2 | 64 | 7,210 | 6,806 | 916 | 36 | 260 MHz | 4.06 million |
| 4 | 32 | 13,320 | 12,668 | 1,613 | 72 | 260 MHz | 8.13 million |
| 8 | 16 | 25,196 | 24,142 | 2,827 | 144 | 260 MHz | 16.25 million |
Second polynomial transformed in the core
| Units per stage | Cycles | LUT | Flip-flops | LUTRAM | DSP | Clock | Multiplications / s |
|---|---|---|---|---|---|---|---|
| 1 | 128 | 6,105 | 5,789 | 802 | 29 | 260 MHz | 2.03 million |
| 2 | 64 | 9,966 | 9,764 | 1,283 | 50 | 260 MHz | 4.06 million |
| 4 | 32 | 18,334 | 18,093 | 2,255 | 100 | 260 MHz | 8.13 million |
| 8 | 16 | 34,490 | 34,434 | 3,887 | 200 | 260 MHz | 16.25 million |
Block RAM is 0 in every build. Cycles are NTT cycles per polynomial multiplication. Multiplications per second are the clock divided by the beats per polynomial, with no backpressure.
Fast, lean, and hardened against side channels.
The core comes out of Qryptic’s peer-reviewed NTT hardware research.
The research figures describe the published designs, measured under the conditions in each paper. The 260-cycle result is for the NTT alone. The product tables above are for the full multiplier.
Verification of the Kyber configuration
Products are compared with an independent schoolbook multiplier in Z3329[x] / (x256 + 1), coefficient by coefficient, across every butterfly setting and both treatments of the second polynomial. Code coverage was collected.
- Random polynomials, back to back and with gaps
- A long run of random pairs with idle time between them
- Zero times zero, and a zero polynomial on either side
- Multiply by the constant polynomial 1
- Every coefficient at modulus minus one
- A single nonzero coefficient, including the wrap through x256 = −1
- The same pair twice, and both orders of the two polynomials
- No backpressure, with every beat accepted
- Random backpressure
- Backpressure on the first output beat, on the last beat of a polynomial, and held for many cycles
- Idle cycles only between polynomials
- Reset while idle, in the middle of a polynomial, and while an output beat is held
- Repeated at 1, 2, 4, and 8 units per stage
A version for your algorithm.
Write to contact@qryptic.ca with the algorithm (or the degree and modulus), the multiplications per second you need, the FPGA or ASIC target, and whether the second polynomial is already transformed.
Request the IPThe Kyber build follows the FIPS 203 transform. It is not a certified implementation.