Main

March 09, 2004

Cryptography, Collision example for SHA1

I found myself wondering today, exactly how good is SHA1? It is the accepted standard for cryptographically strong hash functions but exactly how rare are random collisions on ordinary file systems?

In One-Way and Collision-Resistant Functions, 2004-01-07, UCSD CSE 107, by Mihir Bellare, I found the statement that “nobody has yet found (meaning, explicitly presented) a collision for SHA1.”

Wow. That’s an amazing hash function.

To see if I believe that, consider all 21 byte files. There have to be at least 256 SHA1 hash collisions to be found (since SHA1 is 20 bytes). An exhaustive, brute force approach would have to examine around 1.5 x 10+48 files to get in the ballpark. That’s a trillion, trillion, trillion, trillion cases. Hmmm…. Okay. It’s possible.