This repository provides an ultra-low-area hardware implementation of modular reduction and multiplication for Post-Quantum Cryptography (PQC) schemes.
Based on the novel LUT-K reduction technique proposed by Bertels et al. (2024) in "A Better Kyber Butterfly for FPGAs", this project achieves the smallest reported area for the Kyber modular multiplier. Furthermore, we bridge the gap between academic theory and engineering by:
- Completing the Architecture: Extending the original butterfly-only design into a full modular multiplier Processing Element (PE), integrated into the architecture of Yaman et al..
- Algorithm Portability: Successfully porting the LUT-K reduction technique to the Falcon signature scheme, demonstrating the method's versatility.
- Minimal Area (Kyber): Achieves 49 LUTs and 1 DSP for the modular multiplier, utilizing the hybrid K-reduction and LUT-based reduction strategy.
- High Performance (Falcon): Optimized LUT-K reduction for Falcon achieves 291 MHz on Artix-7.
- Robust Verification: Includes comprehensive testbenches covering all possible twiddle factors and input ranges to ensure 100% computational accuracy.
Figure 1. Implemented and synthesized results on Artix-7 in Vivado 2024.2.
The designs were implemented and synthesized using Vivado 2024.2 on a Xilinx Artix-7 FPGA (xc7a200tffg1156-3).
| Algorithm | Frequency ( |
LUTs | FFs | DSPs | Modulus ( |
Structure ( |
|---|---|---|---|---|---|---|
| Kyber (ML-KEM) | 331 MHz | 49 | 32 | 1 | 3329 | |
| Falcon (FN-DSA) | 291 MHz | 58 | 38 | 1 | 12289 |
Figure 2. Simulation results of the LUT-K reduction architecture for Falcon.
├── src/
│ ├── high-performance-multiplier/ # High-performance Kyber multiplier (4-PE)
│ ├── lightweight-multiplier/ # Lightweight Kyber multiplier (1-PE)
│ └── reduction-falcon/ # LUT-K reduction unit for Falcon
├── tb/ # Simulation testbenches
├── test-data/ # Reference vectors
└── README.md
This project provides two independent hardware IP cores and one reduction primitive:
src/high-performance-multiplier/ implements a 4 Processing Element polynomial multiplier for the Kyber (ML-KEM) scheme. Each PE handles one 12-bit coefficient pair per cycle, giving a throughput of 4 coefficients/cycle. It supports three hardware-controlled operations triggered by a single-cycle strobe signal:
| Operation | Signal | Description |
|---|---|---|
| Forward NTT | start_fntt |
Transforms coefficients into the NTT domain |
| Pointwise Mul | start_pwm2 |
Coefficient-wise multiplication in NTT domain |
| Inverse NTT | start_intt |
Transforms back and outputs final product |
A full polynomial multiplication (256-point NTT × NTT → PWM → INTT) completes automatically; the done signal pulses for one cycle upon completion.
src/lightweight-multiplier/ is the area-minimal variant using a single PE. It exposes the same interface as the 4-PE version (drop-in compatible signals), but processes one coefficient pair per cycle at lower throughput. This is the design that achieves 49 LUTs + 1 DSP at 331 MHz.
src/reduction-falcon/ provides:
-
falcon_KRED: A 2-stage pipelined modular multiplier for$q = 12289$ using the LUT-K technique. Computes$(-3 \cdot a \cdot b) \bmod q$ ; the implicit$-3$ factor is absorbed into pre-computed twiddle factors ($W' = W \cdot (-3)^{-1} \bmod q$ , where$(-3)^{-1} \bmod 12289 = 4096$ ). -
butterfly_falcon_kred: A complete CT/GS butterfly unit integratingfalcon_KREDfor full NTT on 1024-coefficient Falcon polynomials.
| Tool | Version | Notes |
|---|---|---|
| Xilinx Vivado | 2024.2 (recommended) | Synthesis, implementation & simulation |
| Target FPGA | Artix-7 xc7a200tffg1156-3 |
Or compatible Artix-7 device |
Vivado can be downloaded from AMD/Xilinx Download Center. A free WebPACK license is sufficient for Artix-7 synthesis.
git clone https://github.com/Kyrie-T/HPMM.git
cd HPMM- Launch Vivado and create a new RTL Project.
- In the Add Sources dialog, add all
.vfiles from the desiredsrc/sub-directory. - Set the top-level module:
- For 4-PE Kyber:
KyberHPM4PE_top - For 1-PE Kyber:
KyberHPM1PE_top - For Falcon reduction only:
falcon_KREDorbutterfly_falcon_kred
- For 4-PE Kyber:
- Set the target part to
xc7a200tffg1156-3(or your device).
All testbenches in tb/ are self-checking and print PASS / FAIL to the console. Reference data is loaded from test-data/ via $readmemh.
In Vivado Simulator:
- Add the chosen testbench
.vfromtb/as a simulation source. - Add the corresponding
src/RTL files. - Run behavioral simulation (
Run Simulation → Run Behavioral Simulation). - Observe the console output for test results.
Modular reduction is often the bottleneck in Lattice-based cryptography. This project leverages the specific structure of PQC moduli (
- LUT-based Reduction: Uses FPGA primitives (LUT-6) to pre-calculate reduction for high-order bits.
-
K-Reduction: Exploits the property
$k \cdot 2^x \equiv -1 \pmod q$ to strictly bound the result.
Figure 3. LUT-K reduction hardware structure used in the Kyber NTT datapath.
Figure 4. Unified butterfly hardware structure for Kyber NTT/INTT operations.
We extended the technique to the Falcon algorithm by adapting the parameters to its specific modulus:
-
Modulus:
$q = 12289$ -
Decomposition:
$12289 = 3 \cdot 2^{12} + 1$ - Optimization: The design efficiently handles the larger bit-width required for Falcon while maintaining a high clock frequency (291 MHz).
- FPGA: Xilinx Artix-7 (tested on
xc7a200tffg1156-3) - Toolchain: Xilinx Vivado 2024.2
- Language: Verilog HDL
If you use this code in your research, please acknowledge the following foundational works:
- Bertels, J., et al. "A Better Kyber Butterfly for FPGAs" (FPL 2024).
- Yaman, F., et al. "A Hardware Accelerator for Polynomial Multiplication Operation of CRYSTALS-KYBER PQC Scheme" (DATE 2021).

