Random numbers
Salts, keys, nonces (one-time-use numbers) — a huge share of cryptography depends on numbers that nobody can predict. And “pick a random number” turns out to be one of the hardest things to do well on a computer, precisely because computers are built to be perfectly predictable.
Computers are terrible at being random
A computer follows its instructions exactly, the same way every time — the opposite of random. Ask for a “random” number the naïve way and you get a pseudo-random sequence: it looks random, but it’s produced by a formula from a starting value. Anyone who learns that starting value can reproduce every number the sequence will ever spit out. Predictable randomness is no randomness at all.
Real randomness comes from the physical world
To get true unpredictability you have to reach outside the tidy deterministic machine and into the messy physical world. Systems gather entropy from things no one can predict: the exact microsecond timing of your keystrokes, tiny movements of the mouse, electrical noise, the temperature wobble of a chip. That raw unpredictability is fed into a cryptographically secure generator (a CSPRNG), which stretches it into all the high-quality random numbers a system needs.
Why it matters for your coins
A Bitcoin private key is, in the end, just a very large random number. If the randomness used to create it was weak or predictable, an attacker doesn’t need to break any mathematics — they can simply regenerate your key and take your coins. This is not hypothetical: wallets built on faulty random-number generators have had their funds swept in seconds. Unbreakable money rests on genuinely unguessable randomness.
This is the quiet foundation under everything else in this section. The strongest lock in the world is worthless if the key was cut from a predictable pattern. Good cryptography starts with good randomness.
Feed enough true randomness into the right one-way calculation and you get the pair of numbers that lets you own Bitcoin outright — with no bank’s permission and no one else’s copy. Your private and public keys are next.
Key takeaways
- Computers are deterministic, so ‘random’ numbers from a formula are predictable if you know the starting point.
- True randomness is harvested from the physical world into a secure generator — weak randomness has let attackers regenerate keys and steal coins.
Check yourself
Why are computers naturally bad at randomness?
Determinism is the opposite of randomness — a formula’s output can be reproduced.
Why does weak randomness threaten your Bitcoin?
A private key is just a random number; if it’s guessable, the coins are gone.
Spotted an error or have feedback on this lesson? Suggest a correction ↗
Comments
Powered by Nostr — reply from any Nostr client, and zap the lesson over Lightning.