# PQC on FPGA: Hardware Acceleration Patterns

**Source**: https://quantumsequrity.com/blog/pqc-on-fpga
**Category**: Hardware & Embedded

---

[← Back to Blog](../../blog) Hardware & Embedded

# PQC on FPGA: Hardware Acceleration Patterns

12 min read

Field-Programmable Gate Arrays (FPGAs) sit between general-purpose CPUs and custom silicon. They are reprogrammable: you describe a circuit in Verilog or VHDL, the FPGA tools synthesize it into a configuration bitstream, and the FPGA loads it into its lookup tables and DSP blocks. The result is a chip that runs your custom hardware. For cryptographic workloads, FPGAs have always been an attractive target. They give you the speed of dedicated hardware without the multimillion-dollar cost of taping out an ASIC.

Post-quantum cryptography is well-suited to FPGA acceleration. The NIST-standardized algorithms (ML-KEM, ML-DSA, SLH-DSA) all involve heavy polynomial arithmetic or hash chains that benefit dramatically from hardware parallelism. A naïve software ML-KEM implementation on a CPU spends most of its time in the Number Theoretic Transform (NTT). A pipelined FPGA NTT implementation can do the same work in a fraction of the time, because the underlying butterfly operations are inherently parallel.

This article walks through what FPGA implementations of PQC look like, where the speedups come from, what the major patterns are, and what the published designs achieve.

## Why FPGA for PQC

There are three main reasons to put PQC on an FPGA:

**Throughput**: A pipelined FPGA implementation of ML-KEM can do thousands of encapsulations per second, far beyond what a CPU achieves at the same clock speed. For server-side workloads (TLS termination at scale, certificate authority signing) this is meaningful.

**Power efficiency**: FPGA designs targeted to a specific algorithm use much less power per operation than a general-purpose CPU. For battery-powered or thermally-constrained applications, FPGAs can deliver crypto operations at 1/10 the power of a CPU.

**Side-channel resistance**: An FPGA can be designed to do every operation in constant time at the gate level, eliminating timing leaks that are hard to fully scrub from software. With shielding and careful design, FPGAs can also resist power analysis better than CPUs.

The trade-off is design effort. Writing efficient FPGA RTL for PQC is harder than writing efficient C code. The development tools (Vivado, Quartus) are complicated, and verification of cryptographic hardware is rigorous (you need exhaustive test coverage, formal verification of constant-time properties, and side-channel testing on real silicon).

## The NTT: The Heart of Lattice PQC on FPGA

Both ML-KEM and ML-DSA rely on the Number Theoretic Transform, a finite-field cousin of the Fast Fourier Transform. NTT lets you multiply polynomials in O(n log n) time instead of the naive O(n²). On a CPU, NTT is fast but bounded by single-issue scalar arithmetic. On an FPGA, you can do many NTT butterflies in parallel.

A typical FPGA NTT implementation has these components:

- **Butterfly units**: each unit does one Cooley-Tukey butterfly per cycle. The number of units determines the parallelism.
- **Twiddle factor ROM**: the roots of unity needed for the NTT. Stored in block RAM for fast access.
- **Memory banks**: the polynomial coefficients are stored in multi-bank BRAM so multiple butterflies can read and write simultaneously.
- **Modular arithmetic units**: every NTT operation is modulo q (typically a prime around 2^16 or 2^23, depending on the scheme). Modular multiplication is the most expensive primitive.

A modest FPGA implementation can have 16 butterfly units, doing 16 butterflies per cycle. A larger implementation might have 64 or 128. Each doubling of butterfly units roughly halves the NTT runtime, until memory bandwidth becomes the bottleneck.

For ML-KEM-768 on a Xilinx Artix-7 FPGA, published designs achieve around 5,000 to 10,000 encapsulations per second at 100 MHz. On a Xilinx UltraScale+ FPGA at 250 MHz, the same designs can do 50,000 or more. These are throughput numbers; latency per operation is in the tens of microseconds.

For more on the algorithm, see our [ML-KEM explained](../../blog/ml-kem-explained) article.

## Pipelined ML-KEM Architectures

The most common FPGA architecture for ML-KEM is a fully pipelined pipeline: each operation (NTT, polynomial multiplication, sampling, hashing) flows through a series of stages, with new inputs entering one stage as the previous output advances to the next.

This kind of pipeline maximizes throughput at the cost of resource usage. You need separate hardware blocks for each phase, plus all the buffer memory between them. A complete pipelined ML-KEM-768 design on a mid-range FPGA uses 30,000 to 60,000 LUTs (lookup tables) and 100-200 BRAMs (block RAMs). That fits on a $50-200 FPGA.

For lower-resource designs, you can do iterative or shared-resource architectures. A single NTT engine that processes the encapsulation, then the same engine processes the decapsulation. This is slower (because operations are serialized) but uses 1/3 to 1/5 of the resources. For embedded FPGAs (small Lattice or Xilinx Spartan parts), iterative designs are the right choice.

