On Entropy
Probability, Randomness, and the Safety of a Bitcoin Key
Imagined by Brian Hirschfield
Magic Internet Math Academy · 2026
Web Edition — Run Every Calculation Yourself
12 chapters
5 parts
3 appendices
Front Matter
A 256-bit key is unguessable — if it is actually random. The method and the road.
Part I — Chance
Outcomes, arrangements, and the multiplication principle — including the twelve-word question.
From counting to chances: independence, complements, and reading “1 in 2ⁿ” honestly.
Expected value and the law of large numbers — why a small chance per guess demands many guesses.
Part II — Entropy
Bits as answers to yes-or-no questions; Shannon entropy built from counting.
Min-entropy and guessing: the measure that matters when one guess steals everything.
Physical noise, OS entropy pools, PRNG vs CSPRNG, and dice.
Part III — The Key
What a Bitcoin private key is, and the size of the space it hides in.
Brute-force physics and keyspace arithmetic — what an attack would actually cost.
Part IV — When Randomness Fails
Brainwallet drains, KeyBleed, and mempool fee races over weak keys.
One leaked nonce loses the key — and the deterministic fix.
Part V — Protecting the Key
BIP 39: entropy to checksum to words — and why you never rearrange them.
Generate offline, hardware wallets, passphrases, backups: the practice.
Appendices & Reference
Every symbol used in this book, built before it is used.
Reference tables for counting, chance, and keyspace sizes.
The real-world failures and sources behind the chapters.
Interactive Demos — Linkable & Shareable
Choices multiply, live: stages, the doubling ladder, arrangements and choices in exact arithmetic. (Ch. 1)
Drag the chances and watch Shannon's average and the attacker's best guess move — the gap is the thief's discount. (Ch. 4 & 5)
Coins, dice, and the 2048-word list: count the bits as you roll, and assemble a real draw in your browser. (Ch. 6)
Price a brute-force search: rate, space, targets — and read the answer in universe-lifetimes. (Ch. 8)
Two signatures, one reused nonce: walk the attacker's algebra and recover the key yourself. (Ch. 10)