rolling-hash · shipping · also rolling fingerprint

Rolling hash

A rolling hash updates a fingerprint incrementally as the input window or stream advances, instead of recomputing it over the entire input each time.

Restic's chunker uses Rabin fingerprints for boundary selection. Such a boundary fingerprint is not a cryptographic identifier of the complete chunk; content identity needs a separate check. [1]

Gear fingerprints illustrate why an advancing stream need not supply independent boundary trials. In the pinned right-shift FastCDC experiment, repeating one byte drives the state toward an odd fixed point; both low-bit zero masks then fail. A transient match explains the 0x5D exception. This behavior belongs to the tested recurrence, table and masks, not to every rolling hash. [3]

Rsync uses a rolling checksum to search for fixed-length basis blocks at arbitrary source offsets, not to choose content-defined boundaries. Its original recurrence uses modulus 65536 and is Adler-32-inspired, rather than identical to Adler-32. A candidate checksum match requires a separate content check. [4]

Relations

related
Content-defined chunking, FastCDC, Data deduplication, Gear hash, Delta synchronization

Citations

  1. Restic project. Chunker: Rabin-based content-defined chunking implementation and explanation. (accessed 2026-10-12)
  2. Hesela. Exhaustive constant-byte FastCDC experiment: pinned 1.7.0 Python API, source hashes, exact reconstruction and independent recurrence checks. (accessed 2026-10-20)
  3. Tridgell and Mackerras. The rsync algorithm: rolling checksum, 1996. (accessed 2026-10-20)

Further reading

  1. Content-defined chunking: boundaries are not identity (accessed 2026-10-12)

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

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. Rolling hash. Hesela. 2026-10-20. https://hesela.dev/terms/rolling-hash/