## Hash Functions on FPGA

PQC schemes use SHAKE-128 and SHAKE-256 (Keccak-based extendable-output functions) extensively. SLH-DSA also uses SHA-256 in some variants.

Keccak is well-suited to FPGA. The state is 1600 bits, organized as a 5x5 array of 64-bit lanes. Each round consists of five steps that operate on the full state. A typical implementation has the entire state in registers and computes one round per cycle. Keccak-f[1600] needs 24 rounds, so a single round/cycle implementation completes one absorb or squeeze block in 24 cycles.

For higher throughput, you can pipeline the rounds: 24 stages of pipeline, with one Keccak permutation finishing every cycle once the pipeline is full. This is expensive in resources but gives gigabytes-per-second hash throughput, which matches what fast PQC pipelines need.

Many PQC FPGA designs include 2-4 Keccak instances running in parallel, since multiple parts of the algorithm can hash independently. This works well on FPGAs because Keccak is parallel-friendly: there are no chained dependencies between separate hash calls.

## ML-DSA on FPGA

ML-DSA's signing operation is more complex than ML-KEM because it involves rejection sampling: the signer keeps generating polynomial samples until one passes a norm check. On a CPU, this leads to variable timing. On an FPGA, you can make the rejection sampling part of the pipeline, with sampled polynomials feeding into the norm check and rejected ones causing the pipeline to back up briefly.

Published ML-DSA-65 FPGA implementations on UltraScale+ FPGAs achieve roughly 1,000 to 5,000 signatures per second at 200-300 MHz, with latency around 100-500 microseconds per signature. Verification is faster, since it does not involve rejection sampling.

The interesting challenge in ML-DSA on FPGA is the keyed XOF (extendable-output function) calls inside the signing loop. These bottleneck the design, especially if you only have one Keccak instance. Designs with multiple Keccak instances can scale signing throughput linearly up to the point where polynomial arithmetic becomes the bottleneck.

For comparison with hash-based signatures, see our [ML-DSA versus SLH-DSA](../../blog/mldsa-vs-slhdsa) article.

## SLH-DSA on FPGA

SLH-DSA is a hash-based signature scheme. Signing is dominated by hash computations across a large tree of WOTS+ (Winternitz One-Time Signature) chains and FORS structures. Verification is similarly hash-heavy but less compute-intensive than signing.

SLH-DSA on FPGA looks very different from ML-KEM on FPGA. There is no NTT, no modular arithmetic, no polynomial work. It is essentially a hash engine doing many SHA-256 or SHAKE computations in sequence and parallel.

A pipelined SHA-256 pipeline can compute one SHA-256 round per cycle. A complete SHA-256 hash takes 64 rounds, plus the message schedule. With deep pipelining and multiple instances, FPGA SLH-DSA implementations can compute SLH-DSA-128s signatures in tens of milliseconds, compared to seconds on a Cortex-M4. That makes FPGA-accelerated SLH-DSA viable for occasional signing in embedded systems where the FPGA is already present (FPGA-based smart NICs, secure boot in FPGA-rich SoCs).

## Xilinx, Intel, Lattice: Vendor Differences

The major FPGA vendors are AMD/Xilinx (Spartan, Artix, Kintex, Virtex, Zynq, Versal) and Intel (Cyclone, Arria, Stratix, Agilex). Lattice serves the lower end with iCE40 and ECP5 families. Microsemi (now Microchip) covers radiation-hardened and low-power FPGAs. Each has its own toolchain (Vivado, Quartus, Diamond, Libero).

For PQC, the differences come down to:

- **Available DSP blocks**: modular multiplication uses DSP blocks (Xilinx) or DSP slices (Intel) for the polynomial coefficient arithmetic. More DSP blocks means more parallelism is possible.
- **Block RAM (BRAM) capacity**: PQC implementations need many small RAMs for polynomial storage and twiddle factors. Vendors with more flexible BRAM (multiple read/write ports, configurable widths) make implementations easier.
- **Hard ARM cores (Zynq, SoC FPGAs)**: useful for the parts of PQC that do not benefit from hardware (like the high-level protocol logic). Run the C code on the ARM, accelerate the inner loops on the FPGA fabric.
- **Configuration security**: bitstream encryption and authentication matter. If your PQC keys are baked into the bitstream, an attacker who can read the bitstream gets the keys. Modern FPGAs support encrypted bitstreams (AES-256-GCM is standard).

For typical commercial deployments, mid-range Xilinx parts (Artix or Kintex) and Intel parts (Cyclone or Arria) provide enough resources for full PQC implementations at reasonable cost.

## Side-Channel Considerations

FPGAs are good at constant-time arithmetic at the gate level, but they are not automatically immune to side channels. Power analysis attacks, electromagnetic emanation attacks, and fault injection attacks all apply.

Defenses on FPGA include:

