Skip to content
Vol. 1 · Ed. 2026
CyberGlossary
Entry № 1140

SHA-1

Reviewed byCybersecurity entrepreneur & security researcher

What is SHA-1?

SHA-1A cryptographic hash function producing a 160-bit digest, designed by the NSA in 1995 and now considered broken for collision resistance.


SHA-1 (Secure Hash Algorithm 1) is a Merkle–Damgård hash function that compresses an arbitrary-length input into a 160-bit (20-byte) digest. It processes the message in 512-bit blocks through 80 rounds, and was published by NIST in FIPS 180-1 (1995) as a successor to the flawed SHA-0. For two decades it underpinned TLS certificates, Git object IDs, digital signatures, and HMAC.

Collision resistance collapsed in stages. In February 2017 Google and CWI Amsterdam's SHAttered attack produced the first practical collision (two PDFs with the same digest) at roughly 2⁶³ operations. In January 2020 Gaëtan Leurent and Thomas Peyrin's SHAmbles attack (USENIX Security 2020) demonstrated the first chosen-prefix collision — far more dangerous, because it lets an attacker craft two meaningful documents — forging a colliding pair of PGP keys for about US$45k of rented GPU time (roughly US$75k actual spend, two months on 900 GTX 1060 GPUs).

Because a chosen-prefix collision can forge certificates and signatures, SHA-1 must not be used for any collision-sensitive purpose. The CA/Browser Forum and major browsers stopped trusting SHA-1 TLS certificates in 2016–2017, and NIST announced in December 2022 that it will retire SHA-1 across all its applications by 31 December 2030 (per SP 800-131A). Use SHA-256, SHA-3, or BLAKE2 instead; SHA-1 survives only inside legacy HMAC, where collision resistance is not required.

flowchart TD
  A[Arbitrary-length message] --> B[Pad to 512-bit blocks]
  B --> C[80-round compression<br/>160-bit state]
  C --> D[160-bit digest]
  D --> E{Collision resistant?}
  E -->|SHAttered 2017<br/>identical-prefix ~2^63| F[Broken]
  E -->|SHAmbles 2020<br/>chosen-prefix ~$45k| F
  F --> G[Forged certs & signatures possible]
  G --> H[Migrate to SHA-256 / SHA-3 / BLAKE2]

● Examples

  1. 01

    Git uses SHA-1 to identify commits and objects (with a transition to SHA-256 underway).

  2. 02

    Older X.509 certificates signed with SHA-1, deprecated by browsers since 2017.

● Frequently asked questions

What is SHA-1?

A cryptographic hash function producing a 160-bit digest, designed by the NSA in 1995 and now considered broken for collision resistance. It belongs to the Cryptography category of cybersecurity.

What does SHA-1 mean?

A cryptographic hash function producing a 160-bit digest, designed by the NSA in 1995 and now considered broken for collision resistance.

How do you defend against SHA-1?

Defences for SHA-1 typically combine technical controls and operational practices, as detailed in the full definition above.

What are other names for SHA-1?

Common alternative names include: Secure Hash Algorithm 1, FIPS 180-1.

● Related terms

● See also