If public keys are 34 characters long, and private keys are 61 characters long, then the combinations of 34 characters is not sufficient to give each combination of 61 characters a unique pair.

My calculations show 8.6 * 10^89 combinations for a private key.

And 9.0 * 10^59 combinations for a public key.

So how do we have one-to-one mapping?

(Please correct me if I am wrong).

  • 4
    You should review your older questions and mark correct answers.
    – Serith
    Nov 29, 2011 at 1:24
  • Do your calculations take into account that Base58 won't allow certain characters in the hash? Dec 13, 2012 at 17:38

1 Answer 1


We don't have a one-to-one mapping in the sense that you are talking about. But, for practical purposes, we have a one-to-one mapping. Yes, if someone tried to map every single key, after a few million centuries, they'd have a problem. But we won't have to worry about that until long after the stars burn out.

To find two keys that hash to the same ID, you'd have to try on average 2^80 keys. If you had a million computers, each capable of trying 1,000 keys a second, it would take 380,000 centuries to find a single match. And all you could do with those two keys was claim money sent to the same ID with either one, which would cause no harm at all.

Now, if you want to find a key that matches a key that actually has Bitcoins already, that's a much harder task. Say there are 10,000,000 IDs that have coins. The odds of a single key matching one of these 10,000,000 is 2^160/10,000,000 -- even with 1,000,000 computers each trying 1,000 keys a second, it would take billions of billions of centuries.

So for practical purposes, it's one-to-one.

  • In the first part of the answer you say 2^80 keys and in the second part you say 2^160, but you don't explain how to get from one to the other. Also, I calculated 10^89 and you have 2^80. My 10^89 is from 58 character possibilities (a-z|A-Z|0-9) X 61 digits. Nov 29, 2011 at 18:04
  • How many people do you need to have a 50/50 chance of finding a person with a birthday on May 11? How many people do you need to have a 50/50 chance of finding two people with the same birthday? That's the reason for the difference. Your math is wrong because some of the information is redundant. The account ID is derived from a 160-bit hash so there are only 2^160 possible, valid addresses. Nov 29, 2011 at 19:44

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.