Use this when SHA-1 appears in certificates, signatures or protocols.
SHA-1
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.
SHA-1 → collisions feasible
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
openssl x509 -in cert.pem -noout -text | grep 'Signature Algorithm'Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
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 · 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.
- Collisions shown in practice.
- Deprecated for signatures.
- Still in legacy systems.
openssl x509 -in cert.pem -noout -text | grep 'Signature Algorithm'— sha1WithRSA?nmap --script ssl-enum-ciphers -p 443 <host> | grep -i sha1— legacy suitesgit 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:
| Use | Action |
|---|---|
| Certificates and code signing | Replaced by SHA-256 — reject SHA-1 signatures |
| Git object IDs | Git 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.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
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%