Bitcoin Depicted
The Bitcoin protocol illustrated / About
Bitcoin address
The address is derived from a public key represented in uncompressed or compressed SEC format. The public key is double hashed using SHA256 and RIPEMD160 to shorten the key from 65 bytes to 21 bytes including one byte indicating network ID:
- 0x00 for main network
- 0x5f for test network
Further on, the check sum over the shortened key is calculated using double SHA256 hash. The first four bytes of the check sum are appended to the shortened key creating the binary address. The address is encoded using Base58Check and includes a prefix which affects the leading symbol of the address (it is "1" for legacy addresses)