aMule Forum

English => aMule Help => Topic started by: Arichy on December 04, 2005, 06:30:23 PM

Title: can two users/files have the same hash by chance ?
Post by: Arichy on December 04, 2005, 06:30:23 PM
Can there be the case that two different users or files have the same ed2k-(md4)-hash by chance ?

What would happen in such a case?
Title: Re: can two users/files have the same hash by chance ?
Post by: lionel77 on December 05, 2005, 01:48:56 AM
Only in theory.
An md4 hash consists of 32 characters/letters with 26 (a-z) plus 10 (0-9) equals 36 possibilities for each position. So the chance that two randomly generated md4s are identical is 1 : 36 raised to the power of 32. Or in other words 1 divided by about 63,340,286,663,000,000,000,000,000,000,000,000,000,000,000,000,000 -- not very likely. ;)

And this is not even taking into account that files are also distinguished by their file sizes.

However, since the md4 algorithm has been broken, someone could in principle create an alternate file that has the same md4 and the same size as your file, but a different content. But since *mule also uses advanced hashing techniques (AICH) in addition to just the md4 from the ed2k link, such a collision would only cause limited damage.

Gotta run for dinner now. ;)
Title: Re: can two users/files have the same hash by chance ?
Post by: Kry on December 05, 2005, 03:37:14 AM
I ahve seen files with different sizes have same md4 hash. that's why the protocol was changed to include file size on sources ask.