What changes when ML-KEM moves from CPU to FPGA
Moving ML-KEM from CPU to FPGA changes what limits it. On a CPU the bottleneck is usually hashing and sequential polynomial arithmetic; in hardware the NTT parallelises well, hashing needs a dedicated core, and the constraint moves toward memory bandwidth and the entropy feeding sampling.
What the CPU is doing
On a general-purpose processor, ML-KEM time divides between polynomial arithmetic, sampling and symmetric primitives. The hashing share surprises people: SHAKE is used heavily for expansion and derivation, and on a CPU without Keccak acceleration it can dominate.
The arithmetic is also largely sequential in a straightforward implementation, using vector instructions where available but not exploiting the full parallelism the NTT structure allows.
What changes in hardware
- NTT parallelises. Butterfly operations are independent within a stage, so throughput scales with how many you instantiate, bounded by area and memory ports.
- Hashing needs its own core. A Keccak implementation in hardware removes what was often the dominant CPU cost. Without one, the FPGA reproduces the CPU bottleneck.
- Sampling becomes entropy-bound. Rejection sampling consumes randomness at a rate that a slow entropy path cannot feed, and a design drawing entropy across the host boundary can stall on it.
- Memory becomes the constraint. Polynomials are large; keeping them close to the arithmetic and scheduling movement is where a real implementation spends its effort.
The design decisions that matter
How many butterfly units, traded against area. Whether coefficients live in block RAM or distributed memory. Whether hashing and arithmetic are pipelined against each other or serialised. Whether entropy for sampling is generated locally or requested.
The last is the one with a security dimension as well as a performance one, and it is the argument for putting the source on the same card.
What to measure
- Operations per second for key generation, encapsulation and decapsulation separately — they are not symmetric.
- Latency per operation as well as throughput, since batching helps one and not the other.
- Resource utilisation: logic, DSP and memory, which is what decides whether it fits alongside everything else.
- Power per operation, for the efficiency comparison.
- Whether sampling stalls waiting for entropy at full rate, which is the failure mode a benchmark on an idle system will not show.