<p>According to <a href="https://en.bitcoin.it/wiki/Private_key" rel="nofollow noreferrer">https://en.bitcoin.it/wiki/Private_key</a></p>
<blockquote>
<p>any 256-bit number from 0x1 to 0xFFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFE BAAE DCE6 AF48 A03B BFD2 5E8C D036 4140 is a valid private key.</p>
</blockquote>
<p>So if someone generates a private key using the usual random process, and then you generate a private key using a random process there is one chance in 0xFFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFE BAAE DCE6 AF48 A03B BFD2 5E8C D036 4140 that you will generate the same key.</p>
<p>If <a href="https://play.golang.org/p/9bJl_AeofT1" rel="nofollow noreferrer">my workings</a> are correct, that is one chance in 115792089237316195423570985008687907852837564279074904382605163141518161494336
or one chance in around 1.158 x 10<sup>77</sup></p>
<p>In terms of a probability, this is fairly close to zero. It is around
0.00000000000000000000000000000000000000000000000000000000000000000000000000000864</p>
<hr />
<p>It is hard to grasp the scale of these numbers. According to <a href="https://www.universetoday.com/36302/atoms-in-the-universe/" rel="nofollow noreferrer">https://www.universetoday.com/36302/atoms-in-the-universe/</a></p>
<blockquote>
<p>it is estimated that the there are between 10<sup>78</sup> to 10<sup>82</sup> atoms in the known, observable universe</p>
</blockquote>
<hr />
<p>Related questions that might be informative</p>
<ul>
<li><a href="https://bitcoin.stackexchange.com/q/8804/5406">Is each Bitcoin address unique?</a></li>
<li><a href="https://crypto.stackexchange.com/questions/48667/how-long-would-it-take-to-brute-force-an-aes-128-key">How long would it take to brute force an AES-128 key?</a> (Bitcoin doesn't use AES but the answers give some idea of the scales involved)</li>
</ul>

CC BY-SA 4.0
2021-04-05T09:15:46.480Z
2021-04-05T13:13:03.073Z
2021-04-05T13:13:03.073Z
RedGrittyBrick
<p>A mathematical proof method with details for  &quot;near to zero chance of generating the same pair key wallet&quot;
I can not find a clear mathematical proof for the top sentence with example</p>

CC BY-SA 4.0
2021-04-05T11:10:28.617Z
Hi hasann Najafi, please check out https://bitcoin.stackexchange.com/q/8804/5406, I think it might answer your question.
Murch
<bitcoin-core><blockchain><wallet>
I can not find a clear mathematical proof method with details and example for "near to zero chance of generating the same pair key wallet"
hasann najafi
# I can not find a clear mathematical proof method with details and example for "near to zero chance of generating the same pair key wallet"

(Asked by: username_0 on 2021-04-05)

A mathematical proof method with details for "near to zero chance of generating the same pair key wallet"
I can not find a clear mathematical proof for the top sentence with example

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

> **Comments:**
> **username_1**: Hi hasann Najafi, please check out https://bitcoin.stackexchange.com/q/8804/5406, I think it might answer your question.  

---

## 1 answers

### Answer by username_2 on 2021-04-05. Score: 2

According to <https://en.bitcoin.it/wiki/Private_key>

> any 256-bit number from 0x1 to 0xFFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFE BAAE DCE6 AF48 A03B BFD2 5E8C D036 4140 is a valid private key.

So if someone generates a private key using the usual random process, and then you generate a private key using a random process there is one chance in 0xFFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFE BAAE DCE6 AF48 A03B BFD2 5E8C D036 4140 that you will generate the same key.

If [my workings](https://play.golang.org/p/9bJl_AeofT1) are correct, that is one chance in 115792089237316195423570985008687907852837564279074904382605163141518161494336
or one chance in around 1.158 x 1077

In terms of a probability, this is fairly close to zero. It is around
0.00000000000000000000000000000000000000000000000000000000000000000000000000000864

---

It is hard to grasp the scale of these numbers. According to <https://www.universetoday.com/36302/atoms-in-the-universe/>

> it is estimated that the there are between 1078 to 1082 atoms in the known, observable universe

---

Related questions that might be informative

* [Is each Bitcoin address unique?](https://bitcoin.stackexchange.com/q/8804/5406)
* [How long would it take to brute force an AES-128 key?](https://crypto.stackexchange.com/questions/48667/how-long-would-it-take-to-brute-force-an-aes-128-key) (Bitcoin doesn't use AES but the answers give some idea of the scales involved)


---

