Bitcoin Forum
May 12, 2024, 06:01:53 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 [4] 5 »  All
  Print  
Author Topic: What are the chances of an address collision? and what happens when it does?  (Read 22379 times)
molecular
Donator
Legendary
*
Offline Offline

Activity: 2772
Merit: 1019



View Profile
November 03, 2012, 07:40:26 PM
 #61

And then of course you need to consider if there is some correlation between your current location and the chance of being struck by lightning...

I thought about that before. The answer is: in case I'm out in the rain on some field close to a tree, the probability of me actually taking a crap is about 4 times lower than when I'm at home. If you have to crap, you have to crap Wink

So that should get factored in.

PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0  3F39 FC49 2362 F9B7 0769
The trust scores you see are subjective; they will change depending on who you have in your trust list.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715536913
Hero Member
*
Offline Offline

Posts: 1715536913

View Profile Personal Message (Offline)

Ignore
1715536913
Reply with quote  #2

1715536913
Report to moderator
1715536913
Hero Member
*
Offline Offline

Posts: 1715536913

View Profile Personal Message (Offline)

Ignore
1715536913
Reply with quote  #2

1715536913
Report to moderator
molecular
Donator
Legendary
*
Offline Offline

Activity: 2772
Merit: 1019



View Profile
November 03, 2012, 07:45:18 PM
 #62

Ok, new data, will recalc everything:

  • probability of getting struck by lightning in any given year: 1/280000.
  • probability of taking a shit at any given point in time: 1/(60*24) = 1/1440 (assuming you take a crap every day and the actual process takes 1 minute)
  • probability of getting struck by lightning while taking a crap in any given year: 1/(280000*1440) = 1/1.47E11 = 2.48E-9
  • probability of taking a crap while being in a situation where being struck by lightning can actually occur = 1/1440 = 0.25 = 1.74E-4
  • probability of finding a collision: 1E-65
  • getting hit by lightning while taking a crap for how many years in a row is equally probable as finding a collision: log(1E-65) / log(1.74E-4) = 17.3

is my math roughly correct now?

If so, I can say: "Finding a collision is about as likely as being struck by lightning while taking a crap every year for 17 years in a row".

PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0  3F39 FC49 2362 F9B7 0769
FreeMoney
Legendary
*
Offline Offline

Activity: 1246
Merit: 1014


Strength in numbers


View Profile WWW
November 03, 2012, 07:51:33 PM
 #63

1 minute is a nice crap, the average is going to be several times longer.

Play Bitcoin Poker at sealswithclubs.eu. We're active and open to everyone.
molecular
Donator
Legendary
*
Offline Offline

Activity: 2772
Merit: 1019



View Profile
November 03, 2012, 07:54:27 PM
 #64

1 minute is a nice crap, the average is going to be several times longer.

I want the lightning to strike while you are actually in the process of pushing. The wiping is irrelevant Wink

Jokes aside: I'm trying to not overestimate, so I took 1 minute. I doubt many will be quicker.

PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0  3F39 FC49 2362 F9B7 0769
flynn
Hero Member
*****
Offline Offline

Activity: 728
Merit: 540



View Profile
November 03, 2012, 07:58:25 PM
 #65

I think Science just made a very impressive progress here.


intentionally left blank
novusordo
Sr. Member
****
Offline Offline

Activity: 800
Merit: 250



View Profile
November 03, 2012, 09:46:52 PM
 #66

Ok, new data, will recalc everything:

  • probability of getting struck by lightning in any given year: 1/280000.
  • probability of taking a shit at any given point in time: 1/(60*24) = 1/1440 (assuming you take a crap every day and the actual process takes 1 minute)
  • probability of getting struck by lightning while taking a crap in any given year: 1/(280000*1440) = 1/1.47E11 = 2.48E-9
  • probability of taking a crap while being in a situation where being struck by lightning can actually occur = 1/1440 = 0.25 = 1.74E-4
  • probability of finding a collision: 1E-65
  • getting hit by lightning while taking a crap for how many years in a row is equally probable as finding a collision: log(1E-65) / log(1.74E-4) = 17.3

is my math roughly correct now?

If so, I can say: "Finding a collision is about as likely as being struck by lightning while taking a crap every year for 17 years in a row".


