1

Sorry for my poor English, but as many of us, I have wondered how many Bitcoin addresses are possible. When looking around, I stumbled upon this thread on BitcoinTalk:

There are exactly 2^160 possible addresses as long as we keep using RIPE-MD160.

2^160 is 1,461,501,637,330,902,918,203,684,832,716,283,019,655,932,542,976.

Then I wondered if there are less possible addresses with the Bech32-format, specified by BIP 0173.

Besides, you cannot use uppercase format of characters in your computation, and some numbers as letters, such as i/1 and o/0 characters/numbers are excluded in Bech32 format.

Should that not decrease the possible amount of Bitcoin addresses dramatically, and decreases the security of Bitcoin?

So I would like to know how many possible Bitcoins addresses are with Bech32 format. How could I calculate it? What will the total number (plain long number, not the squared one, I'm not good in math) of possibilities with the restrictions of Bech32 then?

  • Bech32 addresses are not shorter by any means (42 instead of 34 characters for typical ones). – Pieter Wuille Jan 26 '18 at 9:10
  • Thanks for your explaination, Pieter. I have edited my post, regarding your comment. And I hope you don't mind my poor English (Ik ben overigens Nederlands). Should it be reasonable to assume there will be less possible addresses with Bech32 format, compared with the old Bitcoin addresses (2^160)? – ReneFroger Jan 26 '18 at 11:03
2

Keep in mind that both types of address, assuming we are comparing P2PKH with P2WPKH addresses, are just encoding a hash of a public key. The hash used in both addresses is a RIPEMD-160(SHA-256(public key)), so regardless of the encoding, the same number of possible valid addresses remains the same. Each address format is simply encoded with a different checksum system, different version system, and different characters. But neither address format is actually ever used within bitcoin transactions themselves, they both just get "unwrapped" when given to a wallet.

  • So, Bech32 just encodes a raw address. – Willtech Jan 26 '18 at 20:26
  • There is no such thing as a "raw address". Every address is a shorthand notation for a particular scriptPubKey. SegWit scriptPubKeys still contain a 160-bit hash, so Bech32 addresses must do the same. Otherwise it would be impossible to construct a transaction using such an address. – Pieter Wuille Jan 27 '18 at 18:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.