Hey!
I was just wondering why all bitcoin addresses start with a "1".
Thanks.
They don't
ALL start with a 1.
Pay-to-ScriptHash addresses (commonly used for multi-sig) start with a 3.
Bitcoin Addresses have three parts.
The first part is a one byte "version" that indicates what type of output script the address represents. The most commonly used output script (Pay-to-PubKeyHash) uses a "version" of 0x00
The second part is the hash. In the case of a Pay-to-ScriptHash address, this would be the 20 byte hash of the script. In the more common Pay-to_PubKeyHash address, this would be a 20 byte hash of the ECDSA public key.
The last part is a 4 byte checksum calculated as the first 4 bytes of a 32 byte SHA-256 hash. This is used to verify that there weren't any typing errors when entering the bitcoin address and prevents accidentally sending to a mis-typed address.
Once all 25 bytes are concatenated together, the resulting value is converted to base58 using the following value representations:
Value | Character | Value | Character | Value | Character | Value | Character |
0 | 1 | 1 | 2 | 2 | 3 | 3 | 4 |
4 | 5 | 5 | 6 | 6 | 7 | 7 | 8 |
8 | 9 | 9 | A | 10 | B | 11 | C |
12 | D | 13 | E | 14 | F | 15 | G |
16 | H | 17 | J | 18 | K | 19 | L |
20 | M | 21 | N | 22 | P | 23 | Q |
24 | R | 25 | S | 26 | T | 27 | U |
28 | V | 29 | W | 30 | X | 31 | Y |
32 | Z | 33 | a | 34 | b | 35 | c |
36 | d | 37 | e | 38 | f | 39 | g |
40 | h | 41 | i | 42 | j | 43 | k |
44 | m | 45 | n | 46 | o | 47 | p |
48 | q | 49 | r | 50 | s | 51 | t |
52 | u | 53 | v | 54 | w | 55 | x |
56 | y | 57 | z | | | | |
The leading character '1', which has a value of zero in base58, is reserved for representing an entire leading zero byte, as when it is in a leading position, has no value as a base-58 symbol. There can be one or more leading '1's when necessary to represent one or more leading zero bytes.