1

Since the ratio of all possible digits (please correct my math if I am wrong) of a public key versus private is:

1/79228162514264337593543950336

  • for public (40^16): 1 461 501 637 330 902 918 203 684 832 716 283 019 655 932 542 976

  • for private (64^16): 115 792 089 237 316 195 423 570 985 008 687 907 853 269 984 665 640 564 039 457 584 007 913 129 639 936

If no, why not ? If yes, wouldn't that make it just a slightly less secure system ?

  • Yes, you are right, it is a duplicate just worded differently. – Damir Olejar Nov 29 '19 at 12:47
4

An address is simply the last 20 bytes of the keccak256 hash of the public key.

For ecdsa algorithms (and RSA), each private key has exactly one public key.

However, when this public key is hashed to create the address, it results in a loss of information as the resulting trimmed hash is smaller than the input public key. This means, by the pigeonhole principle, that multiple public keys hash and trim to the same value. As Ethereum uses the key recovery scheme to derive the public key from the signature and then hash it to determine the tx.origin address, this makes it possible for there to be multiple private keys that can spend coins from an address without having the same public key.

Computationally, finding such a collision is impractical due to the sheer size of the key space.

| improve this answer | |
  • I think the question was about Ethereum rather than Bitcoin, but the answer seems to be relevant for both as Ethereum also uses 160-bit hash of a public key. However, hash function is keccak256 truncated to 160 bits rather than HASH160, and address format is simple hexadecimal string rather that p2pkh/p2wph. – Mikhail Vladimirov Nov 29 '19 at 10:24
  • @MikhailVladimirov You're totally right - I somehow got mixed up and thought I was on Bitcoin.SE. I've updated the answer to be ETH specific, thanks! – Raghav Sood Nov 29 '19 at 11:32
  • Just to add, since this is a duplicate question, the theorethically shared addresses can spend each-other's tokens and therefore the answer is "yes". – Damir Olejar Nov 29 '19 at 12:50

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