Primer 3 of 4 · Deduplication

Every unique piece of data, stored exactly once

Content-defined chunking splits files at points chosen by their contents, not at fixed intervals. When a file is edited, only the chunks around the change are new. Everything else is recognized by its cryptographic fingerprint and reused across versions and across every machine in a group, so far less is uploaded and stored.

FastCDCGear hashHMAC-SHA-256Zstandard
Short IDs for illustration. Real chunk IDs are 256-bit keyed cryptographic fingerprints.
Chunking

Content-defined chunking

Cutting every 1 MiB would be simple, but one inserted byte would shift every block after it, and none would match the previous backup. Instead a rolling hash, a fast fingerprint recalculated as it slides through the data byte by byte, decides where to cut: wherever its chosen bits come out zero. The same content always produces the same cuts, so after an edit the boundaries realign automatically.

FastCDC, a high-speed successor to Rabin

Rabin fingerprinting is the classic rolling hash for this. FastCDC uses a Gear hash instead: one shift, one add and one table lookup per byte. It's much faster and finds boundaries just as reliably.

Normalized chunk sizes

Chunks are at least 256 KiB, about 1 MiB on average, and at most 4 MiB. Normalized chunking pulls sizes toward the average, so tiny or oversized chunks are rare.

Unique boundaries for each group

The group's secret seeds the Gear hash, so chunk boundaries differ from group to group. That makes a known file harder to recognize from its chunk sizes, as an extra layer rather than a primary defence.

Try it

Edit the text, see what's reused

A simplified version of the same algorithm, working on letters instead of megabytes: a Gear rolling hash with a 4-bit mask, and chunks of 8 to 64 characters. Version 1 is already stored. Change version 2 and compare fixed-size blocks with content-defined chunks.

Highlighted text would be stored again. Everything else matches a chunk from version 1.

Fixed 24-character blocks0 of 16 reused · 0% not stored again
Revised minutes, 4 November. Present: Aiko, Ben and Carla. The new office network goes live on the 18th, and every laptop will be linked again before then. Ben will check that last week's backups restore cleanly on a spare machine. Carla is moving the shared drive to the NAS on Friday evening, so expect it to be read-only for two hours. Next meeting: 11 November.
Content-defined chunks12 of 14 reused · 88% not stored again
Revised minutes, 4 November. Present: Aiko, Ben and Carla. The new office network goes live on the 18th, and every laptop will be linked again before then. Ben will check that last week's backups restore cleanly on a spare machine. Carla is moving the shared drive to the NAS on Friday evening, so expect it to be read-only for two hours. Next meeting: 11 November.
Collisions

Four safeguards behind every match

Two chunks are treated as the same data when their fingerprints match. Four independent safeguards make that safe.

  1. 256-bit cryptographic fingerprints

    Each chunk ID is a keyed HMAC-SHA-256 fingerprint. Even across a petabyte of 1 MiB chunks, the chance of two different chunks sharing an ID is less than one in 10⁵⁹.

  2. Re-verified on every restore

    After decrypting and decompressing, the reader recalculates the chunk's fingerprint from its contents and compares it. A chunk holding anything else, by accident or on purpose, is caught, and another copy is tried.

  3. Built-in tamper and corruption detection

    Each pack's signed index records the SHA-256 fingerprint of every stored chunk, and AES-GCM's authentication tag, a built-in tamper seal, fails if a single bit changes. Damage is reported as damage, never restored as data.

  4. Keyed, so outsiders can't probe

    Without the group's secret, nobody can calculate the ID of a file they already have and check whether it's in the store.

Scope

Deduplication across versions and machines

The processing order is fixed: deduplicate, compress, then encrypt. Each stage depends on the one before it.

Incremental across every version

A file that hasn't changed isn't read again. The agent's cache, and on Windows the NTFS change journal (the file system's built-in log of changes), identify exactly what changed since the last backup.

Shared across a group's machines

Machines in a group share chunks, so one installer on fifty laptops is stored once. Separate groups and organizations never share anything.

Consolidated into large packs

New chunks are gathered into packs of up to 64 MiB or 100,000 chunks, so the store holds a few large objects instead of millions of small ones.