Version 2, 10 November 2026. On 5 November a probe of the version this page had run since 26 September found two faults in it: hidden lines could be folded together and the proof still matched, and a hidden line that someone could guess could be confirmed from its hash. Both are closed in v2, and measured on 400 documents below (what changed). Proofs made before then still check, and every one of them now names both faults.

What this is

When an AI or a person redacts a document (names, case numbers, health details, sources), the people who receive it normally have no way to check that only the declared parts were touched. A redaction tool might also have rewritten a sentence, or a line might have quietly gone. Kar-Veil makes that something anyone can check by recomputing, not by trusting the redactor's word.

Before any redaction, you commit the original: Kar-Veil gives you a 64-character fingerprint (the root) to publish, and a secret to keep. Later, whoever redacts it uses the original and the secret to make a veil proof: the exact text of every line left visible, and only a hash for every hidden line. Anyone can recompute the fingerprint from that proof and check it lands on the root that was published first, without seeing anything that was hidden. If a visible line was edited, or a line was added, dropped, moved or folded into another, it does not land, and Kar-Veil says what broke.

Honest limits

Start here

  1. Commit the original (step 1 below). Paste the full text and press Commit. Publish the root now, somewhere you do not control alone. Save the secret somewhere private.
  2. Redact (step 2). Paste the same original and its secret, tick the lines to hide, and generate. You get the redacted document and its veil proof.
  3. Send both to whoever needs them. They need nothing else from you.
  4. They verify (step 3): paste the proof and the root that was published first. The verdict is one of four:
    • VERIFIED: the proof recomputes to the published root. Every visible line is the original's.
    • CONSISTENT: the proof agrees with itself, but no published root was given, so it could be a proof of any document. Get the root and check again.
    • BREACHED: well formed, but it does not land on the root (or does not match the document received). Something was changed.
    • MALFORMED: not a proof at all, with the reason.

Want to see it first? Attack it runs nine kinds of tampering against a sample in this page.

1

Commit an original

Paste the full, unredacted original. One statement per line works best. Nothing leaves this page.

2

Redact and make a veil proof

Paste the exact original again, with its secret. Tick the lines to hide.

3

Verify a veil proof

You need the proof and the root that was published before the redaction. You never need the original.

The proof alone settles whether its visible lines are the original's. Pasting the copy you were sent adds one more check: that the copy says the same as the proof, line for line.

◆

Attack it

Commits a sample document under v2 with a fresh secret, hides two lines, then runs the same nine attacks the measurement uses (attacks.mjs) against the honest proof and verifies each one against the root, here in your browser. It also runs the two v1 faults, so you can see what v2 closes.

Nothing run yet.

What changed in v2, and how it was measured

Fault F1, structure forgery. In v1 the line count was not part of the root, and a hidden line's hash could be any 64-hex value, including an inner node of the tree. So two hidden lines could be shown as one, or a whole document as half as many hidden lines, and the proof still landed on the root. v1's page said a dropped line made the root not match; for this kind of drop it did match. v2 binds the line count into the root, so the tree's shape is fixed.

Fault F2, guessable hidden lines. In v1 a hidden line's hash depended only on its position and its text. Anyone who could guess the text (a name from a staff list, "Yes", an amount) could confirm the guess by hashing it. v2 salts every line with a value derived from the committer's secret, so a guess cannot be checked without the secret.

Both faults, the fix and seven claims with their bars were sealed in CLAIMS-2026-11-05-veil-v2.md on 5 November, in a commit of its own, before any code that measures them existed. measure.mjs then ran them on 400 random documents from one seeded stream; CI re-runs it on GitHub's runner and fails if the receipt differs by one byte. The table is read from receipts/measure.json when this page loads.

claimthe barmeasured
reading the receipt…

Re-run it yourself: git clone https://github.com/sjgant80-hub/kar-veil && cd kar-veil && git clone --depth 1 --branch v0.6 https://github.com/sjgant80-hub/witness .witness && node measure.mjs --check

How it works

A three-line v2 commitment Three lines each become a salted leaf; leaves 0 and 1 fold into a node; that node and leaf 2 fold into the top; the root hashes the line count with the top. Line 1 is hidden, so its proof entry is only its leaf hash. root H(root : 3 lines : top) top = node(n01, L2) n01 = node(L0, L1) L0 = H(leaf:0:salt0:text) visible: text + salt shown L1 (hidden) only its hash is shown L2 = H(leaf:2:salt2:text) visible: text + salt shown salt i = HMAC-SHA-256(secret, "kar-veil:v2:salt:" + i): the secret never leaves the committer
  1. Commit. The document is split into lines. Each line gets a salt, HMAC-SHA-256(secret, "kar-veil:v2:salt:" + i), and a leaf, SHA-256("kar-veil:v2:leaf:" + i + ":" + salt + ":" + text). Leaves fold in pairs with SHA-256("kar-veil:v2:node:" + left + ":" + right); an odd hash at any level is promoted unchanged. The root is SHA-256("kar-veil:v2:root:" + lineCount + ":" + top), so the number of lines is fixed by the root.
  2. Redact. The proof carries, for each visible line, its position, its text and its salt; for each hidden line, its position and its leaf hash only. The hidden text and the secret are never in it.
  3. Verify. The verifier recomputes every visible leaf from the text and salt in front of it (never from a stated hash), places each hidden hash at its position, folds the same way, binds the line count, and compares the result with the root published first. To make a changed proof land on that root, someone would have to find a SHA-256 collision. To learn a hidden line, they would have to guess both the text and a 256-bit salt.
  4. Old proofs. A v1 proof still verifies under the v1 rules, so old roots stay checkable, and its verdict always names F1 and F2. Ask for a v2 proof.

