Is SHA1 dead?
There have been studies over the past years over the SHA1 hash algorithm, probably the most scrutinized hash algorithm in use. Many studies have come to the conclusion that SHA1 is flawed because it produces
hash collisions.
A hash collision is where a hash algorithm takes two different inputs and produces two identical hashes. Studies have shown that using a brute force attack on SHA1, a hash collision could be produced in 2
80
operations, and a small as 2
63
operations.
Let's look at what a hash is. A hash is a mathematical function that takes an infinitely large input of data, and produces a finite size output. So with that idea in mind, a hash algorithm
will always have collisions
. Hashing is based on mathematical improbability. Even SHA-2 algorithms, such as SHA512, are
possible
to produce collisions. However the required operations needed for a collision is far higher than that of SHA1.
Does that make SHA1 dead?
The answer is no. SHA1 will always have its practical uses, and will remain an industry standard for many more years to come. SHA1, even has some advantages over SHA-2 algorithms. How is SHA1 still useful? Well a prime example is storing passwords. The average password is probably no more than 8 characters. And using SHA1, it is impossible to produce a hash collision using a password. Even a 1,000 character password of any variation would not produce a collision. How many people do you know have a 1,000 character password, or even 50? SHA1 also produces a smaller hash, so why store a hashed password that is bigger than it has to be? For all intents and purposes, SHA1 is still an acceptable, and useful algorithm in certain situations.