Skip to main content
dw_
Menu
← All work
SecurityPaper

NIST SP 800-22 Test Suite(May 2026)

All 15 NIST randomness tests in C++17, built in a team of four - my part: the spectral (DFT) test, analyzed in depth

LiveCode

All 15 NIST SP 800-22 randomness tests implemented from scratch in C++17 by a four-person university team. My part was the spectral (DFT) test, analyzed in depth: radix-2 Cooley-Tukey plus Bluestein's chirp-z transform for arbitrary lengths, an O(n^2) direct DFT kept solely to cross-verify the fast path, and the incomplete gamma function built from first principles. That analysis surfaced a numerical error in NIST's own published worked example - N1=46 where the correct count is 48 - verified three independent ways: the project's own FFT, NIST's original reference FFT compiled and run separately, and NumPy. A Next.js front end spawns the C++ engine, so every test is runnable from the browser.

The 15 NIST tests, runnable from the interface, DFT treated in depth