- **Masking**: split secret values into multiple shares and operate on each share separately. Reconstruct the result at the end. This dramatically increases resource usage but provides strong differential power analysis protection.
- **Hiding**: add noise to power consumption with dummy operations or balanced logic styles. Less secure than masking but cheaper.
- **Fault detection**: redundant computations with majority voting, useful against fault-injection attacks.
- **Bitstream encryption**: prevent attackers from reading the FPGA configuration to extract keys or proprietary algorithms.

For high-security deployments (government, military, financial institutions), masked FPGA PQC implementations are the right answer. For commercial server-side PQC, simpler designs without masking are usually acceptable since the threat model is different.

For more on side channel attacks, our blog covers cache-based attacks and other mechanisms in detail.

## Where FPGA PQC Fits

FPGA PQC makes sense in a few specific places:

- **Server-side TLS at scale**: replacing software TLS termination with FPGA-accelerated TLS, including PQC-hybrid handshakes. Modern smart NICs (Mellanox BlueField, Intel IPU) include FPGAs that can host TLS offload.
- **Hardware security modules**: HSMs traditionally use FPGAs or ASICs to accelerate cryptography. PQC HSMs are starting to appear, with FPGA implementations as the most common architecture.
- **Embedded systems with FPGA fabric**: SoC FPGAs (Xilinx Zynq, Intel Cyclone V) can run ARM cores for high-level logic and use FPGA fabric for PQC acceleration.
- **Research and prototyping**: trying out new algorithm parameters, new optimization patterns, or new side-channel mitigations is much easier on FPGA than on ASIC.

For more on the ASIC trade-offs, see our [PQC on ASIC](pqc-on-asic.md) article. For embedded PQC without FPGAs, see [PQC on ARM Cortex-M](pqc-on-arm-cortex-m.md).

## What This Means for QNSQY Users

QNSQY runs on x86-64 computers with Linux or Windows, not on ARM or macOS. It does not use FPGA acceleration. But the underlying NIST-standardized algorithms it uses (ML-KEM, ML-DSA) are exactly what FPGAs are accelerating in production server deployments.

FPGA acceleration pays off on servers that encrypt at very high volume, where it delivers throughput without the per-CPU cost of software encryption. QNSQY's own operations run on the CPU.

## FAQ

**Are FPGAs faster than CPUs for PQC?**
For pure throughput, yes. A pipelined FPGA implementation of ML-KEM can match the throughput of dozens of CPU cores at much lower power. For latency on a single operation, modern CPUs are competitive because their clock speed is much higher than FPGAs.

**Can I run QNSQY on an FPGA?**
QNSQY is software, not RTL, so it cannot run on an FPGA. It also does not offload its cryptography to FPGA accelerators: it runs on the CPU of an x86-64 Linux or Windows computer.

**What FPGA do I need for full PQC support?**
A mid-range FPGA (Xilinx Artix-7 100T, Intel Cyclone V) handles ML-KEM-768 and ML-DSA-65 with reasonable throughput. For high-throughput server-side deployment, larger UltraScale+ or Stratix 10 FPGAs are common. SLH-DSA's signing is hash-heavy and benefits more from larger hash pipelines.

**How do FPGA implementations stay constant time?**
Careful RTL design. Branch-free operations, fixed iteration counts, no data-dependent loops. The synthesis tools can be configured to disable optimizations that introduce data-dependent timing. Verification involves simulation with constant-time checkers and post-synthesis power analysis on real silicon.

**Are there open-source FPGA PQC implementations?**
Yes. Several research groups publish their RTL on github. Names to look for include the "post-quantum-fpga" repositories from various universities, and commercial offerings from cryptographic IP vendors. Quality varies; for production deployment, vetting the design is essential.

## Sources

1. NIST FIPS 203 (ML-KEM): https://csrc.nist.gov/pubs/fips/203/final
2. NIST FIPS 204 (ML-DSA): https://csrc.nist.gov/pubs/fips/204/final
3. NIST FIPS 205 (SLH-DSA): https://csrc.nist.gov/pubs/fips/205/final
4. NIST SP 800-208 (Stateful Hash-Based Signatures): https://csrc.nist.gov/pubs/sp/800/208/final
5. ARM Cortex Documentation: https://developer.arm.com/Processors
6. RISC-V International Specifications: https://riscv.org/technical/specifications/

## Related Articles

- [What is Post-Quantum Cryptography](../../blog/what-is-post-quantum-cryptography)
- [ML-KEM Explained](../../blog/ml-kem-explained)
- [ML-DSA vs SLH-DSA](../../blog/mldsa-vs-slhdsa)
- [NIST FIPS Guide](../../blog/nist-fips-guide)
- [Hybrid Encryption](../../blog/hybrid-encryption)

---

### Protect Your Data Before Q-Day Arrives

QNSQY's NIST-standardized post-quantum encryption protects files against both current and quantum-era threats.

[Try QNSQY](../../pricing)
