Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: nebulus on September 17, 2012, 11:55:04 PM



Title: What is the chance of generating the same BTC address as someone?
Post by: nebulus on September 17, 2012, 11:55:04 PM
So I was making myself a new address by running bitcoin client offline and it hit me that there is a chance of generating address as someone else. What are the real odds of such thing happening? Thanks!


Title: Re: What is the chance of generating the same BTC address as someone?
Post by: ageisp0lis on September 17, 2012, 11:58:34 PM
Zilch dude. Once in a trillion gazillion years. I have the calculations in a log somewhere. . . I've also asked the lead developer this question point blank in person. He said the chances of such a collision were positively negligible.


Title: Re: What is the chance of generating the same BTC address as someone?
Post by: nobbynobbynoob on September 17, 2012, 11:59:32 PM
Yes, my analogy is it's roughly a similar chance to accidentally replicating someone else's DNA. ;D


Title: Re: What is the chance of generating the same BTC address as someone?
Post by: ageisp0lis on September 18, 2012, 12:02:36 AM
Here you go:

<sipa> anyway, to brute force 256-85=171 bits at 1Tkey/s, it'd take some 94847369674933745800730934462790 years

(P.S., it was Gavin and not sipa who I asked)


Title: Re: What is the chance of generating the same BTC address as someone?
Post by: DannyHamilton on September 18, 2012, 12:31:28 AM
Zilch dude. Once in a trillion gazillion years. . .
. . . roughly a similar chance to accidentally replicating someone else's DNA.
. . . to brute force 256-85=171 bits at 1Tkey/s, it'd take some 94847369674933745800730934462790 years. . .
Doesn't it actually depend on the method you use for creating the BTC address?  If you are using a brainwallet, or some non-random method of key generation, wouldn't you have an increased chance that someone else might use the same non-random method?

Most of the examples I see regarding key collision generally seem to refer to the chances of matching a pre-chosen address.  ( If address YYYY has 5,000 BTC associated with it, what is the chance that someone can figure out the key and steal the coins?), but this question of any 2 random addresses resulting in a collision seems more like the birthday problem. Given a pool of people with randomly distributed birthdays, how many would have to be selected to have a reasonable chance that two of them will share a birthday? The number is certainly less than 365.  It really comes down to how you define "reasonable chance", but if for the sake of the current discussion we choose 50% chance, the number is only 23, for a 99% chance of collision you only need to choose 57 people.

I really don't understand how the math for the birthday problem is calculated, but I have wondered sometimes how the numbers work out when applied to randomly generated BTC addresses. I suspect the odds are still beyond concern, but I also suspect that they are smaller than the typical answer.


Title: Re: What is the chance of generating the same BTC address as someone?
Post by: Gavin Andresen on September 18, 2012, 12:33:49 AM
Yes, mathematically approximately zilch.

... unless the OpenSSL entropy-gathering code on your computer isn't working properly, so bitcoin's random-key-generating code doesn't work (we use OpenSSL to get good random numbers). That is a bigger worry, but happily lots of people have been reviewing that code for years.


Title: Re: What is the chance of generating the same BTC address as someone?
Post by: nebulus on September 18, 2012, 12:41:57 AM
All right, thanks for the reply, guys!