← Back to section · Security Risk & Assessment

Entropy Sources and Random Number Generators: Turning Luck into Engineering

Beyond famous accidents, randomness more often loses on everyday engineering: entropy sources that were never properly estimated, absent health tests, and VM snapshots that copy a generator's state into a thousand clones. This article takes the construction side: entropy sources, DRBGs and state management.

Published 22 November 2026 · 5 min read · PQ Frontier

Entropy Sources and Random Number Generators: Turning Luck into Engineering
AI-generated site artwork
Video explainer · Implementation Flaws: defects a Merkle-tree check exposes

From Accident Stories to a Construction Checklist

This site has a dedicated article reviewing the famous randomness failures: insufficient boot-time entropy, predictable seeds and implementation defects that left keys hollow. The lessons of accidents must finally land on a construction question — what, concretely, must a team do right today to ship a reliable randomness facility? This article offers a defence-side engineering checklist along four lines: entropy sources, health tests, DRBGs and state management.

Entropy Sources: First Ask Where the Entropy Comes From, and How Much

Every randomness system begins with an entropy source: hardware noise, oscillator jitter, timing uncertainty collected by device drivers, or a dedicated hardware random number generator. The first engineering trap is overestimating entropy content: a byte stream that looks random may lose most of its information content under compression. Standard practice is to model the noise source and estimate its min-entropy following an established framework (such as NIST SP 800-90B), keep a healthy safety margin on top of that estimate, and only then feed the result into entropy extraction and conditioning.

The second trap is a single source. Placing all trust in one hardware generator means that if it degrades through ageing, temperature or manufacturing defects, the whole system is exposed. Mature designs mix several independent sources and assume that any one of them can fail or even be manipulated while the system still retains sufficient entropy.

Health Tests: Entropy Sources Get Sick, Usually Silently

The most dangerous failure mode of an entropy source is silent degradation: output continues, but the distribution has collapsed. Standard frameworks therefore require two kinds of health tests: start-up tests at power-on, confirming the noise source behaves normally before it is put into service, and continuous tests during operation, monitoring for anomalies such as repetition or stuck values; on triggering, the source is taken out of use and an alarm raised, rather than continuing to generate keys from suspect randomness.

In engineering terms this means three things: the test logic must actually be enabled rather than compiled out; test failure must have an explicit failure policy (refusing service beats issuing predictable keys); and test status must be observable, reaching logs and monitoring. Many products lose evaluation points not because they chose the wrong algorithm, but because these “boring” elements are missing.

DRBGs: Determinism Demands State Discipline

A deterministic random bit generator (DRBG) uses cryptographic algorithms to stretch a finite seed into an output stream of arbitrary length, and is the standard structure in modern systems. Its security rests almost entirely on state management:

  • Seeding must be sufficient: the entropy injected at instantiation must reach the target security strength and come from an evaluated entropy source — not from guessable inputs such as timestamps or process IDs.
  • Reseeding must be periodic: long-running processes should inject fresh entropy when output volume or elapsed time crosses a threshold, bounding the impact of a single state compromise.
  • State must resist rollback and copying: if generator state is restored to an old value, the same output stream reappears; if state is copied to another machine, the two machines generate related key material.

Snapshots, Forks and Clones: The Most Modern Trap

The risk of state copying is multiplied in the virtualisation era. When a virtual machine resumes from a snapshot, the DRBG state in memory reverts with it, and the “random numbers” generated after the restore repeat those from before; when a server process forks after seeding, the child inherits the same state; when embedded devices ship as bulk clones of one firmware image, if entropy was fixed before first boot, the keys of the entire batch are correlated.

The defences are quite mature: use virtual-machine generation identifiers (mechanisms of the VMGenID kind) to notify guests to reseed on restore; reseed in the child after a fork, or use system randomness interfaces that are fork-aware; on devices, inject per-unit hardware entropy at first boot and defer key generation until entropy is ready. The question is never whether solutions exist, but whether deployment actually wired them up.

What to Look for in an Audit

A security audit of a randomness facility has an actionable checklist: does the entropy source have an independent evaluation report and a conservative min-entropy estimate; are health tests enabled with an explicit failure policy; does the DRBG’s seeding material reach the claimed security strength, and are reseeding thresholds configured; do system images and VM templates force reseeding after cloning; does any application bypass the system randomness interface with a home-grown generator. A miss on any of the five belongs on the findings list — randomness problems rarely come from algorithm choice; they almost always come from these links.

New Requirements in the Post-Quantum Era

Post-quantum algorithms place additional demands on randomness: schemes such as lattice-based signatures need large amounts of high-quality randomness when signing, and the impact of randomness defects is more subtle; the industry therefore promotes hedged signing — deriving the randomness jointly with the message and the key, so that even a partially failing random source does not lead to catastrophic leakage. When selecting or building implementations, confirm that such hedged constructions are used, and keep a direct channel to hardware entropy for key generation.

Summary

The reliability of a randomness facility comes from a string of unglamorous engineering disciplines: conservatively estimated entropy sources, multiple mixed sources, health tests always on, DRBG state seeded sufficiently and reseeded periodically, and state-generation protection against snapshots, forks and clones. Accident reviews tell us where the pits are; this checklist answers how to fill them — together they form the complete defensive view.

References

  • NIST SP 800-90A / 90B / 90C series: public standards on DRBG mechanisms, entropy source assessment and random number construction.
  • RFC 4086: Security Requirements for Randomness (public document).
  • Public documentation of the Linux kernel random subsystem and the VMGenID mechanism.

Tags: entropy sourcesDRBGrandom numbersstate management