Skip to content
NOUMENResearch
Network
Engineering
, home page

IntelligenceAlgorithmssha-1

SHA-1

A 160-bit hash from FIPS 180-4, still found in Git object ids, old certificates and HMAC-SHA1. Collisions for SHA-1 have been found with classical computers (first published in 2017), and NIST says it should be phased out by 31 December 2030. Grover's search would roughly halve its effective security, so 256-bit outputs stay adequate, which SHA-1 does not have.

In short

What a quantum computer changes.

Quantum effect
Weakened by Grover's search
Family
HashRests on hash function security.
What it means
Grover's algorithm searches an unstructured space in roughly the square root of the usual number of steps. Against a symmetric key or a hash preimage, that roughly halves the effective security in bits: a 128-bit key gives about 64 bits of security against it. In practice the answer is size, not replacement. Keys and outputs of 256 bits stay adequate. Grover's search also needs a long, sequential run on a fault-tolerant machine and does not split well across many machines, so the effect is a smaller margin, not a break.

This describes the family, not any project that uses it.

21 in the catalogue

Packages that provide it

Packages that provide SHA-1
PackageProvides
@noble/hashesnpmPure TypeScript hash, MAC and KDF library: SHA-1, SHA-2, SHA-3 and Keccak, BLAKE2 and BLAKE3, RIPEMD-160, HMAC, HKDF, PBKDF2, scrypt and Argon2.
hash-wasmnpmHash and password-hashing functions compiled to WebAssembly, including SHA-1, SHA-2, SHA-3, Keccak, BLAKE2, BLAKE3, RIPEMD-160, HMAC, PBKDF2, scrypt, bcrypt and Argon2.
hash.jsnpmPure JavaScript SHA-1, SHA-2 and RIPEMD-160 hashes with HMAC, for Node.js and browsers.
sha.jsnpmPure JavaScript SHA-0, SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512 with a Node-style streaming interface.
crypto-jsnpmPure JavaScript library of hashes, HMAC, PBKDF2 and ciphers: MD5, SHA-1, SHA-2, a Keccak function it calls SHA3, RIPEMD-160, AES, TripleDES, RC4 and Rabbit.
node-forgenpmPure JavaScript cryptography and PKI toolkit: RSA signing and encryption, Ed25519, AES (including GCM), DES and RC2, SHA-1, SHA-2, MD5, HMAC, PBKDF2, a Fortuna-based random generator, X.509, PKCS formats and a TLS implementation.
jsrsasignnpmPure JavaScript library for RSA, RSA-PSS, ECDSA and DSA signatures, hashes and HMAC, PKCS key formats, X.509 certificates, CRL, OCSP, CMS and JWS/JWT.
@peculiar/webcryptonpmWebCrypto API implementation for Node.js on top of the built-in crypto module, adding curves such as secp256k1, brainpool, Ed448 and X448 and non-standard mechanisms such as DES and RSAES-PKCS1-v1_5.
crypto-browserifynpmBrowser port of the Node.js crypto module that re-exports the browserify packages for hashes, HMAC, PBKDF2, AES, Diffie-Hellman, ECDH, RSA and ECDSA signing and RSA encryption.
create-hashnpmNode-style createHash for browsers that dispatches to sha.js, ripemd160 and md5.js, and to the built-in crypto module in Node.js.
ringcrates.ioCryptographic library largely derived from BoringSSL, offering ECDSA P-256 and P-384, Ed25519, RSA signatures, X25519 and ECDH, AES-GCM, ChaCha20-Poly1305, SHA-1 and SHA-2, HMAC, HKDF, PBKDF2 and a system random generator.
aws-lc-rscrates.ioring-compatible Rust API over the AWS-LC C library, adding ML-KEM, ML-DSA, RSA encryption, raw AES modes and an optional FIPS build.
aws-lc-syscrates.ioLow-level generated FFI bindings to the AWS-LC C cryptography library, which aws-lc-rs wraps.
opensslcrates.ioRust bindings to OpenSSL covering TLS, X.509, RSA, DSA, Diffie-Hellman, elliptic curve and Edwards curve keys, symmetric ciphers, hashes, MACs and key derivation.
openssl-syscrates.ioRaw FFI declarations for the OpenSSL C library, used by the openssl crate.
boringcrates.ioRust bindings to BoringSSL with TLS support, RSA, DSA, Diffie-Hellman, ECDSA and ECDH, Ed25519 and X25519, ML-KEM, ML-DSA, HPKE, AEAD ciphers, hashes, HMAC and key derivation.
mbedtlscrates.ioRust wrapper for Mbed TLS covering TLS, X.509, RSA, ECDSA, ECDH, Diffie-Hellman, AES and ChaCha20-Poly1305, hashes, HMAC, HKDF, PBKDF2 and DRBG random generators.
botancrates.ioRust wrapper for the Botan C++ library, exposing ciphers, hashes, MACs, KDFs, password hashing, random generators, X.509 and classical and post-quantum public key algorithms.
sha1crates.ioPure Rust SHA-1 hash function.
sequoia-openpgpcrates.ioOpenPGP (RFC 9580 and RFC 4880) implementation with RSA, DSA, ECDSA, ECDH, EdDSA, X25519 and X448 keys, post-quantum ML-KEM, ML-DSA and SLH-DSA algorithms, AES and SHA-1, SHA-2 and SHA-3 hashes.
bitcoin_hashescrates.ioThe hash functions used by rust-bitcoin: SHA-1, SHA-256 (plain, double and tagged), SHA-384, SHA-512, SHA3-256, RIPEMD-160 and HASH160, plus HMAC, HKDF and SipHash.

3 listed

Sources

Full record

Identifier
sha-1
Kind
hash
Family
Hash
Rests on
hash function security
Quantum effect
Weakened by Grover's search

Standards