{
  "slug": "rolling-hash",
  "term": "Rolling hash",
  "aliases": [
    "rolling fingerprint"
  ],
  "definition": "A rolling hash updates a fingerprint incrementally as the input window or stream advances, instead of recomputing it over the entire input each time.",
  "note": "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. [restic-chunker]\n\nGear 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. [repeated-study]\n\nRsync 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. [rsync-rolling]",
  "related": [
    "content-defined-chunking",
    "fastcdc",
    "deduplication",
    "gear-hash",
    "delta-synchronization"
  ],
  "citations": [
    {
      "id": "restic-chunker",
      "title": "Restic project. Chunker: Rabin-based content-defined chunking implementation and explanation.",
      "url": "https://github.com/restic/chunker",
      "accessed": "2026-10-12"
    },
    {
      "id": "hesela-cdc",
      "title": "Content-defined chunking: boundaries are not identity",
      "url": "https://hesela.com/analyses/content-defined-chunking-boundaries/",
      "accessed": "2026-10-12"
    },
    {
      "id": "repeated-study",
      "title": "Hesela. Exhaustive constant-byte FastCDC experiment: pinned 1.7.0 Python API, source hashes, exact reconstruction and independent recurrence checks.",
      "url": "https://hesela.dev/research/gear-repeated/results.json",
      "accessed": "2026-10-20"
    },
    {
      "id": "rsync-rolling",
      "title": "Tridgell and Mackerras. The rsync algorithm: rolling checksum, 1996.",
      "url": "https://rsync.samba.org/tech_report/node3.html",
      "accessed": "2026-10-20"
    }
  ],
  "status": "shipping",
  "advantages": [],
  "limitations": [],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-20"
}
