{
  "slug": "crc-concatenation",
  "term": "CRC concatenation",
  "aliases": [
    "CRC combination",
    "CRC combine"
  ],
  "definition": "CRC concatenation derives a checksum of ordered joined byte sequences from their compatible CRC values and segment lengths without rereading the payload.",
  "note": "A polynomial shift accounts for the suffix length before the two CRCs are combined. Initialization and final-XOR conventions must agree. Plain XOR of independently computed part checksums is not the concatenation operation. [kadatch-jenkins]\n\nFor zlib's IEEE CRC-32, crc32_combine takes CRC(A), CRC(B) and the byte length of B. It returns CRC(A followed by B). CRC-32C needs its own polynomial and compatible implementation; the two 32-bit checksums are not interchangeable. [zlib-api] [crc32c]\n\nThe native example splits the ASCII bytes 123456789 in all 55 three-part layouts, including empty parts. Both valid groupings produce cbf43926. A grouped suffix needs its complete length: combining A with B+C uses len(B)+len(C). Reordering parts, using a wrong length, XORing checksums or checksumming digest bytes gives different results in the selected controls. [replay]\n\nThe result covers the original byte stream, unlike a hash of its part digests. Chunk boundaries may change without changing that full-object value. Keeping old part checksums does not verify current stored bytes; even correct combination preserves existing CRC collisions. [zlib-api] [replay]",
  "status": "shipping",
  "advantages": [],
  "limitations": [],
  "related": [
    "cyclic-redundancy-check",
    "crc32c",
    "full-object-checksum",
    "composite-checksum"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "citations": [
    {
      "id": "kadatch-jenkins",
      "title": "Kadatch and Jenkins: Everything we know about CRC but afraid to forget (2010), sections 3.1-3.3.",
      "url": "https://github.com/madler/zlib/blob/v1.3.1/doc/crc-doc.1.0.pdf",
      "accessed": "2026-11-23"
    },
    {
      "id": "zlib-api",
      "title": "zlib 1.3.1 zlib.h: crc32, crc32_combine and crc32_combine_op contracts.",
      "url": "https://github.com/madler/zlib/blob/v1.3.1/zlib.h",
      "accessed": "2026-11-23"
    },
    {
      "id": "crc32c",
      "title": "RFC 7143: iSCSI CRC-32C polynomial and digest conventions, section 13.1.",
      "url": "https://www.rfc-editor.org/rfc/rfc7143.html#section-13.1",
      "accessed": "2026-11-23"
    },
    {
      "id": "replay",
      "title": "Hesela native CRC concatenation replay: inputs, grouping checks and limitations.",
      "url": "https://hesela.dev/research/crc-concatenation/README.txt",
      "accessed": "2026-11-23"
    },
    {
      "id": "results",
      "title": "Hesela CRC concatenation: exact native replay results.",
      "url": "https://hesela.dev/research/crc-concatenation/results.json",
      "accessed": "2026-11-23"
    },
    {
      "id": "code",
      "title": "Hesela CRC concatenation: standalone native-library probe.",
      "url": "https://hesela.dev/research/crc-concatenation/probe.py",
      "accessed": "2026-11-23"
    },
    {
      "id": "tests",
      "title": "Hesela CRC concatenation: exhaustive two-byte and collision regression tests.",
      "url": "https://hesela.dev/research/crc-concatenation/test_probe.py",
      "accessed": "2026-11-23"
    }
  ],
  "updated": "2026-11-23",
  "provenance": [
    "This is a source synthesis and deterministic native-library replay, not a new CRC algorithm or a reproduction of the paper's performance measurements.",
    "The recorded library reports zlib 1.3; the cited 1.3.1 API documents the same nonnegative-length concatenation contract. The checker reports its actual loaded version.",
    "The finite tests cover 65,536 two-byte inputs, 55 layouts of one nine-byte message, five selected invalid constructions and a constructed collision. They do not estimate physical corruption rates."
  ]
}
