{
  "slug": "liberation-codes",
  "term": "Liberation codes",
  "aliases": [
    "RAID-6 Liberation codes"
  ],
  "definition": "Liberation codes are XOR-based MDS array codes that protect k data devices with two parity devices using an odd-prime number of symbol positions per device.",
  "note": "The construction requires an odd prime w greater than two and k <= w. P is row parity; Q uses cyclic permutations with one extra coefficient for each data device except D0. Its minimum-density property concerns this horizontal RAID-6 matrix model, not every erasure-code layout. [plank2008]\n\nThe pinned Jerasure constructor checks k > w but does not itself check primality. Callers must enforce the code's parameter contract. Liber8tion is a separate constructor for w=8, not permission to pass eight to the Liberation formula. [jerasure]\n\nHesela's finite checker verifies all 544 two-device erasure sets across 22 configurations: w in {3,5,7,11}, 2 <= k <= w. These are exhaustive counts within that grid, not device-failure probabilities or a proof for every prime. Deliberately evaluating the formula outside its contract at k=4, w=9 loses recoverability when D0 and D3 are erased. [hesela-results]\n\nFor k=w=5, 21 of the 25 data positions affect two parity symbols and four affect three, averaging 54/25 = 2.16 under equal weighting. Changing D1 symbol 2 affects P2, Q1 and Q2. Those three symbol locations occupy three blocks with one symbol per block, but only two blocks if all five positions on each parity device share a block. This counts locations, not physical writes: reads, batching, logging and durability are outside the model. [hesela-results]\n\nRemoving the extra Q coefficients lowers update counts but breaks two-device recovery. A direct-XOR encoder and exhaustive small-payload checks independently test the matrix implementation. [hesela-tests]",
  "status": "research",
  "advantages": [],
  "limitations": [],
  "related": [
    "liber8tion",
    "raid-6",
    "maximum-distance-separable-code",
    "erasure-coding"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-22",
  "citations": [
    {
      "id": "plank2008",
      "title": "James S. Plank. The RAID-6 Liberation Codes. FAST 2008, pp. 97-110; sections 3.1-3.4, 6 and 7.",
      "url": "https://www.usenix.org/legacy/events/fast08/tech/full_papers/plank/plank.pdf",
      "accessed": "2026-11-22"
    },
    {
      "id": "jerasure",
      "title": "Jerasure liberation.c at commit 414c96ef2b9934953b6facb31d803d79b1dd1405: Liberation and Liber8tion constructors.",
      "url": "https://github.com/tsuraan/Jerasure/blob/414c96ef2b9934953b6facb31d803d79b1dd1405/src/liberation.c",
      "accessed": "2026-11-22"
    },
    {
      "id": "hesela-results",
      "title": "Hesela: Exact finite results, update-location example and composite-parameter negative control.",
      "url": "https://hesela.dev/research/liberation/results.json",
      "accessed": "2026-11-22"
    },
    {
      "id": "hesela-code",
      "title": "Hesela: Standalone Python GF(2) model and result generator.",
      "url": "https://hesela.dev/research/liberation/model.py",
      "accessed": "2026-11-22"
    },
    {
      "id": "hesela-tests",
      "title": "Hesela: Independent direct-XOR oracle, exhaustive tiny payloads and negative controls.",
      "url": "https://hesela.dev/research/liberation/test_model.py",
      "accessed": "2026-11-22"
    },
    {
      "id": "hesela-method",
      "title": "Hesela: Methods, units, assumptions and reproduction steps.",
      "url": "https://hesela.dev/research/liberation/README.txt",
      "accessed": "2026-11-22"
    }
  ],
  "provenance": [
    "Source synthesis and deterministic algebraic verification; no measured drive reliability or hardware benchmark.",
    "Known device erasures remove all their symbol positions. Surviving positions must be intact, correctly identified and from one consistent codeword version.",
    "The checker intentionally accepts only odd primes 3..31 and 2 <= k <= w; published enumerations stop at w=11. This implementation bound is not a limit on the published family."
  ]
}
