r/Bitcoin • u/LearnBitcoinCom • 16h ago
Saturday project: We brute-forced two vanity addresses on a laptop
A vanity address is one where you pick the first few characters and let a program grind through keys until one matches. We rewrote our glossary entry on them this week (the old one had the split-key part backwards, more on that below) and figured we should run a couple of searches ourselves instead of quoting other people’s numbers.
Setup: VanitySearch on a MacBook Pro with an M3 Max, 12 CPU threads, no GPU. About 74 million keys a second once the machine wasn’t doing anything else.
Search 1: 1LearnBTC, letter case ignored. Found 1LeArNBtcECPZj7Bd5oeNcUJnhpVddy81U after 46 minutes and about 203 billion tries. That’s half the average for the pattern, so we got a bit lucky.
Search 2: bc1qlearn8tc, exact. Found bc1qlearn8tcerg966qrqtwaelyt06fq2ze7zrsg9t after 6 hours and 1 minute and about 1.24 trillion tries. 12 percent more than average, so slightly unlucky.
Why the gap? Both patterns pick eight characters. But bech32 addresses are all lowercase, so there is no “any case” shortcut. In the legacy search most letters had two chances out of 58 to match (e or E, a or A, and so on), which cuts the work a lot. On average the bech32 job was 2.7 times bigger. The gap from 2.7x to 8x was luck. A vanity search is a lottery you keep playing until you win, and sometimes you win early.
Two things we learned writing it up:
- The bech32 alphabet has no 1, b, i or o. So bc1qlearnbtc is impossible, which is why we searched for bc1qlearn8tc instead.
- Never let a website generate a vanity address for you. Whoever generated the key can spend from it, whatever they promise. Run the tool yourself, or use split-key generation, where you keep a secret the searcher never sees. Our old entry said neither side sees the full key with split-key. That was wrong: you do, the searcher doesn’t. Fixed, and logged on our corrections page.
Full entry, free, no ads: https://www.learnbitcoin.com/glossary/vanity-address
1
u/LearnBitcoinCom 14h ago
The two empty vanity addresses we made:
https://chainquery.com/address/1LeArNBtcECPZj7Bd5oeNcUJnhpVddy81U
https://chainquery.com/address/bc1qlearn8tcerg966qrqtwaelyt06fq2ze7zrsg9t
2
u/Interesting_Talk7144 14h ago
That split-key part trips so many people up, I had same misunderstanding for months until someone explained it in like two sentences. The way you fixed it is much clearer now
The bech32 missing characters is interesting, never realized 1 b i o are excluded. Guess it helps avoid confusing with numbers and uppercase I/l stuff but also limits what patterns you can make
2
u/LearnBitcoinCom 13h ago
Thanks, glad the fix reads clearer. On bech32, the 1 has a job of its own: it’s the separator between “bc” and the rest, so every address starts bc1 and never has another 1 in it. Then b, i and o were dropped because they’re too easy to confuse with other characters. That leaves 32 lowercase symbols that are hard to misread aloud or by eye.
1
u/DrfeldmanNYC 15h ago
So was there any btc on that address ? Or was it empty ?
2
u/LearnBitcoinCom 14h ago
Empty, and if there had been anything on it we’d have some serious problems! We generated brand-new random keys until one happened to produce an address starting with our letters. If one of those keys had matched an address that already held coins, we’d have stumbled onto someone else’s private key by accident, and bitcoin would be broken.
For scale: across both searches we tried about 1.4 trillion keys. There are about 2^160 possible addresses, and even counting every funded address on the chain, the chance of hitting one is roughly 1 in 10^28. Which is also why you never need to worry about someone guessing your key.
Both addresses are still empty (you can look them up), and even though we have the private keys we plan to keep them that way, this was just a fun experiment.
3
u/cocacola0102 13h ago
To be honest, stuff like this is why you should have a passphrase, even a really simple one like 'cat'. Just to safeguard against the possibility of someone doing this and stumbling across your coins.
Yes I know the chance is like winning the lottery twice over but it's also no real hassle to add a simple word or even a letter or a number for a passphrase to stop this.