0

I was studying about MD5 collisions and found that collisions were also found in SHA-0.

Now, Is it possible to have MD5 and SHA-0 colliosion in two Strings or Files at once?

Here is an image showing a comparison table which i found while searching: enter image description here

Here, You can see in MD5 & SHA-0, on both possible collisions are found.

Can anyone explain if it is possible to have both collisions at the same?

I have got some example for MD5 Collisions. It would be better if someone can provide an example for MD5 & SHA-0 Collision both at the same?

Pravesh Agrawal
  • 869
  • 1
  • 11
  • 27

1 Answers1

4

Collisions are possible in all hashes, it is a mathematical certainty. The reason it happens is called the Pigeonhole Principle, what it means is you only have X possible values for the hash to have, once you hash X+1 items, you are guaranteed to have a collision because you must have used every hash value at least once making the X+1 item you hash a guaranteed collision.

Now, apply this logic to MD5 and SHA1. Pretend you have a very long hash which is just the MD5 hash (2^128 possible hashes) concatenated on to the SHA1 hash (2^160 possible hashes). You still have only have 2^128 * 2^160 possible hashes, once you hash 2^128 * 2^160 + 1 items you are guaranteed to have a item that had a collision in MD5 and a collision in SHA1 at the same time.

Would such a hash be easily found so that you could do a second-preimage attack so you could replace a existing hashed file with a 2nd one that had a matching hash? No, that attack would likely be unfeasible on the non-government level.

Scott Chamberlain
  • 124,994
  • 33
  • 282
  • 431