I get a much lower length of time if i make the first character a capital letter instead of a lowercase letter, when trying to generate a public key with Vanitygen.

Shouldn't it be the same? Has anyone else experienced this? What is the math / logic behind this difference?


2 Answers 2


I'm copying this from deepceleron's post on bitcointalk:

The change happens at a particular address:

prefix difficulty: 77178 1QLa
prefix difficulty: 78362 1QLb
prefix difficulty: 4553521 1QLc

This is a quirk of how the 25-byte (50 digit hexadecimal) Bitcoin address is converted into Base58 (represented by numbers and letters), and the different maximum values that can be stored in 25 base256 digits vs 34 base58 digits.

The Bitcoin address in it's native binary form (that you never see) is 25 bytes, it's parts are:
byte 0: Network ID Byte (0x00 for main bitcoin network)
byte 1-20: ripemd160 hash (20 bytes) of sha256 hash (32 bytes) of 0x04+public key (65 bytes)
byte 21-24: checksum: first four bytes of sha256 hash of sha256 hash of bytes 0-20 above

This would be 50 hexadecimal characters long (base16), with a possible digit value between 0-F.

We will ignore byte 0, it is always 0x00, and Base58 conversion always preserves this leading 0 byte by directly encoding it as a "1".

That means the "vanity" part of the address is bytes 1-24, 24 bytes of random hash output, or 48 hexadecimal digits. The maximum value that this can be is 0x FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF ffff ffff (the lower case "f"s are the checksum, and won't be all FFFFs for the maximum ripemd160 value.) We can guess from the output below that this maximum possible address value encoded in Base58 becomes 1QLbxxxxxx.... something:



See how the 1QLa addresses are full length, but the 1QLc addresses are one digit shorter? That is because the only way to have an address starting at 1QLc or greater is by having a binary address that is 59x smaller.

  • Cory, I fixed the formatting on your post. Also, copying content from other sites is of dubious legality, since Stack Exchange re-licenses all of its content as Creative Commons. Still, good post!
    – Nick ODell
    Commented Jun 4, 2013 at 5:08

If it is real, then it probably has to do with how capital letters come before lower-case letters in the UTF-8/ASCII table. Lower values = fewer bits.

  • You are correct. the link in jgm's comment explains it quite well. What is strange though, is that an address that starts with two capitol letters is no more difficult than one that starts with one capital letter and then one lowercase letter. eg: 1AA and 1Aa are equal difficulty. Commented May 13, 2013 at 10:54
  • I don't know C, but I am guessing that it's a rounding error. Since each letter represents a different number, AA and Aa might be in the same general area of complexity but AA and Ab might not be. You could work it out the exact complexity algebraically but (given the random luck involved in finding an answer) it probably doesn't matter.
    – Indolering
    Commented May 15, 2013 at 20:56
  • To clarify the above, it "doesn't matter" in that comparing 3*x and 3^x doesn't make a whole lot of sense. As x gets larger, the magnitude of difference between the two . 3*4 = 12 and 3^4 =81.
    – Indolering
    Commented May 17, 2013 at 19:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.