TeachMeBitcoin

Probability of Checksum Failure

From TeachMeBitcoin, the free encyclopedia Reading time: 3 min

Probability of Checksum Failure

No checksum is 100% perfect. There is always a tiny, theoretical chance that a mistyped address will "Accidentally" result in a valid checksum. In Bitcoin, we manage this risk by ensuring the probability is so low that it will likely never happen in the history of the network.

1. The 1-in-4-Billion Odds

As we noted, a 4-byte checksum (32 bits) has $2^{32}$ possible values.

2. Comparing Standards

Format Bits Odds of Accidental Validity
BIP39 (12 words) 4 bits 1 in 16
BIP39 (24 words) 8 bits 1 in 256
Base58Check 32 bits 1 in 4.2 Billion
Bech32 30 bits 1 in 1.07 Billion

Wait, why is Bech32 (1 in 1 billion) considered "Better" than Base58 (1 in 4 billion)?

3. The "Collision" Attack

Could a hacker create two different addresses that have the same checksum?

4. Why not use 64 bits?

If we used an 8-byte checksum, the odds of failure would be 1 in 18 quintillion.

In the final section, we will build a Python Checksum Auditor.

☕ Help support TeachMeBitcoin

TeachMeBitcoin is an ad-free, open-source educational repository curated by a passionate team of Bitcoin researchers and educators for public benefit. If you found our articles helpful, please consider supporting our hosting and ongoing content updates with a clean donation:

Ethereum: 0x578417C51783663D8A6A811B3544E1f779D39A85
Bitcoin: bc1q77k9e95rn669kpzyjr8ke9w95zhk7pa5s63qzz
Solana: 4ycT2ayqeMucixj3wS8Ay8Tq9NRDYRPKYbj3UGESyQ4J
Address copied to clipboard!