# Diffusion, distance and known erasures

Hesela teaching example, prepared 2026-11-01; standalone verification added
2026-11-02. These two 3-to-8 binary linear maps are not a PoW implementation.

## Replay

Put these three sibling files in one directory, then use Node.js 24:
- pow-diffusion-distance.mjs
- pow-diffusion-distance.json
- pow-diffusion-distance.test.mjs

Run `node --test pow-diffusion-distance.test.mjs`.
Run `node pow-diffusion-distance.mjs` to print the generated JSON.
No package installation or access to Hesela's private repository is needed.
The tests compare the complete JSON, including its generator SHA-256, and
check the enumeration with projected-matrix rank and pairwise distances.

## What the result establishes

Both maps change four output bits on any single input-bit flip. Their minimum
distances are 2 and 4. The reason these statements differ is cancellation:
one changed input selects one row; several changed inputs XOR several rows.
A row's weight therefore does not determine the smallest nonzero combination.

If two codewords differ in at least d places, removing fewer than d coordinates
cannot make their remaining coordinates identical. This proves the known-erasure
guarantee, assuming every retained coordinate is correct. In contrast, two
radius-t error balls are disjoint only when 2t < d. Thus A guarantees any one
known erasure but cannot uniquely correct every single unknown bit error; B
guarantees any three known erasures or any one unknown bit error, separately.
This is a uniqueness statement, not a decoder-speed or cryptographic claim.

The frozen results cover all 8 messages and 256 erasure masks per map. Counts
are exact finite sets, not observed fault frequencies or a presumed distribution.
The original JSON and generator are unchanged by the standalone packaging.

## Source context and limits

- Halevi, Harnik, Pinkas and Shulman-Peleg (2011), DOI
  10.1145/2046707.2046765; ePrint 2011/207, revision 2011-08-11:
  https://eprint.iacr.org/2011/207
  Theorem 3 and sections 5.1-5.3 motivate separating assumptions from benchmarks.
  The indexed text was reviewed; direct PDF acquisition remained unavailable.
  No complete-proof verification, cryptanalysis or prototype replication claimed.
- Venkatesan Guruswami, Introduction to Coding Theory, CMU Spring 2010,
  Notes 1, Lemma 6 (pp. 4-5): distance, error correction and known erasures:
  https://www.cs.cmu.edu/~venkatg/teaching/codingtheory/notes/notes1.pdf

Human synthesis:
https://hesela.com/analyses/encrypted-deduplication-trust-boundaries/#pow-assumptions

Retain the scope and exact artifact hashes when citing these calculations.
No third-party paper is redistributed in this packet.
