Private key and Address

1

1

Private key is 32-byte number.

Address (Hash) is 20-byte number.

Is it true that there is many Private keys that have the same 20-byte hash?

P.S. How to get Address from Private key:

Private key (32-byte number, random) --1--> 04+Public key (64-byte number, elliptic curve point) --2--> Hash, Address (20-byte number) --3--> Address string (Base58 string).

  1. Elliptic curve point multiplication
  2. SHA256, ripemd160
  3. Hex converts to Base58

D L

Posted 2017-08-13T18:14:54.593

Reputation: 478

Answers

4

Yes, that is true.

However, to go from an address to any corresponding private key still requires an unfeasibly large amount of computing.

Pieter Wuille

Posted 2017-08-13T18:14:54.593

Reputation: 54 032

any correspondingD L 2017-08-13T20:00:44.650

I don't understand your comment.Pieter Wuille 2017-08-13T20:06:44.303

Is it true that there is many Private keys that have the same 20b hash (Address)? --> Yes, that is true.. So what you don't understand?D L 2017-08-13T20:18:04.053

Why do mean with your "any corresponding" comment?Pieter Wuille 2017-08-14T01:05:34.270

I mean, more correct is to say a set of corresponding keys, of course if thesis is right. Thanks for helpD L 2017-08-15T06:33:23.840

What I mean is that in order to steal someone's coins, you need to find any private key that corresponds to their address, and not necessarily the one they used. One is enough, you don't need all of them. However, it's still unfeasibly much work to find just one.Pieter Wuille 2017-08-15T18:34:57.840

2

hmmm, a bit confusing, maybe I can add some clarification, that also helps other readers. A 32b number or a 20b number doesn't seem to be an exact description. Bytes are abbreviated as capital "B", and bits are abbreviated as lower "b" (IEC 80000-13, IEEE 1541). A 32b privkey would be 4 Bytes, that is a bit too short :-)

A Bitcoin privkey is 32 Bytes (which is a 256-bit number). A Bitcoin address is a string of 26-34 chars, to be more "human readable". It is derived from the priv key in the following way:

privkey --> public key --> sha256 --> ripemd160 (here we actually have 20 Bytes) --> + network Byte --> double sha256 --> +chksum --> +Bytes reordering --> base58 encoding. This reads more complex than it actually is, a good overview here: http://gobittest.appspot.com/Address

So your last question is a bit tricky:

Is it true that there is many Private keys that have the same 20b hash (Address)?

Generally the idea of the hashing is, that you enter a string into the function, and it returns a fixed length output. If you change a single bit in this string, the result returns totally different. And as Pieter said, going from output to input is nearly impossible. So if you are asking:

  • if you can generate the same address (or public key) from different private keys? --> no (until today, there was no proof for it, but there are projects on the way to find "collisions")

  • if all priv keys generate (Bitcoin) addresses with the same length? --> no, addresses have 26-34 Bytes length.

  • if all priv keys generate the same length of pubkeys (and hashed 20Bytes long), from which then the Bitcoin address is generated? --> yes

pebwindkraft

Posted 2017-08-13T18:14:54.593

Reputation: 4 568