Entropy & Random / Entropy Testing
What you will do: Load a sample (Generate Random, All Zeros and Incrementing are 64 bytes; Repeating Pattern is 1,024 bytes; or Paste Hex), press Run the checks, and read each group separately: visual checks, health tests, estimators (not run here) and primitive self-checks.
Worked example: Load Repeating Pattern (deadbeef repeated over 1,024 bytes) and run: the visual checks flag the pattern, Adaptive Proportion signals a failure on two full 512-sample windows (0xDE recurs 128 times against a cutoff of 13), Repetition Count stays quiet, and each result shows its value, its cutoff and its limit.
Runtime and privacy: The cryptographic exercise runs in this browser. Review the site privacy terms before entering sensitive material; use synthetic inputs for learning and evaluation.
Browse all Crypto Lab tools · Learn with Entropy & Randomness
For your role
- Developer / Engineer
- Paste Hex from your own generator's output and run the static tests to see the grouped results; Run reference samples under Primitive self-checks compares SHA-256 and HMAC with public NIST ACVP-Server reference samples — algorithm correctness only, not an entropy test.
- Security Architect
- Use the Bit Flipper and the Live Monitor to see which corruption the checks notice and which they miss; the point for a design is that ML-KEM and ML-DSA key generation depends on entropy these output checks cannot measure.
- Researcher / Academic
- Load Generate Random, then All Zeros, Repeating Pattern and Incrementing under Static Tests: the grouped results show which visual check and which SP 800-90B health test each bad sample trips — Incrementing trips no health test at all — and the page says an entropy estimate needs the NIST SP 800-90B EntropyAssessment tool on raw data.
- Certification & Validation Engineer
- Run the Static Tests and read the grouped results: the two SP 800-90B health tests are reported apart from the visual checks, and the page points to the NIST SP 800-90B EntropyAssessment tool for the estimate an entropy-source validation needs.
Bit Flipping Experiment
Click individual bits to toggle them and watch each group of checks react. Which kind of corruption do they notice, and which do they miss?
Visual checks (SP 800-22-style output statistics)
SP 800-90B health tests (§4.4)
Visual checks describe these 64 bytes only and give no security verdict. The health tests treat each byte as a raw noise-source sample at an assumed H = 8 bits/sample; on browser output they are a demonstration only.
Try these experiments:
- Use "Flip 10%" a few times: random flips on random data leave random-looking data, so the checks rarely react.
- Click "All Zeros": every visual check lands outside range and both health tests signal a failure — a stuck source is what the Repetition Count Test is for.
- Output checks only see structure. A degraded source that still emits unstructured output looks the same as a healthy one to them.
Streaming Entropy Monitor
Watch the checks react in real time. Switch sources mid-stream and see which group responds — none of them measures entropy.
Try this: Start with Web Crypto, then switch to "All Zeros" or "Repeating 0xDEADBEEF" mid-stream. All Zeros trips the Repetition Count health test in the first batch; the repeating pattern never repeats a byte back-to-back, so the Adaptive Proportion test fires instead. Each batch is 64 bytes, so Adaptive Proportion runs on a partial window (SP 800-90B §4.4.2 specifies 512 samples for 8-bit data), and on browser output the health tests are a demonstration only — they are defined on raw noise-source samples (§4.3 item 6).
Entropy Testing Dashboard
Load a data sample and run the checks. Results appear in four separate groups: visual checks, SP 800-90B health tests, SP 800-90B entropy estimators (not run here) and primitive self-checks. None of them, alone or added up, tells you whether a source is unpredictable.
Samples are 64 bytes, except Repeating Pattern: it is 1,024 bytes, so the Adaptive Proportion test runs on full 512-sample windows as SP 800-90B §4.4.2 specifies and the 1,024-sample startup minimum (§4.3 item 4) is met.
These are simplified educational implementations. An SP 800-90B entropy assessment uses the NIST SP 800-90B EntropyAssessment tool (github.com/usnistgov/SP800-90B_EntropyAssessment) on at least 1,000,000 raw noise-source samples plus restart data (SP 800-90B §3.1.1).
Hardware entropy sources and HSMs that provide NIST-validated entropy for production use are tracked in the Migrate catalog → Hardware Security Modules. NIST entropy source validation certificates are listed under Compliance, Entropy (ESV). No standalone entropy-source products are currently cataloged; contributions welcome via the issue tracker.
Primitive self-checks (SHA-256, HMAC) — not entropy or RBG tests
FIPS 180-4 · FIPS 198-1 — algorithm correctness only
Click Run reference samples to run 4 use-case scenarios. Evidence in this set: NIST ACVP-Server reference sample — Expected values copied from the public NIST ACVP-Server repository with immutable source identity.
Reference samples from the public NIST ACVP-Server repository · FIPS 180-4 · FIPS 198-1 — algorithm correctness only · Generated keys are for educational use only.
Site version 4.216.0 · commit db972876f4fa
Next in sequence
Source Combining
Health-test raw source samples before conditioning, and see why random-looking conditioned output is not evidence about the source.
Production Tool Capabilities & Verification Requirements
What this sample check establishes: Executes statistical and NIST SP 800-90B style min-entropy estimators (Most Common Value, Collision, Markov, Compression) and the RCT/APT health tests on sample byte streams.
Browser sandbox limitation (non-certification boundary): Browser-scale sample windows are for educational inspection; formal NIST entropy source validation (ESV) needs at least 1,000,000 raw noise samples (SP 800-90B §3.1.1), plus restart tests, assessed by an NVLAP-accredited laboratory.
What to require and test in your production tools:
- Formal NIST Entropy Source Validation (ESV) per SP 800-90B using the official NIST C++ `ea_iid` / `ea_non_iid` assessment suite.
- Stochastic model justification documenting the physical noise mechanism and quantization process.
- Configured RCT and APT cutoff thresholds matching the target false-positive probability (SP 800-90B recommends 2^-20 to 2^-40).
Try it
- 1. Predict before you run it.
- 2. Run or change the tool above.
- 3. Explain what the result shows.
Load Repeating Pattern and run the checks. Which SP 800-90B health test signals a failure, and why?
Next step
Keep learning: PQC 101PQC 101 follows Entropy & Randomness, the module this tool practises, in the Foundations track.
Related content
Next in Entropy & Random