Blueprint

Four files, zero dependencies, all in the repository. The page imports the first one, so the gated logic is the logic you run here. The gate counts are read from receipts/gate.json; CI re-runs the same gate on GitHub's runner on every push.

filewhat it doeshow it is proven (witness v0.6 mutation gate, every change)
veil.mjscommit, prove, verify and preview: the logic this page runsreading…
veilcase.mjsthe cost case below, from the sourced basisreading…
attacks.mjsthe seeded stream, the corpus, the nine attacks, the guessing attack and the field mutationsthe apparatus; its teeth are shown by the v1 faults it reproduces in every applicable case
measure.mjsruns the sealed claims and writes receipts/measure.jsonre-run byte for byte on GitHub's runner

A mutation gate tests the tests: witness changes the kernel one operator at a time (a < becomes <=, an && becomes ||) and the tests must fail on every change. A change the tests let through is a gap in them.

Roll it out

For anyone who sends redacted documents others must trust: disclosure and legal teams, freedom-of-information officers, HR investigations, health and care records, and pipelines where an AI does the redacting.

  1. Pick one stream of documents that already gets redacted, and the person who checks those redactions today.
  2. Commit at intake. When an original arrives, commit it and record the root somewhere independent: your document system's audit log, a git repository, a notary. Keep the secret with the original, under the same access rules.
  3. Redact as you do now, with any redaction tool, then make the veil proof from the original and its secret, and send it with the redacted copy. To automate it, a script calls commit(), prove() and verify() from veil.mjs; this page is the manual version of the same three calls.
  4. Recipients verify on this page, or with veil.mjs in their own tools (it runs in any browser or in Node 20). Once loaded, the page keeps working offline. It can be hosted on your own intranet as it is, over HTTPS: browsers only give pages the Web Crypto API it uses on secure (HTTPS or localhost) addresses.
  5. Measure the difference with the cost case below: the minutes your checker spent per copy before, against the seconds a verify takes.

For a business

What it does. Every redacted document you send can carry its own proof that only the declared lines were hidden and nothing else changed, checkable by the recipient in seconds without ever seeing the hidden content. It turns "trust our redaction" into arithmetic anyone can repeat.

CEO. A disclosure that cannot be quietly altered removes a class of dispute: about whether the copy someone received is the copy you redacted.

CFO. The checking time it removes is worked out below from your own volumes and the UK median wage (ONS). There is no licence fee: Kar-Veil is MIT.

COO. One extra step at intake (commit) and one at send (make the proof). The checker's line-by-line comparison becomes a verify.

CTO / CISO. One static page and one dependency-free module. No server, no account, no upload: every hash is computed in the browser with the Web Crypto API (SHA-256, HMAC-SHA-256). The logic is mutation-gated and its claims re-run on GitHub's runner. Read veil.mjs; it is short.

Legal and compliance. The verifier never receives the hidden content, which suits data minimisation. Kar-Veil does not decide what must be redacted, and does not timestamp: record the root where your process already keeps evidence.

The teams. Redactors keep their tools. Recipients get a yes or no with the reason, not a judgement call.

The cost case, on your numbers

What it costs today to confirm by hand that each redacted copy is faithful (open both, compare, ask, chase), against checking a veil proof. Staff time is at the UK median hourly wage with on-costs left out, so this is a floor. Later years rise with UK CPI. Every input is yours.

yearchecking by handwith veil proofssaved

Against what you do now

Security, data protection and deployment

Support and ownership

Supplied by AI Native Solutions; start through that site. Support, any service level, warranty and liability are agreed per deployment, in each deployment's agreement. The software is MIT and keeps running without us.

Risks, answered straight

The case for the board

Disputes about redacted disclosures are disputes about trust. Kar-Veil replaces that trust with a check anyone can repeat, at no licence cost, without sending a single document anywhere. Its own faults were found, published and fixed in the open, and the fix was measured against claims sealed before the code existed.

FAQ

Why lines, and not the whole document or single words?
Hashing the whole document only says changed or not, so nothing can be partly disclosed. Words get tangled in spacing and layout. Lines suit letters, transcripts, reports and disclosures.
Does this replace a human redaction review?
No. It makes the result of a redaction checkable afterwards. It has no view on what should have been hidden.
Can I use it on a PDF or a scan?
Only on its extracted text. Layout, images and metadata are outside the commitment.
Does the verifier ever need the original?
No. Only whoever makes a proof needs the original and its secret. A verifier needs the proof and the root published before the redaction.
Why is there a secret now?
It salts every line, so a hidden line cannot be confirmed by guessing its text (fault F2 in v1). It is not in any proof and is never needed to verify.
What does the optional signature prove?
That whoever held that private key signed that root. It is not a timestamp, and it does not say whose key it is.