NTT: Fast Polynomial Multiplication for Lattice Cryptography
Interactive 3D Number Theoretic Transform simulator: watch two polynomials multiply in the ring Z_q[x]/(x^n+1) the slow schoolbook way (O(n^2)) versus the NTT way Kyber and Dilithium actually use (O(n log n)), stage by stage, with real modular arithmetic verified live.
Every encryption and signature operation in post-quantum standards like CRYSTALS-Kyber and CRYSTALS-Dilithium boils down to multiplying polynomials inside a negacyclic ring ℤq[x]/(xⁿ+1). Done the schoolbook way that costs O(n²) modular multiplications; done via the Number Theoretic Transform — the modular-arithmetic cousin of the FFT — it costs O(n log n). This simulator runs the real Cooley-Tukey NTT algorithm (twist by a 2n-th root of unity, bit-reversed butterfly passes, pointwise multiply, inverse transform, un-twist) on a small demonstration ring, animates it stage by stage in 3D, and cross-checks every result against a direct schoolbook convolution to prove the two methods agree.
Watch the real Number Theoretic Transform multiply two polynomials in the ring used by CRYSTALS-Kyber and Dilithium, stage by stage in 3D, and see it verified live against a slow O(n²) schoolbook convolution of the same two polynomials.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install