arXiv:2609.06412cs.CRSep 2026

Manuscript Offprint

arXiv:2609.06412

FoldNTT: A Multiplier- and Twiddle-Lean NTT Core with Formally Verified Arithmetic for Proth Primes

Masato Kamba

Masato Kamba

Nyx Foundation

Abstract—Hardware for lattice-based post-quantum cryptography spends a large share of its area on the number-theoretic transform (NTT), dominated by modular multipliers and twiddle storage. FoldNTT is a redesign of the released radix-2 CFNTT accelerator (TCHES 2022) for the Falcon / FN-DSA prime q=12289q = 12289 with one hardware multiplier per butterfly instead of three and about half the stored twiddle constants. The Proth shape q=3⋅212+1q = 3 \cdot 2^{12} + 1 turns modular reduction into shift-and-add K-RED folds, and the bit-reversed twiddle table obeys w[N/2+j]=ψ⋅w[j]w[N/2+j] = \psi \cdot w[j], so half the table is derived without a multiplier. Checking the released RTL against the mathematics also exposed a bug: its inverse transform omits a per-stage halving and returns 210⋅x2^{10} \cdot x, which the retrofit corrects. Every arithmetic block is proven by exact-width SMT and compositional SymbiYosys proofs, control-safety invariants by k-induction; the proofs are mutation-tested and the composed transform is validated by simulation, all rerun by CI. On Artix-7 in a fully open flow, the retrofit costs 3→13 \to 1 DSP48 per butterfly and −50%-50\% stored twiddle bits at a whole-core Fmax cost of about 4%4\% (best of three seeds; within the seed-to-seed spread), measured on the released datapath driven by a controller we reconstructed (the reference FSM was never released) and validated by full-core simulation; a sequential core with our own controller builds to a timing-gated Basys-3 bitstream.

1. INTRODUCTION

Lattice-based post-quantum schemes such as Kyber/ML-KEM [1], Dilithium/ML-DSA [2], and Falcon/FN-DSA [3] spend a large share of their cycles in polynomial multiplication, which hardware accelerates with the number-theoretic transform (NTT), a Fourier-style transform over integers modulo a prime qq. The NTT's hardware cost is dominated by two resources: the modular multipliers inside the butterflies and the twiddle ROM. This paper reduces both without changing the surrounding memory system or control.

We start from a concrete, peer-reviewed artifact: the CFNTT accelerator [4], whose contribution is a conflict-free memory mapping for an in-place radix-2/4 NTT, released as open RTL. From it we build FoldNTT, an NTT core that preserves the forward transform, corrects the inverse, and uses a third of the multipliers and about half the stored constants; every arithmetic block is proven equal to the mathematics and the composition is validated by simulation. Three components deliver this.

  • A verified 1-multiplier butterfly (§4.1). For q=12289=3⋅212+1q = 12289 = 3 \cdot 2^{12}+1 (a Proth prime, and Falcon's modulus), the reference's Barrett reduction spends two hardware multipliers

beyond the unavoidable product. We replace them with shift-add K-RED folds, leaving one multiplier total, and fold the resulting constant factor into the twiddle ROM. K-RED is established in software NTTs and in hardware, for Kyber and for FHE-sized moduli (§2); our contribution is the verified drop-in retrofit, in which the same ROM fold supplies half of the repair for a bug we found in the released inverse transform (§3).

  • A ψ\psi-fold twiddle ROM (§4.2). The bit-reversed negacyclic table obeys w[N/2+j]=ψ⋅w[j]w[N/2+j] = \psi \cdot w[j]; with ψ\psi shift-friendly (Falcon ψ=7\psi = 7), half the ROM is derived by a shift-subtract followed by a constant-threshold reduction, with no multiplier. This approximately halves the stored words (1023→5121023 \to 512; the folded table keeps a scaled w[0]w[0] as a base word); the relation recurses to a quarter algebraically. It is distinct from the negation symmetry used by prior half-memory twiddle generators, which is unavailable here because the stored ψ\psi-exponents span [0,N)[0, N) while ψ\psi has order 2N.

  • A functional-verification methodology (§5) that checks the arithmetic and datapath against a mathematical specification, down to the shipped ROM contents, reproducibly in CI. This differs from the masking/side-channel focus of recent PQC-hardware verification. Its abstractions are domain-faithful (the solver, not a hand argument, discharges the assume-guarantee seams), its control-safety proofs are inductive, and the proofs are mutation-tested (eight mutations over five harnesses). The inverse-transform bug surfaced through this checking, not through the shipped testbench.

The K-RED leg generalizes to other Proth NTT primes, with a generator that emits and checks per-prime reducer RTL (§4.3), validated on Kyber (q=3329q = 3329). §6 reports costs measured in an open FPGA flow (yosys + openXC7 nextpr-xilinx, Artix-7), with no Vivado required: at the whole core, 3→13 \to 1 DSP per butterfly and half the twiddle storage at a Fmax cost of about 4%4\% (−21%-21\% on Compact-FALCON's ENS normalized-area metric, defined in §6), and the inverse-transform bug fixed. Because the released radix-2 core's control FSM was never published, we reconstructed one from the datapath's own timing and validated it by full-core simulation (§5); the whole-core numbers are measured on that controller. The design is one construction with two instantiations: the streaming retrofit demonstrates the claim on the published architecture, and a sequential single-butterfly (BFU) core with our own controller (the “own-FSM core” below) packages the same verified blocks as a self-contained accelerator that builds to a bitstream ( §6§6).