hash-collision · shipping · also Digest collision

Hash collision

A hash collision occurs when two distinct inputs produce the same hash value under the same function and parameters.

Related Observatory article: Read on hesela.com

A table bucket can collide even when the full hash values differ. Reducing the values modulo the bucket count can merge them. Chained tables compare stored keys to distinguish candidates. This indexing problem differs from an attack on a cryptographic digest. [9]

Hashing identical bytes twice is not a collision. Finding any colliding pair differs from finding a replacement for an already specified original, which is a second-preimage problem. [1] [2]

The ideal collision-resistance strength of an L-bit cryptographic hash is L/2 bits, so SHA-256 offers 128 bits against collisions but 256 bits against preimages, while SHA-1 may fall considerably below its expected 80 bits. Truncating a digest to a shorter length lowers that strength to half the truncated length, which leaves 48 bits for a 96-bit truncated SHA-256 value. [6] [7]

The first published collision for full SHA-1 required work equivalent to 2^63.1 SHA-1 compressions, about 6,500 CPU years and 100 GPU years, and produced two distinct PDF documents with one digest. [8]

Fletcher-4 supplies a concrete non-cryptographic contrast: in a pinned OpenZFS scalar-function study, [0,4,0,4,0] and [1,0,6,0,1] share the result [8,24,52,96], with six changed bits and different SHA-256 file digests. Their signed difference cancels all four position moments. The fixed original reference is not replaced. This is not a cryptographic-hash collision, minimum-distance proof, mounted-pool experiment or measured hardware failure probability. [10] [11]

Relations

related
Checksum, Cryptographic hash function, Merkle tree, Data deduplication, Rateless IBLT, Minimal perfect hash function, Universal hashing, Hash index (PostgreSQL), Birthday bound

Advantages

  • Collision strength is tabulated per approved function, so a digest can be chosen for a target strength, for example 192 bits for SHA-384 and SHA3-384 or 256 bits for SHA-512 and SHA3-512. [7]

Limitations

  • Collision resistance concerns the difficulty of finding colliding inputs, not an assertion that every input has a unique digest. [3]
  • CRC undetected-error probabilities require a stated error model and cannot be treated as universal device failure rates. [4]
  • Digital signatures depend on collision resistance, and SHA-1 was disallowed for signature generation at the end of 2013, with a plan to end its remaining uses published in December 2022. [7]
  • An application that needs a given collision strength from a truncated digest must keep at least twice that many output bits. [6]

Citations

  1. NIST CSRC glossary: collision (accessed 2026-10-12)
  2. NIST CSRC glossary: second preimage resistance (accessed 2026-10-12)
  3. NIST CSRC glossary: cryptographic hash function and security properties (accessed 2026-10-12)
  4. RFC 3385: iSCSI CRC/Checksum Considerations, sections 1-2 and 10 (historical error-model analysis) (accessed 2026-10-12)
  5. Dang. NIST SP 800-107 Revision 1: Recommendation for Applications Using Approved Hash Algorithms (August 2012), sections 4.1-5.1. (accessed 2026-10-23)
  6. NIST CSRC: Hash Functions project page, approved algorithms and security strengths. (accessed 2026-10-23)
  7. Stevens, Bursztein, Karpman, Albertini and Markov. The first collision for full SHA-1. CRYPTO 2017, abstract and section 1. (accessed 2026-10-23)
  8. Thorup. High Speed Hashing for Integers and Strings. arXiv:1504.06804v9 (2020), sections 2, 2.1, 3 and 6. (accessed 2026-11-10)
  9. OpenZFS zfs-2.3.4: pinned scalar Fletcher-4 functions and overflow arithmetic. (accessed 2026-11-15)
  10. Hesela: pinned Fletcher-4 scalar study, exact results, controls and offline replay (synthetic algorithm fixtures). (accessed 2026-11-15)

Further reading

  1. Hesela: Why a valid checksum can still return the wrong data (accessed 2026-10-12)
Sources & caveats
  • sp800-107 is NIST SP 800-107 Revision 1, read in sections 4.1, 4.2 and 5.1 for collision-resistance strength and truncation.
  • nist-hash-functions is the NIST CSRC hash functions project page, read for the security-strength table and SHA-1 transition history.
  • shattered is the 2017 paper on the first full SHA-1 collision, read in the abstract and introduction for the work estimate.
  • nist-collision and nist-second-preimage are glossary entries kept for the distinction between collisions and second preimages.
  • nist-hash and rfc3385 were not re-read and are kept only for the existing limitations.
  • Fletcher-4: nine constructed configurations, pinned scalar functions and a fixed reference. No mounted pool, field-rate estimate or independent peer replication. https://hesela.dev/research/fletcher4/results.json
  • Fletcher-4 source pins, licensing and claim limits: https://hesela.dev/research/fletcher4/sources.json

JSON: /data/terms/hash-collision.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. Hash collision. Hesela. 2026-11-20. https://hesela.dev/terms/hash-collision/