Why does bitcoin address encoding use base58 instead of, for instance, base64? I don't see it is useful in any way.
Asked
Active
Viewed 3,961 times
1 Answers
15
Why base-58 instead of standard base-64 encoding?
- Don't want 0OIl characters that look the same in some fonts and could be used to create visually identical looking account numbers.
- A string with non-alphanumeric characters is not as easily accepted as an account number.
- E-mail usually won't line-break if there's no punctuation to break at.
- Double-clicking selects the whole number as one word if it's all alphanumeric.
Features of Base58Check
An arbitrarily sized payload
A set of 58 alphanumeric symbols consisting of easily distinguished uppercase and lowercase letters (0OIl are not used)
One byte of version/application information. Bitcoin addresses use 0x00 for this byte (future ones may use 0x05).
- Four bytes (32 bits) of SHA256-based error checking code. This code can be used to automatically detect and possibly correct typographical errors.
- An extra step for preservation of leading zeroes in the data
Adam
- 3,639
- 1
- 12
- 36
-
2"Future ones"... the v5 prefix is used for P2SH addresses, and has been since 2012. – Pieter Wuille Apr 26 '19 at 16:56
-
For reference: This explanation is also inserted as a comment in the bitcoin source code, see https://github.com/bitcoin/bitcoin/blob/0.16/src/base58.h#L7-L12 – phinz Sep 08 '21 at 09:40
-
**broken url** [https://github.com/bitcoin/bitcoin/blob/0.16/src/base58.h#L7-L12](https://github.com/bitcoin/bitcoin/blob/0.16/src/base58.h#L7-L12) 404 not found -- recorded on 2023-01-11 – dreftymac Jan 11 '23 at 13:40