# Is each Bitcoin address unique?

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.

• If you are afraid someone will find your key, spread your wealth among several different addresses you control. Commented Nov 22, 2017 at 6:52

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.

• 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
Commented Aug 24, 2016 at 22:41

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.

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. 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, 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.

## 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 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... :)

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.

• So, what would be the chance of two addresses to be the same? Commented Mar 28, 2013 at 10:47
• @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'.
Commented Mar 28, 2013 at 10:51
• Actually, if your random number generator provider is flawed (hello Debian and most recently NetBSD) it might occur that two generated addresses collide. Commented Mar 28, 2013 at 14:52
• @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). Commented May 18, 2013 at 12:29
• @ceinmart they would both be able to access the same balance in that specific address
– o0'.
Commented Nov 3, 2021 at 11:08

# 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
``````

## 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 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