What formats do bitcoin addresses have


What is a legacy bitcoin address

The Legacy address is the standard address for the Bitcoin network proposed by Satoshi Nakamoto. Otherwise, this format is called P2PKH (Pay To Public Key Hash), because it requires the recipient to sign a signature calculated from the private key and the public key. An exit transaction script using cryptographic functions compares them with a public key hash – and if it does, it allows you to spend money. The probability that the system will accept an incorrectly entered address is 1 in 232 degrees, that is, one case out of 4.29 billion. The legacy address can be recognized by the prefix 1 (and m or n in the test network). The main disadvantages of this address are case sensitivity when entering data, higher transaction fees, low double hash speed of the checksum, more weight in QR codes and the inconvenience of writing on a mobile device or on paper.

Example legacy address:


What parts does a legacy bitcoin address consist of

Legacy addresses are unique, usually consisting of 26-35 characters and are 160-bit ECDSA public key hashes of the key pair. With the advent of SegWit addresses, they began to be called old, but initially they were a fairly effective means of representing locking scripts in a more user-friendly way and reduce the risk of sending funds to an incorrect address. The standard bitcoin address consists of the following parts:

  • Prefix;
  • The public key generated as a result of applying the SHA256 and RIPEMD algorithms to the private key;
  • Check sum.

Why is there a different number of characters in bitcoin addresses

If during the conversion of the private key, zeros appear at the beginning of the result, they are not included in the legacy bitcoin address string, and then it is reduced by the corresponding number of characters. Therefore, the bitcoin address may not consist of 34, but theoretically even 20 characters.

How are parts of a legacy address encrypted

All parts of the legacy bitcoin address are encrypted with typos protection using the Base58Check encoding system. The code is based on the Latin alphabet. You will never see symbols in such a bitcoin address that can be easily confused with each other (plus and minus signs, slash, zero, uppercase letters “o” and “i”, lowercase “L”). According to Base58Check, they only use the following 58 characters:


What is a P2SH bitcoin address

P2SH addresses (Pay to script hash) appeared in the proposal to improve bitcoin BIP-0016 in January 2012 thanks to the chief researcher of the Bitcoin Foundation Gavin Andresen. They have the same structure as legacy addresses, but begin with the number 3. Such addresses suggest that the recipient must have a script that matches the hash script when transferring funds. This feature allows you to reduce the commission for the transfer of bitcoins by the sender, shift the commission costs to the recipient and create addresses with multi-signature.

P2SH technology can allow the use of funds by any user or, conversely, prohibit it for everyone. It is important to remember that bitcoin addresses in P2SH format support SegWit, but are not its native solution. Crypto-wallets that do not support SegWit can conduct SegWit transactions thanks to the P2WPKH-in-P2SH and P2WSH-in-P2SH mechanisms.

An example of a P2SH address:


What is a SegWit Bitcoin Address

In the spring of 2016, developers Peter Velle and Greg Maxwell in the BIP-0173 update proposed a new address format: Bech32 (often called a SegWit address, P2WPKH – Pay to Witness Public Key Hash). The SegWit protocol itself (Segregated Witness, “Separated Witness”) suggested reducing the block size in the Bitcoin network by removing the signature from it and was activated at the end of August 2017.
SegWit addresses start with bc1 (in the test network with tb), contain up to 90 characters (more often about 42), and are written either only in upper (for QR codes) or only in lower case (preferred). SegWit Addresses consist of:

  • Human-readable parts
  • Separator (1),
  • Data and checksum.

If up to four errors were made when entering the address, the checksum included in the Bech32 address will not converge. Thanks to the Bowes-Chowdhury-Hawkingham code (BCH code) used in the solution, the errors will be automatically corrected.
When writing a Bech32 address, the following 32 characters are used:

Example Bech32 Address:


 What are the pros and cons of using Bech32 addresses

With new addresses, QR codes have become smaller, and error protection is higher. In addition, the use of Bitcoin addresses in Bech32 format is more profitable for users today, because the commission for sending funds from them is lower and the processing speed is higher. The main disadvantage of Bech32 addresses is that not all crypto-wallets and services support them. Among the first, support for such addresses was added by hardware crypto-wallets Ledger Nano S, TREZOR and Digital Bitbox, desktop crypto-wallets Electrum and Armory, mobile crypto-wallets Edge, GreenAddress (for iOS and Android- Devices), as well as Samourai Wallet, Wasabi Wallet, GreenBits, and Electrum (for Android devices).

Is it possible to transfer bitcoins from a legacy address to a SegWit address

Activating SegWit on the Bitcoin network was a soft fork – this means that the new and previous versions retained compatibility. That is, you can easily transfer funds from legacy addresses to SegWit addresses. At the blockchain level, there are no problems with the difference in address formats. In practice, difficulties arise if the user wants to transfer funds from his legacy address, for example, created on the cryptocurrency exchange, to the bc1 address, and the marketplace has not yet technically implemented support for the new address format . In this case, it is worth using a less effective than bc1-, but still more advanced than a legacy-P2SH address.

In the opposite direction, from the bc1 address to the legacy address, funds should arrive without problems.

 Which block browsers track bc1 addresses

It is convenient to monitor the adaptation of Bech32 bitcoin addresses on a special page in the Bitcoin Wiki. Today, bc1 addresses are parsed and indexed by Blockstream.info, Apirone.com, Bitaps.com, Bitupper Explorer, Blockchair, Blockonomics, Blockpath, BTC.com, chaindex and OXT block browsers. While Blockcypher, Insight and Tradeblock do neither, the blockchain.info does not support indexing.

How useful was this post?

Click on a star to rate it!

Average rating / 5. Vote count:

No votes so far! Be the first to rate this post.

Leave a Reply

Your email address will not be published. Required fields are marked *