You, good sir, have surely created the new standard of explaining address collision probability to noobs. I will refer to your great work in any instance I'm asked this question.


                            █████
                        █████████████
                     █████████████
                 ██████████████        █████
              █████████████        ████████████
          ██████████████        █████████████
       █████████████        █████████████       ██████
       ██████████        ████████████           ██████
       ███████       █████████████       ███    ██████
       ███████    █████████████       ██████    ██████
       ████████████████████       ██████████    ██████
       █████████████████       █████████████    ██████
       █████████████       █████████████        ██████
       ██████████       █████████████           ██████
       ███████      ██████████████       ███    ██████
       ██████    █████████████       ███████    ██████
       ██████    ██████████       ██████████    ██████
       ██████    ██████        █████████████    ██████
       ██████    ███       █████████████        ██████
       ██████           █████████████       ██████████
       ██████       █████████████        █████████████
                 █████████████       █████████████
              ████████████        █████████████
                  ████         ████████████
                           █████████████
                         ███████████
                            █████
Ferrum Network • Interoperability Network for Financial Applications
molecular
Donator
Legendary
*
Offline Offline

Activity: 2772
Merit: 1019



View Profile
November 03, 2012, 10:27:07 PM
 #67

You, good sir, have surely created the new standard of explaining address collision probability to noobs. I will refer to your great work in any instance I'm asked this question.

craptastic!

At this point, let me express my sincere thanks to the following people who either laid the foundation for, hardened or otherwise contributed to my work:

  • kokojie
  • enmaku
  • DeathAndTaxes
  • paraipan
  • runeks
  • flynn
  • mskwik
  • FreeMoney

