liveBook · Manning

Statistical health test

As explained in Hacking Cryptography

A statistical health test checks whether an entropy source or random-number generator continues to exhibit its expected behavior and entropy properties.

A statistical health test continuously checks raw bits from a physical entropy source against the entropy behavior predicted by its physical model. Failure must stop random-number generation rather than allowing defective output into cryptographic operations. section 10.2

A sound randomness pipeline places the test at a specific point:

  • Digitize noise from a physical entropy source into raw bits. section 10.2
  • Run health tests directly on those raw bits, before randomness extraction, because the tests depend on the source’s physical model. section 10.2
  • Stop the entire random-number-generation process when a test fails. section 10.2
  • After successful testing, use an extractor to remove bias, then seed and periodically reseed a CSPRNG for faster output. section 10.2

Detecting a failed hardware source

A hardware RNG that emits a string of zeros or ones may produce blatantly defective output. Without health tests, that output can pass through undetected; with a failed test, generation should stop. section 10.2

Figure 10.2 The recommended setup for using randomness for cryptographic applications: health tests should ensure the correct operation of the TRNG, which should periodically reseed a CSPRNG.
figure

Trace the recommended arrangement of health-tested TRNG output, randomness extraction, and periodic CSPRNG reseeding. section 10.2

How Hacking Cryptography covers it

How deep it goes
Explains placement, physical-model dependence, failure handling, extraction order, and CSPRNG reseeding, but does not specify test algorithms.
Examples
Uses constant streams of zeros or ones as visibly defective hardware-RNG output.
What it assumes
Assumes familiarity with physical entropy sources, TRNGs, randomness extraction, and CSPRNGs.
What you can do after
Operate/configure a randomness pipeline that tests raw entropy, halts on failure, extracts bias, and reseeds a CSPRNG.
How it connects
Connects entropy sources, physical models, TRNGs, randomness extractors, and CSPRNGs.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Hacking Cryptography. The section links point to the parts of the book it draws on.