← Back to section · Research Resources

Entropy and Randomness Assessment Tools: What Statistical Tests Can and Cannot Show

Randomness underlies every cryptographic system. This article maps the differing positions of the NIST SP 800-90B entropy-source assessment method, the SP 800-22 statistical test suite and general-purpose test tools: statistical tests can reveal bad randomness, but they cannot prove good randomness.

Published 22 November 2026 · 5 min read · PQ Frontier

Entropy and Randomness Assessment Tools: What Statistical Tests Can and Cannot Show
AI-generated site artwork
Video explainer · Tool Navigation: choosing tools by task

Why randomness resists measurement

The security of all key generation, padding and sampling rests on random numbers, yet “random” is precisely the property hardest to measure directly. The root difficulty: unpredictability is defined relative to an attacker’s knowledge, while test tools see only the output sequence itself. A sequence generated deterministically by a public algorithm from a public seed can be statistically flawless and hold no secret from an attacker at all. Randomness assessment tools are therefore designed in two layers: one assesses how much unpredictability the entropy source itself provides, and one checks the statistical health of output sequences. This article maps the representatives of both layers and how to read them.

Entropy-source assessment: the SP 800-90B path

NIST SP 800-90B is the dominant framework for entropy-source assessment and the basis for the random-number-generator part of CMVP validation. It requires sampling the raw output of the noise source, choosing an assessment path according to whether the source is approximately independent and identically distributed, and applying a battery of estimators (from different angles — most-common-value, collision, Markov-chain based and others) to produce a conservative min-entropy estimate. The object of assessment is the entropy source, not the post-processed output, because a sequence that has passed through cryptographic conditioning conceals the true health of the source.

Reading a 90B conclusion, check three things: whether samples were taken from the raw noise output; which estimator’s min-entropy value governs (the specification requires the conservative value); and the health-test setup — startup tests and continuous health tests are the mechanisms by which a source self-checks at runtime, and an assessment report should state their thresholds and failure handling. Using the framework well requires a raw sampling interface, which many finished devices do not expose; 90B-style assessment therefore mostly happens at chip and module vendors, and application-layer researchers are more often readers of assessment reports than producers of them.

Statistical test suites: SP 800-22 and general tools

The second layer is statistical testing. The NIST SP 800-22 suite contains a dozen-plus tests — frequency, runs, spectral, template matching and more — checking from different angles whether a sequence deviates from the statistical profile of a random one. General tools include academic suites such as dieharder and TestU01, which test more stringently and are commonly used to assess generator output quality; lightweight tools (a simple entropy-calculation command, say) give only a rough impression of byte distribution and cannot support any formal conclusion.

The correct positioning of such tests is “health screening”: they are very effective at exposing design errors, implementation defects and entropy-source degradation — several historical randomness incidents first surfaced in statistical testing. But their conclusions point one way only: failure is a strong signal, passing is weak evidence. An assessment report that merely states “passed all SP 800-22 tests” without sample size, sample provenance and test parameters carries very limited evidential value.

Between the layers: deterministic random bit generators

A complete random number generator consists of an entropy source, a conditioner and a deterministic random bit generator (DRBG), and the SP 800-90 series specifies the three separately (90A for DRBG mechanisms, 90B for entropy sources, 90C for overall constructions). Tool choice must match the layer in question: to question whether entropy suffices, assess the noise source by the 90B path; to question whether a DRBG is implemented correctly, verify the mechanism against official test vectors; to question overall output quality, run statistical screening. Confusing the layers is a common structural error in assessment reports — answering an entropy question with a statistical pass is measuring blood pressure with a thermometer. In the post-quantum context the distinction matters more: key generation and sampling consume far more randomness than classical schemes, so entropy-source throughput and health enter directly into system design constraints.

A checklist for reading assessment reports

Faced with a randomness assessment report, a researcher can ask a fixed list of questions. At the sample level: were samples taken from raw noise output or from processed sequences; is the sample size sufficient for the power of the estimators and tests used; does the sampling environment resemble the deployment environment? At the method level: which path did the entropy assessment take, which estimators’ results were used, and is the final entropy figure the conservative value; for statistical tests, which suite was used, and are significance levels and multiple-testing handling stated? At the conclusion level: does the report claim “no anomaly detected” or “entropy reaches a stated value” — two claims of entirely different evidential strength; and are health-test thresholds and failure handling written into the design rather than improvised in the laboratory? A report still vague after this checklist should be treated as insufficient evidence, not as a pass.

Common misuses

The first misuse is treating a statistical pass as a security certification, advertising that “the random numbers passed NIST testing and are therefore secure” — the test suites never promised that meaning, and NIST’s own documents explicitly caution that statistical testing cannot substitute for entropy-source assessment. The second is fake sampling: drawing samples from post-conditioned output for an entropy assessment measures the conditioner forever and the source never. The third is ignoring sample size: statistical tests have low power on small samples, and “no anomaly detected” may simply mean “not measured enough”. The fourth is testing only the initial state: entropy sources drift with temperature, voltage and ageing, and a one-off assessment cannot replace continuous health testing at runtime.

Closing

The navigation principle for entropy and randomness assessment tools is to first decide which layer the question belongs to: the unpredictability of the entropy source, the implementation correctness of the DRBG, or the statistical health of the output sequence. Match the layer and the tool and conclusion line up; mismatch it and even the most rigorous test answers the wrong question. When reading any randomness claim, ask where the samples came from, which layer was measured, and how large the samples were — these three questions filter out most vague claims.

Tags: random numbersentropy assessmentSP 800-90Bstatistical testing