Randomness is a fascinating subject that touches on diverse fields — from winning the lottery and genetic mutations to free will and encryption.
-
There is a fundamental distinction between truly random values, which are impossible to predict in advance, and values that merely *appear* random because predicting them is extremely complicated.
For most use cases, a number that looks random is perfectly sufficient, and the advantage is a far faster and simpler generation process.
The `rand` function in programming is one such example — it works fine for standard purposes, but is wholly inadequate for tasks like generating encryption keys.
Generating a truly random value — for instance, to select the winning number in a lottery — requires relying on random, unpredictable events, and this is where human ingenuity truly shines.
-
Random number generation systems draw on sources such as radioactive nuclear decay, cosmic noise, temperature fluctuations, and theoretically any unpredictable event one can conceive of.
One technology currently under development relies on quantum events, which are considered absolutely random by nature.
In computer systems, unexpected hardware variations can be harnessed to produce randomness — for example, disk read/write operations, network interruptions, user mouse movements, or keystrokes.
A practical example of this is Linux, which has a built-in capability for collecting random data (entropy) and using it to generate random values.
Modern processor design addresses this as well: contemporary CPUs include a dedicated hardware component whose sole purpose is to produce randomness.
-
Between 2006 and 2008, the Debian Linux distribution used a flawed random number generator, compromising an enormous number of encryption keys used across many technological systems.
In 2013, a bug in Android's random number generation led to the exposure of encryption keys for Bitcoin wallets.
Another intriguing episode is the NSA backdoor: in 2006, the agency deliberately planted a backdoor in the international standard for random number generation — a story that deserves a post of its own.
-
In the attached screenshot you can see the software PuTTYgen.
I use it regularly to generate security certificates for remote server access via PuTTY, where the randomness of the encryption is produced by moving the mouse randomly across the screen.