Help - Search - Members - Calendar
Full Version: Would any hash always match two WMA's of same size?
Hydrogenaudio Forums > Hydrogenaudio Forum > Scientific Discussion
moonshot
Are there any hash checks (such as MD5, CRC32, etc) which would always match two WMA files of the same length irrespective of the actual content of the two files?

So, one WMA might contain Beethoven and the other Mozart. Both are the same size. Is there a (poor) hash check that would consider them to be the same?

I ask this because I am about to weed out my duplicates but I would be mortified if I deleted files which were not duplicated!

---

I ask about WMA above but that is just as an example. Presumably the answer is yes or no irrespective of the type of format which the audio data is stored in (eg MP3, WAV, etc).

Thank you for any info.
Shade[ST]
The answer is no. Collisions on the worst hashing algorithm (CRC32) is less than one in over a billion.
PiezoTransducer
awww, do we have to call it the worst? how about most efficient? or most collidaltastic? or best dressed 32nd order polynomial?

oh, uhmm... what i do is when i use CRC32, i also compare file size. with md5 i don't bother checking file size. i don't use other hashes to "catalog" stuffz. the fantastic thing about hashes is that miniscule changes of content create drastic changes in the hash.
SebastianG
The expected number N of hash codes to generate until you get a collision (anywhere) is approximately 2^(bit_length/2). (google for "birthday paradox"). So, for CRC32 this would translate to approximately 65000 different files assuming iid distributed 32 bit checksums. (=> CRC32 checksums shouldn't be used to index files. Their purpose is to be able to detect errors produced by non-intelligent attackers)

Thyt's why cryptographers like to think that the safety of a 128 bit cryptographic hash is similar to a symmetric encryption scheme using 64 bit keys. (This is true for certain kinds of attacks like the "birthday attack")

S.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.