Author

Topic: Address collision (Read 748 times)

legendary
Activity: 2646
Merit: 1137
All paid signature campaigns should be banned.
June 27, 2013, 07:26:00 AM
#15
For completeness of my previous post the actual number of possible key pairs is just a tad less than 2^256. it is:

p = FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE FFFFFC2F

    = 2^256 − 2^32 − 2^9 − 2^8 − 2^7 − 2^6 − 2^4 − 1

( Just bumping my post count to try and stay ahead of Joel Wink )
legendary
Activity: 1596
Merit: 1012
Democracy is vulnerable to a 51% attack.
June 27, 2013, 01:21:40 AM
#14
Is this correct that after such a Collision the Encryption will be useless ?
No. What would make Bitcoin's implementation useless would be if someone could produce a private key whose public key hashes to a given address. There are many compromises less than that which would not threaten Bitcoin at all. For example, if an attacker could produce two private keys that both yield the same address, that would be a collision, but it wouldn't provide him any useful attack.

I suspect the reason Satoshi decided to use both SHA256 and RIPEMD-160 is that he feared that he could not be absolutely certain there might not be some weakness from the way ECDSA and RIPEMD-160 might interact that might permit a collision exploit, but the idea that there could be some exploitable interaction in ECDSA->SHA256->MD160 seemed rather absurd.
newbie
Activity: 5
Merit: 0
June 26, 2013, 11:25:12 PM
#13
Very unlikely is unlikely enough.
full member
Activity: 159
Merit: 100
June 26, 2013, 10:06:46 PM
#12
Is that an exact number
cp1
hero member
Activity: 616
Merit: 500
Stop using branwallets
June 26, 2013, 10:04:28 PM
#11
This will probably be a problem once 1208925819614629174706176 people start using bitcoin.
full member
Activity: 159
Merit: 100
June 26, 2013, 09:56:07 PM
#10
After a collision, the bitcoins held in that address will be useless (spent).

To put your mind at ease about collisions, brute forcing the private keys of some public address is somewhat like hashing a block and getting 0. The entire bitcoin mining operation up to this point hasn't been able to do this. In fact the smallest hash found led with 16 zeros out of the required 64, so we're still a long way off in terms of collective computing power from brute forcing addresses.
legendary
Activity: 2646
Merit: 1137
All paid signature campaigns should be banned.
June 26, 2013, 08:42:07 PM
#9
2^256 private keys that generate 2^160 public keys
I think you may have meant to say:

2^256 public/private key pairs get mapped onto 2^160 public Bitcoin addresses.

In other words every single Bitcoin address will map to 2^(256-160) = 2^96 different public/private key pairs.

Edit 1:

I forgot that every possible public/private key pair can map to TWO different public addresses (compressed and uncompressed) so the actual answer is

every single Bitcoin address will map to 2(2^(256-160)) = 2(2^96) = 2^97 different public/private key pairs.

Edit 2:

To be even more accurate the private key address space is not the full 2^256 since the private key is taken from a prime finite field, right?  So the actual number of possible public/private key pairs is given by the selected prime finite field.
legendary
Activity: 3472
Merit: 4801
June 26, 2013, 08:17:03 PM
#8
Is this correct that after such a Collision the Encryption will be useless ?

What encryption?

Bitcoin-Qt encrypts the wallet, but that has nothing to do with address collisions.

Bitcoin uses digital signatures and cryptographic hash functions.  Those will all continue to work fine.
newbie
Activity: 5
Merit: 0
June 26, 2013, 04:51:01 AM
#7
Is this correct that after such a Collision the Encryption will be useless ?
legendary
Activity: 1596
Merit: 1012
Democracy is vulnerable to a 51% attack.
June 26, 2013, 03:38:24 AM
#6
I guess it really doesn't matter that much, 1.4x10^48 is still a really really really big number.

but even doing ripemd160($public) . md5($public) would give us the full range.
Using the "full range" doesn't ensure there won't be collisions. The whole point of using 160-bit addresses was to keep them as short as possible while still meeting the security requirements. Increasing the expected time to the first collision from a hundred billion centuries to a trillion centuries isn't worth having all Bitcoin addresses be 80% longer.
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
June 26, 2013, 03:37:49 AM
#5
I guess it really doesn't matter that much, 1.4x10^48 is still a really really really big number.

Indeed it doesn't matter (and note that this question has been answered many, many times before).
full member
Activity: 168
Merit: 100
June 26, 2013, 03:33:31 AM
#4
I guess it really doesn't matter that much, 1.4x10^48 is still a really really really big number.

but even doing ripemd160($public) . md5($public) would give us the full range.
full member
Activity: 168
Merit: 100
June 26, 2013, 03:25:05 AM
#3
2^256 private keys that generate 2^160 public keys

Yup. But the problem is addresses, not public keys - the actual public keys are x and y coords and I don't see a collision problem there.
The problem is we aren't actually using the public keys themselves but a hash of them, a hash that results in guaranteed collisions given enough actual public keys.
rme
hero member
Activity: 756
Merit: 504
June 26, 2013, 03:20:51 AM
#2
2^256 private keys that generate 2^160 public keys
full member
Activity: 168
Merit: 100
June 26, 2013, 03:08:01 AM
#1
I'm asking this in newbie section because I can't be the first.

An ECDSA key is basically a 64 digit hex number (OK, 32 digit base256 but that's semantics)
A ripemd160 is basically a 40 digit hex number

A bitcoin version 1.0 address is basically a ripemd160 with a checksum, base58 encoded.

Um, let me do the math... carry the 3, add the four, yup - there are far more possible private keys than addresses.

I realize the odds are extremely low, but clearly collissions are possible where two different private keys generate the same ripemd160.

Wouldn't it be prudent to go to a version 2.0 address that uses something other than ripemd160 on the public key?? Like maybe a sha512sum ??

Code:
echo -n "test" |sha512sum
ee26b0dd4af7e749aa1a8ee3c10ae9923f618980772e473f8819a5d4940e0db27ac185f8a0e1d5f84f88bc887fd67b143732c304cc5fa9ad8e6f57f50028a8ff

It would result in longer addresses but there wouldn't be guaranteed collissions at some point, even if that point is not likely to happen in our lifetime.

Or am I just missing something?
Jump to: