# If Bitcoin addresses are truely random, then why are some more difficult to generate than others?

In this post TierNolan explains why 'Bitpoin' is much easier to generate than 'bitpoin', and that mainly has to do with the position (first character). But I remember that certain characters (I believe 'i' and 'o') are much more difficult to generate, independant of their position in the address. How is this possible?

• – Murch
Commented Feb 27, 2014 at 11:20

The 160-bit hash that is encoded in addresses is uniformly distributed ("truely random" as you call it), but the base58 encoded form is not. Some characters are more likely to occur at the start, for example.

To illustrate, consided the set of all integers between 0 and 1999. Even though each of those numbers is equally likely to be chosen, this is not true for its decimal representation. There, half of the numbers start with a 1!

• Nice example, and I understand why the first digit is not always random. But between 0 and 1999 the last digit always has an equal distribution, and if 'o' or 'i' automaticly increase the difficulty, even the last character is not equally distributed. I saw the author of vanity-gen once explain this on bitcointalk, but couldnt find his post. Commented Feb 27, 2014 at 11:23

Specific answer why 1Bitpoin is easier to generate than 1bitpoin:

The address is a base-58 representation of a 192-bit integer (160-bit hash plus a 32-bit checksum). The largest value you can represent is (2^160-1) with the corresponding checksum: 0xfffffffffffffffffffffffffffffffffffffffffa06820b, or the 34-character address "1QLbz7JHiBTspS962RLKV8GndWFwi5j6Qr".

In the base-58 alphabet, 'B' < 'Q' < 'b'. So any 34-char string that starts with '1Bitpoin' is valid as long as checksum is correct. But 34-char strings starting '1bitpoin' are all out of range. You can still generate 33-char strings starting with '1bitpoin' but obviously there are much fewer of these.

The characters 'i' and 'o' are only hard to generate in the case-insensitive sense, because capital 'I' and 'O' are not valid in base-58.