Advanced Lesson 3 4 min read

Weak keys and brain wallets: money lost due to poor passwords

Whoever generated the key from a phrase lost the money to whoever thought of the same phrase.

In 2011 and 2012, there was a piece of advice that sounded clever: instead of writing down the private key, memorize a phrase. The phrase goes through a hash, the hash becomes the key, and you carry the wallet in your head — no paper, no safe, no risk of fire. This was called a brain wallet, and almost all the money stored this way was taken.

The mechanism is simple and that's precisely the problem. You choose a phrase, apply SHA-256 to it, and the 256 bits that come out become the private key. The calculation is correct and the encryption works. What doesn't work is the first step: the phrase wasn't randomly generated, it was chosen by a person.

Entropy is the measure of how many possibilities exist, and the entropy of a human choice is ridiculously low. A properly generated key has 256 bits. A line from a well-known song might have thirty. A phrase invented with effort, with unusual words and strange punctuation, might reach forty if you're lucky. And forty bits, as the previous module showed, is an afternoon's work on a graphics card.

What you think no one would ever think of is already printed, and the entire shelf fits on a disk.

But there's no need to sweep through forty bits, and this is where it gets cruel. No one attacks a brain wallet with brute force. It's attacked with a dictionary: every verse of the Bible, every song lyric that exists, every movie line, every proverb, every leaked password from every hacked database since 2005 is taken — and the key for each one is calculated. These are billions of attempts, not trillions, and the computer does them over a weekend.

And the worst detail: this is done only once, preventively. Programs keep the list ready, monitoring the blockchain. The instant any coin reaches an address whose key is on the list, an automatic transaction takes it away. In documented cases, the interval between deposit and theft was seconds.

The hook was already in the water before the fish arrived.

The most instructive case is also the most obvious in hindsight. Addresses derived from phrases like the first line of famous novels, biblical verses, and famous quotes were all emptied, and there are academic papers published cataloging thousands of them. The researchers' conclusion is always the same: practically every brain wallet address that ever received money ended up drained.

It's worth honestly stating that the problem isn't exclusive to phrases. It is the general problem of human entropy and appears in other forms. Keys generated by test programs that were never changed. Keys derived from birth dates. Keys produced by faulty generators, like the Android one mentioned in the previous track. Wallets created on sites that promised to generate randomly in the browser but always generated the same thing. In all these cases, the actual search space was a few dozen bits, not 256.

The handful a person can generate fits in a palm. The machine's doesn't fit in the world.

The practical lesson is short and worth more than the entire class: entropy isn't invented, it's generated randomly. The twelve words of BIP-39 exist for exactly this reason — they aren't a phrase you chose, they're a number that a source of randomness generated and that was translated into words for you to copy. The difference between the two is the difference between a wallet and a trap.

And there's a consequence that ties back to the previous module. All this dictionary work is, technically, key searching — the same tools, the same algorithms, the same hardware. The difference between a legitimate exercise and a crime isn't in the technique: it's in who put the money there and with what intention. The challenges of 2015 were left to be found. Someone's forgotten brain wallet, not.

We still need to see the real tools, with names and addresses: what each one does, what hardware it runs on, and where each is the right choice. In the next lesson.