aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: can two users/files have the same hash by chance ?  (Read 2013 times)

Arichy

  • Full Member
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 224
can two users/files have the same hash by chance ?
« 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?
Logged
Gentoo i686

lionel77

  • Provider of Mac builds, Forum Mod
  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 1107
  • Mac OS X 10.4 (Power Mac G5)
Re: can two users/files have the same hash by chance ?
« Reply #1 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. ;)
Logged
Current aMule CVS builds for OS X can be found here.

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: can two users/files have the same hash by chance ?
« Reply #2 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.
Logged