← Back to section · Research & Analysis

A History of Randomness Failures: The Weakest Link Was Never the Mathematics

From two lines of code in Debian's OpenSSL to the Dual_EC backdoor controversy and ROCA's structured primes — how historical randomness incidents shaped hedged signatures and deterministic designs in the post-quantum era.

Published 22 November 2026 · 5 min read · PQ Frontier

A History of Randomness Failures: The Weakest Link Was Never the Mathematics
AI-generated site artwork
Video explainer · Security Research: Attacks and Boundaries

The incident history of cryptography reveals a counterintuitive distribution: textbook algorithm breaks can be counted on one hand, while randomness failures form a long list. The reason is not hard to see: nearly every cryptographic primitive rests on some secret random quantity being unpredictable — private keys, ephemeral keys, signing randomness, masking shares. Randomness is the foundation of the whole edifice, and cracks in the foundation do not care how elegant the structure above is. Systematic post-mortems of these incidents have produced a taxonomy of failure modes, and that taxonomy is now directly shaping implementation requirements for post-quantum schemes.

Entropy Collapse: The Debian OpenSSL Incident

The Debian OpenSSL incident, disclosed in 2008, is the textbook case of entropy collapse. To silence warnings from a memory-checking tool, a Debian maintainer commented out two lines that mixed data into the entropy pool; as a result, the OpenSSL random seed on that distribution depended only on the process ID — a seed space collapsed to about 32,767 possibilities. For almost two years, every SSH key, TLS certificate private key and OpenVPN key generated on that platform could be enumerated and reconstructed. Note the conditions and scope: the rest of the algorithm implementation was flawless, and only keys generated on a specific distribution within a specific window were affected; but because keys are long-term credentials, patching the software afterwards could not restore the security of already-generated keys — they had to be revoked and rebuilt one by one. The incident established a principle: entropy-source code is among the parts of a cryptographic system least safe to “clean up”, and any change to it must be treated as security-critical.

Entropy collapse has two modern variants. The first is boot-time entropy starvation: embedded and IoT devices have few environmental noise sources at first power-up, and if long-term keys are generated before the entropy pool has filled, the key space is far smaller than designed — in 2012, two widely cited studies scanning the Internet at scale each found a substantial fraction of TLS and SSH keys factorable, or sharing factors with each other, due to insufficient entropy, traced largely to headless devices generating keys at first boot. The second is snapshotting and cloning in virtualised environments: when a virtual machine resumes from the same snapshot, the RNG’s internal state is copied with it, and two “different” machines can output identical random sequences. Cloud-era key-generation guidance therefore adds explicit clauses: key material must be generated after the entropy source is ready and after the instance has been made unique. Both variants share the essence of the Debian incident: entropy problems never appear during the steady state of algorithm execution, but in the environment of the moment of generation.

Randomness Reuse: The One-Time Discipline of Nonces

The second failure class is reuse. ECDSA security requires the per-signature nonce k to be distinct and unpredictable for every signature: if two signatures reuse the same k, the private key can be solved for directly — the 2010 PlayStation 3 signing-key incident demonstrated exactly this failure (Sony’s implementation used a constant k). Partial leakage is more insidious: even if only a few bits of each k leak, enough signatures accumulate into a Hidden Number Problem instance over a lattice that recovers the private key — which is why side-channel protection of nonce generation ranks with protection of the key itself. Post-quantum signatures inherit the same sensitivity: if the randomness behind ML-DSA’s rejection sampling and random masking fails, the leakage paths are not essentially different from the classical ones.

Randomness by Design: Dual_EC and Structured Primes

The third failure class is the most sinister: the generator itself is compromised. Dual_EC_DRBG was standardised and enabled by default, yet its parameters embedded a point relation that would let anyone knowing a specific secret work backwards from outputs to the internal state — researchers pointed out this structural possibility publicly in 2007, and disclosures after 2013 confirmed the backdoor concern was not unfounded. Its lesson: the provenance of RNG parameters must be verifiable, and unexplained “magic constants” are unacceptable where entropy is concerned.

ROCA (2017) exhibited a different disease: Infineon’s RSA key generation, in pursuit of speed, imposed special structure on the primes, giving generated moduli a recognisable fingerprint and making them factorable by improved Coppersmith-type methods. Large numbers of keys generated by TPMs and smart cards of the time were affected. This was “randomness bias” rather than “insufficient entropy”: the bit count of entropy was adequate, but the distribution carried structure. The research conclusion is that key generation must be tested not only for entropy quantity but for structural neutrality of the output distribution — a conclusion that carries over to KEM key generation and signature sampling distributions in post-quantum schemes.

The Post-Quantum Response: Writing Randomness Risk into the Design

These historical accounts left clear fingerprints on the new generation of standards. ML-DSA (FIPS 204) explicitly provides two signing randomness modes, randomised and deterministic, and allows additional random input to be mixed into the deterministic flow to form a “hedged” construction — its design motivation is stated in the standardisation discussion as defence against RNG failure: even if the random source fails completely, the deterministic component still guarantees nonces are never reused; even if the deterministic input is somehow predicted, the random component still protects. ML-KEM’s key generation and encapsulation likewise stress entropy-source quality and bring randomness within the scope of known-answer tests and health tests. Entropy-source evaluation standards (such as the SP 800-90 family and national randomness testing regimes) have accordingly moved from the appendix to the front of post-quantum deployment checklists.

Closing

The general lesson of randomness failure history is that a cryptographic system’s security boundary lies not at the algorithm boundary but at the randomness boundary. Post-quantum migration, while replacing algorithms, happens to offer one opportunity for a full audit of entropy sources, key-generation processes and randomness health monitoring — skip that audit, and the old foundation is carried unchanged into the new building.

Tags: randomnessentropy sourceshedged signaturesincident history