Pcornel
Browse topics
Options
Recent
Favorites
Security · Technical reference

SHA-1

Direct answer

SHA-1 produces a 160-bit hash. Practical collisions have been shown, so it is deprecated for certificates and signatures, though it still appears in legacy systems and Git.

When to use this

Use this when SHA-1 appears in certificates, signatures or protocols.

First 30 seconds

1. SHA-1 is broken for collisions (SHAttered, chosen-prefix).

2. Not for signatures/certificates.

3. HMAC-SHA1 is still OK but phase out.

4. Git migrating to SHA-256.

5. Find and replace uses.

Operational verification

SHA-1 → collisions feasible

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Cryptography, PKI and secrets
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformCryptography, PKI and secrets
Key commandopenssl x509 -in cert.pem -noout -text | grep 'Signature Algorithm'
Scope / prerequisiteUse this when SHA-1 appears in certificates, signatures or protocols.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Finding SHA-1 use Verify boundary
openssl x509 -in cert.pem -noout -text | grep 'Signature Algorithm'
nmap --script ssl-enum-ciphers -p 443 host     # cipher suites with SHA (HMAC-SHA1) are still OK in TLS 1.2
certutil -store My | findstr /i "sha1"

Replace certificates signed with sha1WithRSAEncryption. HMAC-SHA1 in TLS 1.2 suites is not yet broken but should be phased out.

Step 2 Common mistakes Narrow the fault
  • Using SHA-1 for signatures or certificates.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Collisions shown in practice.
  • Deprecated for signatures.
  • Still in legacy systems.
Key checks
  • openssl x509 -in cert.pem -noout -text | grep 'Signature Algorithm' — sha1WithRSA?
  • nmap --script ssl-enum-ciphers -p 443 <host> | grep -i sha1 — legacy suites
  • git config core.hashAlgorithm — git object format
ReferenceWhy it matters1 section · depth on demand

Status

  • Practical collisions since 2017 (SHAttered) and chosen-prefix collisions since 2020.
  • Browsers and CAs no longer accept SHA-1 certificates; code signing moved to SHA-256.
  • HMAC-SHA-1 is still not broken for message authentication but should be replaced in new designs.

Find it in configurations: IPsec integrity, SSH MACs (hmac-sha1), SNMPv3 auth and old certificates (openssl x509 -noout -text | grep Signature).

ReferenceImportant terms & boundaries2 sections · depth on demand

In depth

SHA-1 produces a 160-bit digest and is broken for collision resistance: practical collisions were demonstrated in 2017 (SHAttered) and chosen-prefix collisions in 2020. It must not be used for digital signatures, certificates or anything relying on collision resistance.

Where SHA-1 still appears and what to do:

UseAction
Certificates and code signingReplaced by SHA-256 — reject SHA-1 signatures
Git object IDsGit uses hardened SHA-1 with collision detection; SHA-256 repositories available
HMAC-SHA1 (IPsec, TOTP)Not directly broken, but migrate to SHA-256 where possible
Legacy protocols (SSH, TLS)Disable SHA-1 based algorithms

NIST plans to retire SHA-1 completely by 2030; inventory remaining uses now.

Where SHA-1 still appears

  • Git object IDs (migrating to SHA-256; Git uses collision detection).
  • HMAC-SHA1 in old VPNs and TOTP (HMAC is still not broken, but migrate).
  • Old certificates and code signatures — browsers rejected SHA-1 certificates in 2017.

The SHAttered (2017) and Shambles (2020) attacks produced practical collisions.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docCryptography, PKI and secrets current

Authoritative/upstream documentation reviewed for bounded claims in Hashing → SHA-1. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://csrc.nist.gov/pubs/fips/180-4/upd1/final · confidence 94%
Confirmation

Confirm action

Continue?