Is there an example of two known strings which have the same hash (MD5) value, i.e. an MD5 collision?
|
migrated from stackoverflow.com Dec 11 '11 at 14:22
|
The table linked to on the site below lists a set of 20 MD5 collisions, providing both messages and their common MD5 value. http://www2.mat.dtu.dk/people/S.Thomsen/wangmd5/samples.html |
|||||
|
|
Here are some other interesting examples. One of them is, two downloadable executables that have the same MD5 hash, but are actually different, and produce different (safe) results when run! So much for using MD5 hashes to ensure download file integrity :-( |
|||
|
|
|
A new result shows how to generate single block MD5 collisions, including an example collision:
There is an earlier example of a single block collision but not technique for generating it was published. |
|||
|
|
MD5 was intended to be a cryptographic hash function, and one of the useful properties for such a function is its collision-resistance. Ideally, it should take work comparable to around $2^{64}$ tries (as the output size is $128$ bits, i.e. there are $2^{128}$ different possible values) to find a collision (two different inputs hashing to the same output). (Actually, brute-forcing this is today almost in the range of possible, so this alone would be a reason not to use any small-output hash function like MD5.) It showed that MD5 is not that resistant as intended, and nowadays it is relatively easy to produce more collisions, even with an arbitrary common prefix and suffix. There was a spectacular example, when someone used an MD5 collision to get a fake SSL certificate from a certification agency. The agency signed a certificate for a domain which belonged to the attacker, and the attacker produced a different certificate (for another domain) with the same hash, i.e. for which the same signature was valid. Don't use MD5 for any application which relies on collision-resistance (like signatures) ... or for any new application at all. Use SHA-2 now. |
|||
|
|
|
Yes you can, see here Quote:
|
|||
|
|