<p>It is enforced simply having such an enormous number of addresses, that generating one equal to another one is so unlikely it can be considered as good as impossible.</p>

CC BY-SA 3.0
2014-01-08T21:36:01.190Z
@dexter an address is a 160-bit number (so 2^160 possible addresses). Given the [birthday paradox](https://en.wikipedia.org/wiki/Birthday_problem), if I didn't screw the math the probability of a collision givien `n` addresses is `1 - (2^160)! / (2^160 - n)! / (2^160)^n`.
kaoD
CC BY-SA 4.0
2021-10-27T20:33:27.927Z
Probability and reality are different things for me. Murphy law is there to show. I am really curious if exists any code check and secure behave if the wallet from the person which has they wallet address "cloned". What happens with the balance of the first/original wallet? Do they lose everything? or does the second wallet gain all balance?
ceinmart
CC BY-SA 4.0
2021-11-03T11:08:36.667Z
@ceinmart they would both be able to access the same balance in that specific address
o0'.
CC BY-SA 3.0
2013-03-28T10:47:48.313Z
So, what would be the chance of two addresses to be the same?
dexter
CC BY-SA 3.0
2013-03-28T10:51:24.973Z
@dexter so small it's irrelevant. If you want actual figures there are plenty of threads asking that, you may search for them if you like.
o0'.
CC BY-SA 3.0
2013-03-28T14:52:29.977Z
Actually, if your random number generator provider is flawed (hello Debian and most recently NetBSD) it might occur that two generated addresses collide.
Stéphane Gimenez
CC BY-SA 3.0
2013-03-28T15:09:21.190Z
Does bitcoin use the system rng? Sounds dangerous.
alamar
CC BY-SA 3.0
2013-03-28T16:53:46.507Z
@StéphaneGimenez so what? If something is broken, it will damage something else. That happens, like, everywhere?
o0'.
CC BY-SA 3.0
2013-05-18T12:29:36.647Z
@dexter If this answer solved your question, you should click the checkmark next to it to show that this answer solved your question (that's how this site works).
jobukkit
CC BY-SA 3.0
2013-03-28T10:39:42.380Z
2013-03-28T10:39:42.380Z
o0'.
<p><strong>TL;DR:</strong> <em>There are so many addresses that it is improbable that anyone will ever generate a duplicate of another address in use – as long as random number generators work as they should.</em></p>

<h2>2^160 possible addresses</h2>

<p>Bitcoin addresses consist of an alphanumerical string with a length of up to 34 characters, excluding the capital "O", the capital "I" and the lowercase "l", as well as the number "0". This would allow for 58^34 possible combinations, however, as some of the positions are used for a checksum <a href="https://bitcointalk.org/index.php?topic=24268.0" rel="noreferrer">this is reduced to <strong>2^160 valid addresses</strong></a>. The checksum on the other hand allows to detect mistyped addresses as invalid, so that it is highly unlikely to accidentally input another valid address.</p>

<h2>Chance of 3.42*10^(-27) for a collision at one trillion addresses</h2>

<p>Even if we generously assume that at some point there will be one trillion addresses (approx. 160 for each of this planet's population), according to the <a href="http://en.wikipedia.org/wiki/Birthday_attack#Simple_approximation" rel="noreferrer">simple approximation formula for the Birthday attack given on Wikipedia</a>, the chance is <strong>3.42*10^(-27) that any two of those Bitcoin addresses collide</strong>. In comparison, the figure of addresses that were ever used to receive bitcoins was <a href="https://bitcoin.stackexchange.com/questions/10850/how-many-bitcoin-addresses-are-there">just over 13 million in May 2013</a>. </p>

<h2>Address space could be augmented</h2>

<p>Especially as the protocol at any point could be adapted to accept even longer addresses, we can say, yes, it is theoretically possible, but unlikely enough that we can assume for our purposes that it will never happen.*</p>

<h2>It's impractical to generate addresses for gain</h2>

<p>To answer your other question: For each address <a href="https://bitcointalk.org/index.php?topic=24268.0" rel="noreferrer">there apparently are 2^96 different private keys</a> whose corresponding public key will map to the same address. So to actually try to pursue Bitcoin theft, it would be much more sensible to just generate random private keys and hope to find one that has a corresponding address with money on it. <strong>In all likelihood the power for such calculations would cost more than anyone could earn with such a scheme.</strong></p>

<p>*As long as certain random number generators work as well as they should... :)</p>

CC BY-SA 3.0
2016-09-11T19:35:39.790Z
I haven't checked the math on that but I feel that this image visualizes the immensity of 2^256 pretty well: [All energy of our sun from now until burning out wouldn't suffice to count to 2^256 in thermodynamically optimal circumstances.](http://cointext.com/wp-content/uploads/2013/11/btcbruteforce.jpg)
Murch
CC BY-SA 3.0
2013-08-19T07:15:34.627Z
2013-10-03T13:46:57.423Z
2017-04-13T12:47:33.583Z
Murch
<h1>The chance for someone to steal your money</h1>
<h2>In Numbers</h2>
<p>There are 2^160 possible Bitcoin addresses</p>
<p>2^160 is</p>
<pre><code>1 quindecillion 461 quattuordecillion 501 tredecillion 637 duodecillion 330 undecillion 902 decillion 918 nonillion 203 octillion 684 septillion 832 sextillion 716 quintillion 283 quadrillion 19 trillion 655 billion 932 million 542 thousand 976
</code></pre>
<p>or</p>
<pre><code>1 461 501 637 330 902 918 203 684 832 716 283 019 655 932 542 976
</code></pre>
<p>possible Bitcoin addresses</p>
<h2>In Grains of sand</h2>
<p>In truth it is impossible for the human brain to properly and completely visualize an astronomical number like this</p>
<p>There are an estimated 2^63 (or about 7 Quintilian) grains of sand on planet Earth</p>
<p>If you divide 2^160 / 2^63 you get 1.5845633e+29 or</p>
<pre><code>158 456 330 000 000 000 000 000 000 000
</code></pre>
<p>Thats 1 grain of sand in 30 digit number of Earths</p>
<p>or 1 grain of sand in <code>158 456 330 000 000 000 000</code> billion Earths</p>
<h2>In Years</h2>
<p>If you generate 100 000 private keys per second and check if each one has positive balance to steal it will take you</p>
<pre><code>463 439 120 000 000 000 000 000 000 000 000 000
</code></pre>
<p>years to guess the private key of some of the addresses of Satoshi Nakamoto for example</p>
<h2>In Game</h2>
<p>We have a tool called <a href="https://cryptony.app/coin-hunter/" rel="nofollow noreferrer">Coin Hunter</a> which you can use to try different insecure private keys</p>
<p>Here is with the letters from the alphabet and you can see how this addresses had some balance at one point</p>
<p><a href="https://i.sstatic.net/3j6dP.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/3j6dP.png" alt="alphabet private keys" /></a></p>

CC BY-SA 4.0
2024-01-31T15:37:43.633Z
2024-01-31T15:37:43.633Z
Daniel Georgiev
<p>By the pigeonhole principle yes, there could be two bitcoin addresses that are the same. </p>

<p>The Pigeonhole Principle states, that if there are <code>N items</code> for <code>M spots</code> with <code>N &gt; M</code> then there must be at least 2 of the N items in one of the M spots. </p>

<p>For Bitcoin this means we want/need but might never reach an infinite amount of addresses for an infinite amount of transactions. (but we can reuse addresses; I dont want to get into that) But each addresses is mapped into a space. The space is a certain size (however long addresses are). So by the principle above <code>N = number of transactions/needed addresses = trending to infinity</code> (if bitcoin goes on forever) and <code>M = the size of the address space</code>. </p>

<p>Well, fitting infinity into a finite space means, there would be two of the same addresses. But our finite space is so large that it will take us a long time to fill it up, and the possibility of filling a space of M twice is so small in this case, it's for all intents and purposes zero.</p>

CC BY-SA 3.0
2016-08-24T22:41:12.687Z
The pidgeon hole principle is a bad fit here, because N is not anywhere close to the size of M, let alone actually larger. The only part of the answer that actually addresses the question is the last sentence which remains vague.
Murch
CC BY-SA 3.0
2013-03-28T17:15:39.623Z
2015-05-11T09:35:04.630Z
2015-05-11T09:35:04.630Z
KDecker
<p>I am wondering whether each bitcoin address is unique. I would assume yes. Then, how is this enforced given the distributed address generation?</p>
<p>As I understand it, each time an address is generated, a new key-pair is also generated. On what basis is this done? Since the address is the hash of the public half of the key-pair that would also allow (at least theoretically) multiple public keys to have the same hash.</p>

CC BY-SA 3.0
2017-11-22T06:52:19.347Z
If you are afraid someone will find your key, spread your wealth among several different addresses you control.
zundi
<security><address-generation><key-collision>
Is each Bitcoin address unique?
dexter
# Is each Bitcoin address unique?

(Asked by: username_0 on 2013-03-28)

I am wondering whether each bitcoin address is unique. I would assume yes. Then, how is this enforced given the distributed address generation?

As I understand it, each time an address is generated, a new key-pair is also generated. On what basis is this done? Since the address is the hash of the public half of the key-pair that would also allow (at least theoretically) multiple public keys to have the same hash.

**Tags:** security, address-generation, key-collision

> **Comments:**
> **username_1**: If you are afraid someone will find your key, spread your wealth among several different addresses you control.  

---

## 4 answers

### Answer by username_10 on 2013-03-28. Score: 5 | Accepted answer

By the pigeonhole principle yes, there could be two bitcoin addresses that are the same.

The Pigeonhole Principle states, that if there are `N items` for `M spots` with `N > M` then there must be at least 2 of the N items in one of the M spots.

For Bitcoin this means we want/need but might never reach an infinite amount of addresses for an infinite amount of transactions. (but we can reuse addresses; I dont want to get into that) But each addresses is mapped into a space. The space is a certain size (however long addresses are). So by the principle above `N = number of transactions/needed addresses = trending to infinity` (if bitcoin goes on forever) and `M = the size of the address space`.

Well, fitting infinity into a finite space means, there would be two of the same addresses. But our finite space is so large that it will take us a long time to fill it up, and the possibility of filling a space of M twice is so small in this case, it's for all intents and purposes zero.

> **Comments:**
> **username_8**: The pidgeon hole principle is a bad fit here, because N is not anywhere close to the size of M, let alone actually larger. The only part of the answer that actually addresses the question is the last sentence which remains vague.  

---

### Answer by username_8 on 2013-08-19. Score: 31

**TL;DR:** *There are so many addresses that it is improbable that anyone will ever generate a duplicate of another address in use – as long as random number generators work as they should.*

## 2^160 possible addresses

Bitcoin addresses consist of an alphanumerical string with a length of up to 34 characters, excluding the capital "O", the capital "I" and the lowercase "l", as well as the number "0". This would allow for 58^34 possible combinations, however, as some of the positions are used for a checksum [this is reduced to **2^160 valid addresses**](https://bitcointalk.org/index.php?topic=24268.0). The checksum on the other hand allows to detect mistyped addresses as invalid, so that it is highly unlikely to accidentally input another valid address.

## Chance of 3.42\*10^(-27) for a collision at one trillion addresses

Even if we generously assume that at some point there will be one trillion addresses (approx. 160 for each of this planet's population), according to the [simple approximation formula for the Birthday attack given on Wikipedia](http://en.wikipedia.org/wiki/Birthday_attack#Simple_approximation), the chance is **3.42\*10^(-27) that any two of those Bitcoin addresses collide**. In comparison, the figure of addresses that were ever used to receive bitcoins was [just over 13 million in May 2013](https://bitcoin.stackexchange.com/questions/10850/how-many-bitcoin-addresses-are-there).

## Address space could be augmented

Especially as the protocol at any point could be adapted to accept even longer addresses, we can say, yes, it is theoretically possible, but unlikely enough that we can assume for our purposes that it will never happen.\*

## It's impractical to generate addresses for gain

To answer your other question: For each address [there apparently are 2^96 different private keys](https://bitcointalk.org/index.php?topic=24268.0) whose corresponding public key will map to the same address. So to actually try to pursue Bitcoin theft, it would be much more sensible to just generate random private keys and hope to find one that has a corresponding address with money on it. **In all likelihood the power for such calculations would cost more than anyone could earn with such a scheme.**

\*As long as certain random number generators work as well as they should... :)

> **Comments:**
> **username_8**: I haven't checked the math on that but I feel that this image visualizes the immensity of 2^256 pretty well: [All energy of our sun from now until burning out wouldn't suffice to count to 2^256 in thermodynamically optimal circumstances.](http://cointext.com/wp-content/uploads/2013/11/btcbruteforce.jpg)  

---

### Answer by username_2 on 2013-03-28. Score: 10

It is enforced simply having such an enormous number of addresses, that generating one equal to another one is so unlikely it can be considered as good as impossible.

> **Comments:**
> **username_0**: So, what would be the chance of two addresses to be the same?  
> **username_2**: @username_0 so small it's irrelevant. If you want actual figures there are plenty of threads asking that, you may search for them if you like.  
> **username_5**: Actually, if your random number generator provider is flawed (hello Debian and most recently NetBSD) it might occur that two generated addresses collide.  
> **username_6**: Does bitcoin use the system rng? Sounds dangerous.  
> **username_2**: @username_5 so what? If something is broken, it will damage something else. That happens, like, everywhere?  
> **username_7**: @username_0 If this answer solved your question, you should click the checkmark next to it to show that this answer solved your question (that's how this site works).  
> **username_3**: @username_0 an address is a 160-bit number (so 2^160 possible addresses). Given the [birthday paradox](https://en.wikipedia.org/wiki/Birthday_problem), if I didn't screw the math the probability of a collision givien `n` addresses is `1 - (2^160)! / (2^160 - n)! / (2^160)^n`.  
> **username_4**: Probability and reality are different things for me. Murphy law is there to show. I am really curious if exists any code check and secure behave if the wallet from the person which has they wallet address "cloned". What happens with the balance of the first/original wallet? Do they lose everything? or does the second wallet gain all balance?  
> **username_2**: @username_4 they would both be able to access the same balance in that specific address  

---

### Answer by username_9 on 2024-01-31. Score: -1

# The chance for someone to steal your money

## In Numbers

There are 2^160 possible Bitcoin addresses

2^160 is

```
1 quindecillion 461 quattuordecillion 501 tredecillion 637 duodecillion 330 undecillion 902 decillion 918 nonillion 203 octillion 684 septillion 832 sextillion 716 quintillion 283 quadrillion 19 trillion 655 billion 932 million 542 thousand 976

```

or

```
1 461 501 637 330 902 918 203 684 832 716 283 019 655 932 542 976

```

possible Bitcoin addresses

## In Grains of sand

In truth it is impossible for the human brain to properly and completely visualize an astronomical number like this

There are an estimated 2^63 (or about 7 Quintilian) grains of sand on planet Earth

If you divide 2^160 / 2^63 you get 1.5845633e+29 or

```
158 456 330 000 000 000 000 000 000 000

```

Thats 1 grain of sand in 30 digit number of Earths

or 1 grain of sand in `158 456 330 000 000 000 000` billion Earths

## In Years

If you generate 100 000 private keys per second and check if each one has positive balance to steal it will take you

```
463 439 120 000 000 000 000 000 000 000 000 000

```

years to guess the private key of some of the addresses of Satoshi Nakamoto for example

## In Game

We have a tool called [Coin Hunter](https://cryptony.app/coin-hunter/) which you can use to try different insecure private keys

Here is with the letters from the alphabet and you can see how this addresses had some balance at one point

[![alphabet private keys](https://i.sstatic.net/3j6dP.png)](https://i.sstatic.net/3j6dP.png)


---

