Guides › Comparing test suites

SP 800-22 vs Dieharder vs TestU01 vs SP 800-90B

These tools answer different questions. Picking the wrong one either wastes days or gives you a result nobody will accept.

Updated October 20, 2026

At a glance

ToolQuestion it answersData neededTypical use
NIST SP 800-22Does this bit sequence show any of 15 known non-random patterns?~106 bits per sequence; many sequences to judge a generatorQuick screening of RNG/TRNG output, coursework, design checks
DieharderDoes the generator fail a broad battery of classic tests?Large: from hundreds of megabytes to gigabytes, or a live generatorWider screening of software and hardware generators
TestU01Does a PRNG survive very demanding batteries (SmallCrush, Crush, BigCrush)?Billions of numbers; BigCrush runs for hoursResearch-grade evaluation of pseudorandom generators
PractRandAt what output length does a flaw become detectable?Streams from megabytes up to terabytesStress-testing PRNGs until they break
NIST SP 800-90BHow much min-entropy does this noise source deliver per sample?1,000,000 samples, plus 1,000 restarts × 1,000 samplesEntropy source validation for FIPS 140-3

NIST SP 800-22

Fifteen tests, each returning a p-value, designed for random and pseudorandom bit generators used in cryptography. Its strength is that it works on modest amounts of data and produces results that are easy to explain. Its limits: it is a screening tool. Passing does not show unpredictability, and the suite does not estimate entropy. Start with how to run it.

Dieharder

Robert G. Brown's open-source suite collects George Marsaglia's original Diehard tests along with additional tests, and reports each as PASSED, WEAK or FAILED. It can test built-in generators directly or read a stream from a file or stdin. When a file is too small, Dieharder re-reads it from the start ("rewinds"), which invalidates many tests. Use large files or pipe from the generator.

TestU01

Pierre L'Ecuyer and Richard Simard's C library is the standard for evaluating pseudorandom number generators. SmallCrush runs in seconds; Crush and BigCrush take hours and consume billions of outputs, typically by linking your generator in as a function. For hardware generators that produce bit files, TestU01 also includes the Rabbit and Alphabit batteries.

PractRand

PractRand reads a stream and keeps testing at doubling lengths, reporting the point where anomalies appear. It is very effective at exposing weak PRNGs, which often fail somewhere between gigabytes and terabytes of output.

NIST SP 800-90B

SP 800-90B is about entropy sources, not finished random output. It checks whether samples look independent and identically distributed, then applies a set of estimators to give a conservative min-entropy per sample, and adds restart tests. For FIPS 140-3, entropy sources are validated against SP 800-90B, not SP 800-22. NIST publishes a reference implementation on GitHub.

We're considering adding SP 800-90B entropy assessment to NISTTEST.COM: upload samples, get min-entropy estimates, nothing to install. Join the waitlist to hear when it launches.

Which one should I use?

These tools complement each other. A generator that passes SP 800-22 can still fail BigCrush, and none of them replaces a design review of how the randomness is produced.

Start with the quick screen. Run all 15 SP 800-22 tests on your file, free, and see every p-value.

Run the free test

NISTTEST.COM is an independent implementation of NIST SP 800-22 Rev. 1a and is not affiliated with or endorsed by the National Institute of Standards and Technology. Product names belong to their respective authors.