(I hope I didn't forget anyone)

Thank you guys!

I'm looking forward to further improvements based on my work!

PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0  3F39 FC49 2362 F9B7 0769
paraipan
In memoriam
Legendary
*
Offline Offline

Activity: 924
Merit: 1004


Firstbits: 1pirata


View Profile WWW
November 03, 2012, 10:31:21 PM
Last edit: November 03, 2012, 10:44:30 PM by paraipan
 #68

Ok, new data, will recalc everything:

  • probability of getting struck by lightning in any given year: 1/280000.
  • probability of taking a shit at any given point in time: 1/(60*24) = 1/1440 (assuming you take a crap every day and the actual process takes 1 minute)
  • probability of getting struck by lightning while taking a crap in any given year: 1/(280000*1440) = 1/1.47E11 = 2.48E-9
  • probability of taking a crap while being in a situation where being struck by lightning can actually occur = 1/1440 = 0.25 = 1.74E-4
  • probability of finding a collision: 1E-65
  • getting hit by lightning while taking a crap for how many years in a row is equally probable as finding a collision: log(1E-65) / log(1.74E-4) = 17.3

is my math roughly correct now?

If so, I can say: "Finding a collision is about as likely as being struck by lightning while taking a crap every year for 17 years in a row".


You, good sir, have surely created the new standard of explaining address collision probability to noobs. I will refer to your great work in any instance I'm asked this question.

+1 great work, will save for future reference

BTCitcoin: An Idea Worth Saving - Q&A with bitcoins on rugatu.com - Check my rep
flynn
Hero Member
*****
Offline Offline

Activity: 728
Merit: 540



View Profile
November 03, 2012, 10:37:02 PM
 #69

We should apply for the Nobel prize

intentionally left blank
odolvlobo
Legendary
*
Offline Offline

Activity: 4312
Merit: 3214



View Profile
November 03, 2012, 10:40:48 PM
Last edit: November 03, 2012, 11:36:39 PM by odolvlobo
 #70

I'm not saying collisions anywhere close to likely to occur, but...

Given your example of 1 billion users at 10 addresses each:

There are 2^160 or about 1,460,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 possible addresses
In your scenario, 1,000,000,000 people are using 10 addresses each for a total of 10,000,000,000 possible addresses
10,000,000,000 / 2^160 should yield the probability of a collision occurring
10,000,000,000 / 2^160 = 0.00000000000000000000000000000000000000684

So the chances of a collision occurring in your scenario are approximately 0.000000000000000000000000000000000000684%

This is the chance of finding a collision when generating 1 address.

The chance of a collision occuring "at all" is higher.

Let's assume (worst case) we use bitcoin for 1E3 years and there are 1E10 people populating earth at any point in time who will generate on average 1E3 addresses during their lifetimes.

What are the chances of a collision to occur under these assumptions?


The probability of a collision is found by a standard formula: p = 1 - k! / Nk-1(N-k)!, where k is the number of hashes generated (100x1010x103) and N is the number of possible hashes (2160).

This is a difficult number to calculate, but there is a good approximation: p = 1 - e-k(k-1)/2N

But even that value is difficult to compute because of the precision needed. Here is another approximation p = k2/2N.

So the answer is that the probability of at least one collision is approximately 7x10-19 or 0.00000000000000007%


See: http://preshing.com/20110504/hash-collision-probabilities

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
paraipan
In memoriam
Legendary
*
Offline Offline

Activity: 924
Merit: 1004


Firstbits: 1pirata


View Profile WWW
November 03, 2012, 10:45:32 PM
 #71

A graphical explanation of bitcoin security https://i.imgur.com/VjtG3.jpg


BTCitcoin: An Idea Worth Saving - Q&A with bitcoins on rugatu.com - Check my rep
molecular
Donator
Legendary
*
Offline Offline

Activity: 2772
Merit: 1019



View Profile
November 04, 2012, 10:04:21 AM
 #72

A graphical explanation of bitcoin security https://i.imgur.com/VjtG3.jpg



awesome! where did that come from?

PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0  3F39 FC49 2362 F9B7 0769
molecular
Donator
Legendary
*
Offline Offline

Activity: 2772
Merit: 1019



View Profile
November 04, 2012, 10:08:16 AM
 #73

I'm not saying collisions anywhere close to likely to occur, but...

Given your example of 1 billion users at 10 addresses each:

There are 2^160 or about 1,460,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 possible addresses
In your scenario, 1,000,000,000 people are using 10 addresses each for a total of 10,000,000,000 possible addresses
10,000,000,000 / 2^160 should yield the probability of a collision occurring
10,000,000,000 / 2^160 = 0.00000000000000000000000000000000000000684

So the chances of a collision occurring in your scenario are approximately 0.000000000000000000000000000000000000684%

This is the chance of finding a collision when generating 1 address.

The chance of a collision occuring "at all" is higher.

Let's assume (worst case) we use bitcoin for 1E3 years and there are 1E10 people populating earth at any point in time who will generate on average 1E3 addresses during their lifetimes.

What are the chances of a collision to occur under these assumptions?


The probability of a collision is found by a standard formula: p = 1 - k! / Nk-1(N-k)!, where k is the number of hashes generated (100x1010x103) and N is the number of possible hashes (2160).

This is a difficult number to calculate, but there is a good approximation: p = 1 - e-k(k-1)/2N

But even that value is difficult to compute because of the precision needed. Here is another approximation p = k2/2N.

So the answer is that the probability of at least one collision is approximately 7x10-19 or 0.00000000000000007%


See: http://preshing.com/20110504/hash-collision-probabilities

thanks odolvlobo, this is very helpful info.

Since this is the probability of a collision to be found anywhere within the network (right?), I should probably either compare this to the probability of anyone getting struck by lightning, or I should compare the probability of a particular indivudual finding a collision with the probability of said individual getting struck by lightning?

PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0  3F39 FC49 2362 F9B7 0769
paraipan
In memoriam
Legendary
*
Offline Offline

Activity: 924
Merit: 1004


Firstbits: 1pirata


View Profile WWW
November 04, 2012, 11:46:21 AM
 #74

A graphical explanation of bitcoin security https://i.imgur.com/VjtG3.jpg



awesome! where did that come from?

I saw the link on IRC and though I should share, didn't ask where it came from  Smiley

BTCitcoin: An Idea Worth Saving - Q&A with bitcoins on rugatu.com - Check my rep
dserrano5
Legendary
*
Offline Offline

Activity: 1974
Merit: 1029



View Profile
November 09, 2012, 05:27:37 PM
 #75

awesome! where did that come from?

This may be relevant.
molecular
Donator
Legendary
*
Offline Offline

Activity: 2772
Merit: 1019



View Profile
November 09, 2012, 05:42:29 PM
 #76

awesome! where did that come from?

This may be relevant.

thanks, it is.

PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0  3F39 FC49 2362 F9B7 0769
dooglus
Legendary
*
Offline Offline

Activity: 2940
Merit: 1330



View Profile
January 14, 2016, 06:03:50 PM
 #77

Sorry for the necro-post, but reddit is talking about this thread, and nobody in this thread seems to be close to the truth...

Given your example of 1 billion users at 10 addresses each:

There are 2^160  possible addresses
In your scenario, 1,000,000,000 people are using 10 addresses each for a total of 10,000,000,000 possible addresses
10,000,000,000 / 2^160 should yield the probability of a collision occurring

This is wrong. It fails to take into account the birthday problem.

When there are 10^10 addresses, there are roughly (10^20)/2 pairs of addresses.

Consider when there are 5 addresses, A through E.

To check for a collision, you need to compare AB, AC, AD, AE, BC, BD, BE, CD, CE, DE - that's 10 pairs of addresses (5*4)/2, or roughly (5^2)/2.

So your answer is off by a factor of roughly 5 billion.

Since there are 2^160 possible addresses, we need around 2^80 of them to have a 50% chance of a collision.

http://diyhpl.us/~bryan/papers2/bitcoin/bitcoin-birthday.pdf does a better job of approximation, but comes up with a similar answer.

Comparatively speaking, your odds of being struck by lightning in a given calendar year are about 1 in 280,000. The odds of winning my local lottery are about 1 in 176,000,000. So finding a collision on your first try is roughly equivalent to being hit by lightning 16,540,000,000,000,000,000,000,000 times per second for an entire year

No. You can say that the odds of being hit by lightning are 16,540,000,000,000,000,000,000,000 times higher than of finding a collision, but your statement isn't true.

A simpler example that we can picture more easily than all those zeroes:

 * I have a 1 in 2 chance of coin coming up tails.
 * I have a 1 in 20 chance of rolling a 6 on a 20 sided die.
 * so tossing "tails" is 10 times more likely than rolling a 6.

From this, using your logic, I am just as likely to toss "tails" 10 times in a row as I am to roll a 6.

But we can see that this isn't true. Tossing "tails" 10 times in a row is a 1 in 1024 event. Rolling a 6 is still only 1 in 20.

Just-Dice                 ██             
          ██████████         
      ██████████████████     
  ██████████████████████████ 
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
    ██████████████████████   
        ██████████████       
            ██████           
   Play or Invest                 ██             
          ██████████         
      ██████████████████     
  ██████████████████████████ 
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
    ██████████████████████   
        ██████████████       
            ██████           
   1% House Edge
rubygon
Newbie
*
Offline Offline

Activity: 40
Merit: 0


View Profile
January 14, 2016, 06:10:43 PM
 #78

Address collision won't occur. It will be a billionth of billionth of a billionth chance, that an address may collide. Further, the address is backed by public key and private keys. Those keys must be different even if an address collide with another. No need to worry or think about the collision problem. The ECD curve is much larger than the scope we're imagining.
onlinn
Member
**
Offline Offline

Activity: 65
Merit: 10


View Profile
January 15, 2016, 05:10:31 PM
 #79

Since Bitcoin addresses are basically random numbers, it is possible, although extremely unlikely, for two people to independently generate the same address. This is called a collision. If this happens, then both the original owner of the address and the colliding owner could spend money sent to that address. It would not be possible for the colliding person to spend the original owner's entire wallet (or vice versa). If you were to intentionally try to make a collision, it would currently take 2^107 times longer to generate a colliding Bitcoin address than to generate a block. As long as the signing and hashing algorithms remain cryptographically strong, it will likely always be more profitable to collect generations and transaction fees than to try to create collisions.

It is more likely that the Earth is destroyed in the next 5 seconds, than that a collision occur in the next millenium.
dooglus
Legendary
*
Offline Offline

Activity: 2940
Merit: 1330



View Profile
January 16, 2016, 12:41:19 PM
 #80

Address collision won't occur. It will be a billionth of billionth of a billionth chance, that an address may collide.

The chance depends on how many addresses there are.

Further, the address is backed by public key and private keys. Those keys must be different even if an address collide with another. No need to worry or think about the collision problem. The ECD curve is much larger than the scope we're imagining.

The ECD curve doesn't matter. We use 160 bit addresses, and that's the space we're looking for collisions in. If two different privkeys give the same address they can still spend each other's funds, since we pay to addresses, not to privkeys or pubkeys.

Just-Dice                 ██             
          ██████████         
      ██████████████████     
  ██████████████████████████ 
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
    ██████████████████████   
        ██████████████       
            ██████           
   Play or Invest                 ██             
          ██████████         
      ██████████████████     
  ██████████████████████████ 
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
    ██████████████████████   
        ██████████████       
            ██████           
   1% House Edge
Pages: « 1 2 3 [4] 5 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!