Hash functions: history
From the first cryptographic hash functions to the SHA family, from MD5’s success to collisions, to the competition that produced SHA-3.
Ralph Merkle describes in his thesis a method for building hash functions from compression functions; Ivan Damgård proves its properties in 1989.
Ron Rivest publishes MD4 and then MD5, which for years becomes the most used hash function.
The NSA designs SHA-0 and, after a correction, SHA-1, standardised by NIST.
The SHA-2 family, including SHA-256 and SHA-512, is published.
Xiaoyun Wang and colleagues present collisions for MD5 and other functions: the end of MD5 as a secure function.
NIST runs a public competition for a new standard; Keccak wins.
The SHA-3 standard is published.
Researchers from Google and CWI Amsterdam publish the first practical SHA-1 collision, called SHAttered.
Why a competition for SHA-3 too
SHA-2 had not been broken, but it shared the architecture of MD5 and SHA-1. NIST wanted a structurally different alternative ready in case the attacks were extended. SHA-3 does not replace SHA-2: it stands beside it as a solid reserve.
Hash functions: the maths
The birthday paradox and why security against collisions is half the length of the value, with the pigeonhole principle.
The pages of this topic
Back to the overviewHash functions: how they work
How a hash function compresses data of any length into a fixed value: blocks, internal state, the Merkle-Damgård construction and the sponge construction.
Hash functions: worked example
SHA-256 values of similar words and phrases, to see the avalanche effect, and the official test vectors.
Hash functions: weaknesses and attacks
MD5 and SHA-1 collisions, chosen-prefix attacks, length extension and precomputed tables for passwords.
Hash functions today
Where hash functions are used every day: digital signatures, certificates, downloads, passwords, blockchain, version control and digital evidence.
Hash functions: try it yourself
Hands-on exercises to compute hash values, observe the avalanche effect and estimate the birthday paradox.
Hash functions: frequently asked questions
Short answers to the most common doubts about cryptographic hash functions.