SHA-1
More info
- Type
- Hash function
- Released
- 1995
- Output
- 160 bits
- Spec
- FIPS 180-4
- Status
- Deprecated
The hash function the whole internet rested on for twenty years, and which took another twelve to retire after it was demonstrably broken.
Designed by the NSA and published in 1995 as a replacement for SHA-0, which had been withdrawn after two years with no official explanation. The output is 160 bits, which by the birthday bound gives 80 bits of collision resistance — marginal even at the time.
Xiaoyun Wang demonstrated a theoretical attack around 2⁶⁹ operations in 2005. Practical proof waited until 2017, when Google and CWI produced two PDF files with identical hashes in the SHAttered project. Chosen-prefix collisions followed in 2020, making real signature forgery possible. Git still uses SHA-1 for object IDs, with collision detection bolted on while the migration to SHA-256 proceeds.