Randomness
Keys must be picked at random. If a computer's random numbers are even slightly predictable, an attacker can guess the keys, however strong the algorithm.
A lottery where the balls are secretly weighted. The machine looks fair but someone who knows the trick can predict the result.
- Truly random The key must come from a genuinely unpredictable source. Why: Patterns in the key leak into the message Computer 'random' numbers are not enough.
- As long as the message Every letter needs its own piece of key. Why: A shorter key has to repeat Repetition gives codebreakers a foothold.
- Kept secret Both sides must hold the key and nobody else. Why: Delivering the key safely is the hard part Why it is impractical for everyday use.
- Never reused Each page of key is used once, then destroyed. Why: Venona: duplicated Soviet pad pages let US and British codebreakers read about 3,000 messages The most common way it has failed.
Why it matters
Bad random numbers have caused serious failures, such as the Debian OpenSSL bug and Sony's PlayStation 3 key leak.
Where you meet it
Hidden inside every device. You never see it unless it goes wrong.
- 1Generate Created from a strong random source, ideally inside secure hardware. Common failure: Predictable random numbers The Debian bug left only about 32,768 possible keys.
- 2Store Kept where it cannot be copied out, separate from the data it protects. Common failure: Keys left in code or config files HSMs and cloud key services exist for this.
- 3Rotate Replaced on a schedule, and at once if it may have leaked. Common failure: Nobody knows where the key is used Shorter certificate lifetimes push towards automation, though a renewed certificate can keep the old key.
- 4Destroy Retired keys are securely deleted, along with every backup copy. Common failure: Old copies in backups Destroying a key can erase data instantly.
Go deeper history and technical detail
Between 2006 and 2008 a change to Debian Linux's copy of OpenSSL left only about 32,768 possible keys, so they could all be listed. In 2010 researchers showed Sony had used the same 'random' number for every PlayStation 3 signature, which let them work out Sony's private signing key. Operating systems now gather randomness from hardware events and dedicated chip circuits.
Read or watch next
- Cryptography and CryptanalysisMIT OpenCourseWare (6.875, Spring 2005), course
Related terms
Cite this page Encryption Observer, “Randomness”, encryption.observer/terms/randomness/, checked December 2026.