Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: AdolfinWolf on February 02, 2018, 09:59:38 PM



Title: Is the encoding of bc1 adresses the same as 1../ 3.. adresses?
Post by: AdolfinWolf on February 02, 2018, 09:59:38 PM
As title states, is the checksum  (https://en.bitcoin.it/wiki/Base58Check_encoding)for bc1 adresses the same as for 1.. / 3.. adresses? It seems that it isn't supported by sites like these (http://lenschulwitz.com/base58)

How can i verify myself manually if a bc1 adress is valid? Is it actually any different?


Title: Re: Is the encoding of bc1 adresses the same as 1../ 3.. adresses?
Post by: jackg on February 02, 2018, 11:09:28 PM
Take a look at this thread (https://bitcointalk.org/index.php?topic=2864073.msg29401401#msg29401401).

Specifically:
I haven't seen one, but if you want I'd try to contribute to one on GitHub or somewhere. I like the idea, even though I know vanity addresses pose some security problems and they're not incorporated into HD backups, I still think it'd be really cool. Maybe here (https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki) would be a good place to start?

There's a (checksum) section on the contents table.


Title: Re: Is the encoding of bc1 adresses the same as 1../ 3.. adresses?
Post by: achow101 on February 03, 2018, 01:05:22 AM
As title states, is the checksum  (https://en.bitcoin.it/wiki/Base58Check_encoding)for bc1 adresses the same as for 1.. / 3.. adresses? It seems that it isn't supported by sites like these (http://lenschulwitz.com/base58)
They are not the same. In fact, bc1 addresses use a completely new encoding scheme known as bech32. This is specified in BIP 173[/quote] and designed specifically for Segwit. Bech32 addresses and Base58 addresses are completely incompatible with each other.

 (https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki)
How can i verify myself manually if a bc1 adress is valid?
Not really.

Is it actually any different?
Yes, they are very different. Instead of a checksum based on the hash of the data, it is a BCH-like error correcting code. This lets it both detect errors and tell you where they are, as well as correcting some of them (if there are fewer errors than a certain threshold).