<p>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 :-) </p>

<p>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: </p>

<p>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: <code>http://gobittest.appspot.com/Address</code></p>

<p>So your last question is a bit tricky:</p>

<blockquote>
  <p>Is it true that there is many Private keys that have the same 20b hash
  (Address)?</p>
</blockquote>

<p>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:</p>

<ul>
<li><p>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")</p></li>
<li><p>if all priv keys generate (Bitcoin) addresses with the same length? --> no,  addresses have 26-34 Bytes length. </p></li>
<li><p>if all priv keys generate the same length of pubkeys (and hashed 20Bytes long), from which then the Bitcoin address is generated? --> yes</p></li>
</ul>

CC BY-SA 3.0
2017-08-14T05:42:23.440Z
2017-08-14T05:42:23.440Z
pebwindkraft
<p>Yes, that is true.</p>

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

CC BY-SA 3.0
2017-08-13T20:00:44.650Z
`any corresponding`
Denis Leonov
CC BY-SA 3.0
2017-08-13T20:06:44.303Z
I don't understand your comment.
Pieter Wuille
CC BY-SA 3.0
2017-08-13T20:18:04.053Z
`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?
Denis Leonov
CC BY-SA 3.0
2017-08-14T01:05:34.270Z
Why do mean with your "any corresponding" comment?
Pieter Wuille
CC BY-SA 3.0
2017-08-15T06:33:23.840Z
I mean, more correct is to say `a set of corresponding keys`, of course if thesis is right. Thanks for help
Denis Leonov
CC BY-SA 3.0
2017-08-15T18:34:57.840Z
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
CC BY-SA 3.0
2017-08-13T19:34:56.627Z
2017-08-13T19:34:56.627Z
Pieter Wuille
<p><code>Private key</code> is 32-byte number.</p>

<p><code>Address (Hash)</code> is 20-byte number.</p>

<p>Is it true that there is many <code>Private keys</code> that have the same 20-byte hash?</p>

<p>P.S. How to get <code>Address</code> from <code>Private key</code>:</p>

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

<ol>
<li>Elliptic curve point multiplication</li>
<li>SHA256, ripemd160</li>
<li>Hex converts to Base58</li>
</ol>

<blockchain><bitcoin-core><cryptography>
Private key and Address
Denis Leonov
# Private key and Address

(Asked by: username_0 on 2017-08-13)

`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

**Tags:** blockchain, bitcoin-core, cryptography


---

## 2 answers

### Answer by username_2 on 2017-08-13. Score: 4 | Accepted answer

Yes, that is true.

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

> **Comments:**
> **username_0**: `any corresponding`  
> **username_2**: I don't understand your comment.  
> **username_0**: `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?  
> **username_2**: Why do mean with your "any corresponding" comment?  
> **username_0**: I mean, more correct is to say `a set of corresponding keys`, of course if thesis is right. Thanks for help  
> **username_2**: 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.  

---

### Answer by username_1 on 2017-08-14. Score: 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 username_2 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


---

