SHA-1
SHA-1 is a cryptographic hash function designed by the United States National Security Agency that produces a 160-bit hash value. It was widely used for object identification in systems such as Git. In 2017, the SHAttered attack demonstrated that its collision resistance had been practically broken.
Core Facts
Git uses the SHA-1 hashing algorithm to generate a unique fingerprint for each file to achieve version storage.
k-anonymity technology hashes the user's password with SHA-1 and sends only the first 5 characters of the hash to the server for prefix matching, with the client performing the full comparison locally, thereby not exposing the actual password or the complete hash.
Git uses the SHA-1 hash function to map input data of arbitrary length to a fixed 160-bit (40 hexadecimal character) hash value as the object identifier.
Timeline (last 90 days)
Historical lessons show that when MD5, SHA-1, or RC4 were deprecated, systems lacking cryptographic agility paid high migration costs.
Historically, the collision attacks on MD5 and SHA-1 were a gradual breakdown at the algorithm level, but their impact was confined to hash functions.
Historical experience from migrating SHA-1 to SHA-2 and RSA to ECDSA shows that migrating systems lacking agility is extremely costly and often takes years.
Ecosystem-level cryptographic migrations (such as SHA-1 retirement and TLS 1.0 phase-out) are measured in decades.
Historically, migrations from DES to AES and from SHA-1 to SHA-256 were delayed for years because systems lacked cryptographic agility.
Only 40-character (SHA-1) or 64-character (SHA-256) commit hashes are content-addressed, and any rewriting of history changes the hash, thereby providing cryptographic immutability.
The b coefficient of each NIST curve is obtained by taking the SHA-1 of a 20-byte seed; the seeds were provided by the NSA and their origin has never been publicly explained.
The verifiable random generation process requires first selecting a public seed string, then repeatedly applying hash functions such as SHA-1 to map the output to curve parameters, so that anyone can rerun the verification with the same seed and algorithm.
From the public demonstration of the SHA-1 collision attack to the full deprecation of SHA-1 by mainstream browsers and CAs took nearly ten years.
A reasonable Git hash migration path would be to keep SHA-1 as the default until hosting platforms and mainstream toolchains broadly support SHA-256, and to provide a smooth conversion mechanism for migrating repositories between the two algorithms
6 more timeline events
All Facts (20)
Git uses the SHA-1 hashing algorithm to generate a unique fingerprint for each file to achieve version storage.
70%Verifiedk-anonymity technology hashes the user's password with SHA-1 and sends only the first 5 characters of the hash to the server for prefix matching, with the client performing the full comparison locally, thereby not exposing the actual password or the complete hash.
65%VerifiedGit uses the SHA-1 hash function to map input data of arbitrary length to a fixed 160-bit (40 hexadecimal character) hash value as the object identifier.
65%VerifiedSHA-1 (Secure Hash Algorithm 1) was designed by the U.S. National Security Agency and outputs a fixed 160-bit (40 hexadecimal characters) hash value for input data of arbitrary length.
65%Unverified网站魔改SHA-1的常见手法包括多轮迭代、截取部分结果、拼接固定盐值和修改初始化向量
85%UnverifiedHistorical lessons show that when MD5, SHA-1, or RC4 were deprecated, systems lacking cryptographic agility paid high migration costs.
50%UnverifiedHistorically, the collision attacks on MD5 and SHA-1 were a gradual breakdown at the algorithm level, but their impact was confined to hash functions.
50%UnverifiedHistorical experience from migrating SHA-1 to SHA-2 and RSA to ECDSA shows that migrating systems lacking agility is extremely costly and often takes years.
50%UnverifiedEcosystem-level cryptographic migrations (such as SHA-1 retirement and TLS 1.0 phase-out) are measured in decades.
50%UnverifiedHistorically, migrations from DES to AES and from SHA-1 to SHA-256 were delayed for years because systems lacked cryptographic agility.
50%UnverifiedOnly 40-character (SHA-1) or 64-character (SHA-256) commit hashes are content-addressed, and any rewriting of history changes the hash, thereby providing cryptographic immutability.
50%UnverifiedThe b coefficient of each NIST curve is obtained by taking the SHA-1 of a 20-byte seed; the seeds were provided by the NSA and their origin has never been publicly explained.
50%UnverifiedThe verifiable random generation process requires first selecting a public seed string, then repeatedly applying hash functions such as SHA-1 to map the output to curve parameters, so that anyone can rerun the verification with the same seed and algorithm.
50%UnverifiedFrom the public demonstration of the SHA-1 collision attack to the full deprecation of SHA-1 by mainstream browsers and CAs took nearly ten years.
50%UnverifiedSHA-1 was designed by the National Security Agency and produces a 160-bit (40 hexadecimal character) hash value
50%UnverifiedStarting from version 2.13, Git introduced SHA-1 collision detection based on Marc Stevens' algorithm, capable of detecting SHAttered-type attacks
50%UnverifiedA large number of third-party tools, CI/CD pipelines, IDE plugins, and automation scripts have hardcoded assumptions about 40-character SHA-1 hashes, and SHA-256's 64-character hashes will break these toolchains
50%UnverifiedA reasonable Git hash migration path would be to keep SHA-1 as the default until hosting platforms and mainstream toolchains broadly support SHA-256, and to provide a smooth conversion mechanism for migrating repositories between the two algorithms
50%UnverifiedEarly v2 hidden service addresses were only 16 characters long, generated based on RSA-1024 keys and SHA-1 hashing.
50%UnverifiediPhone backup filenames are SHA-1 hashes of the original path strings, distributed across 256 subdirectories based on the first two characters of the hash.
50%