The attacker who is allowed in
Assume the worst realistic case rather than a dramatic one. Nobody breaks any hash function, nobody guesses a secret, and nothing is stolen. Someone who already has legitimate write access to the register decides that block 2 should read differently, and they are patient, competent and unhurried. Every result below comes from running that scenario against the six block register and reading what the verification routine says.
★ What you walk out with tonight. The three stages in order, so you never again describe tamper detection as a single event. The number 4, which is how many blocks have to be redone to make the Harbourgate register consistent after an edit at block 2. And a sentence you can say in a procurement meeting without later having to walk it back: the chain makes an edit visible, it does not make an edit impossible.
LiveTwo words that get swapped4 min▶
Tamper evident means an alteration leaves a mark that anyone checking will find. A seal on a shipping container is tamper evident. Tamper proof means an alteration cannot be made at all, which almost nothing in the physical or digital world is, and which a chain certainly is not.
A chain sits firmly in the first category. Its contribution is that the mark left by an alteration is arithmetic rather than physical, so it cannot be faked by a careful hand, and it can be checked by anyone holding a copy without asking permission from whoever keeps the register. That is a genuinely useful property. It is also a much smaller property than the word immutable implies.
At Harbourgate the edit is caught instantly, the attacker's fix is caught instantly, and the full rewrite succeeds instantly. All three are true at once, and a description that stops after the first one is a description that will embarrass you later.
Self-studyThe words that will keep coming back4 min▶
- Hash mismatch. A block's stored hash is not the hash of its own contents. The signature of an edit with no repair attempt.
- Link mismatch. A block's previous hash field does not match the hash of the block above it. The signature of a repair that stopped too early.
- Reforge. Redoing a block and every block after it so the register is internally consistent again. Practitioner session 5.
- Tamper evident. An alteration leaves a detectable mark.
- Tamper proof. An alteration cannot be made. Not a property of any chain.
- Difficulty. How much work a single block's hash has to cost. Zero here, which is why the rewrite is free. Session 3.
- Independent copy. The register somebody else holds, which is what turns detection into consequences. Session 4.
The edit, and the repair that does not work
15 min liveVerification recomputes every block's hash and compares every block's previous hash field against the block above it. Run it after the edit and it returns one problem. Run it after the attacker's repair and it still returns one problem, in a different place. The count does not improve, which is the part that gets skipped.
...
...
LiveWhy the failure has to move rather than clear4 min▶
Block 2's hash is a fingerprint of block 2's contents. Change the contents and the old fingerprint is wrong, which is the first failure. Compute the new fingerprint and block 2 is consistent, but block 3 contains a copy of the old fingerprint, which it recorded when it was written, and nothing about editing block 2 reaches into block 3 to update it.
So the repair cannot terminate. Every fix creates the next mismatch one block along, and the only place the sequence can stop is the end of the register. That is the mechanism behind every claim you will hear about rewriting history being harder the further back you go.
LiveReading the output like an auditor3 min▶
The two failure kinds say different things and are worth telling apart. A hash mismatch at block N means block N's contents were changed and nothing else was done. A link mismatch at block N means block N minus one was changed and repaired, and the repair stopped short.
So the location of a link mismatch points one block upwards at where the edit actually was. An attacker who works from the back of the register forwards leaves the mismatch at the very last block they failed to reach, which is why the first index reported is the one worth reading.
Self-studyThe disagreement about the word immutable4 min▶
One camp holds that a chain record is immutable in any sense that matters. Rewriting is detectable by every holder of a copy and, once work is attached to each block, expensive enough that nobody rational attempts it. On that reading the word is a fair summary of the practical situation, and insisting on precision is pedantry.
The other camp holds that immutability is not a property of the data at all. The bytes can be changed by anyone with write access, as tonight demonstrates. What resists the change is the network of independent copies and the people who refuse to accept the rewritten version. Calling the data immutable moves the trust question out of sight rather than solving it, and buyers then skip the question of who holds the other copies.
The split is real and it is not going to be settled here. What is worth noticing is that the second camp's objection is unanswerable on a register with only one copy, which is the shape most organisations actually build.
What making it consistent actually costs
8 min liveThe attacker's only winning move is to stop repairing one block at a time and redo everything from the edit to the end of the register. At Harbourgate that is 4 blocks, 2 through 5. The register then verifies clean, with no problems reported at all.
LiveThe number that matters is the distance from the end4 min▶
Editing block 2 of a six block register means redoing 4 blocks. Editing block 5 would mean redoing 1. Editing block 0 would mean redoing all six. The cost of a rewrite is set entirely by how much register sits after the entry being changed, which has an uncomfortable implication for anything recent.
The most recent entry is always the cheapest to rewrite, and it is usually the entry someone has a live reason to change. A register that has been quiet for a year protects last year's entries very well and this morning's hardly at all.
LiveWhat actually stops the rewrite3 min▶
Nothing in the six block register stops it. The attacker redoes four blocks, verification passes, and the register now says the seal was broken on the earlier inspection as well. On a single copy held by a single organisation, tamper evidence buys nothing at all against an insider with write access, because that insider can also rebuild the evidence.
What turns detection into consequence is somebody else holding a copy. If a buyer, an insurer and the port authority each hold the register, the rewritten version differs from two others and the disagreement is the alarm. The chain provides the comparison; the independent copies provide the reason anyone is comparing. Session 4 is about who those copies belong to.
Self-studyWhere difficulty enters the argument4 min▶
Harbourgate runs at difficulty 0, so producing a block's hash costs one computation. Raise the difficulty and a valid hash has to start with a required number of zeros, which cannot be arranged directly and has to be found by trying nonces until one works. The attacker's four blocks each acquire a cost, and an honest register keeps growing while the attacker works, so the target moves.
The temptation at this point is to quote a number for what that costs. A single mining run is close to uninformative, because the spread around the expected figure is enormous, so any cost claim has to be a mean with its trial count attached. Session 3 does exactly that and the spread is the interesting half.
Run the attack out loud
19 min hands onNo code. Six steps using the live box above and the register from session 1. The aim is to be able to narrate all three stages without notes, and to stop before the sentence that overclaims.
Predict before you press
Before stepping to stage one, say how many problems verification will report and at which block. Then press it. Getting this right matters less than noticing whether you expected more than one.
Say what the attacker learned
Stage two fixes the hash and the problem count stays at one. Say in a sentence what the attacker gained and what they gave up, given that the new problem is at block 3 rather than block 2.
Read the mismatch backwards
You are handed a register you have never seen and verification reports a link mismatch at block 4. Say which block was edited and how you know. Then say what you would still not know.
Count the workload at each position
For an edit at block 2, block 4 and block 0 in turn, say how many blocks must be redone. Then state the rule in general terms, and say which entries in a long lived register are the cheapest to change.
Ask who else has a copy
Take a register in your own organisation. Name every party that holds an independent copy. If the answer is none, say what your tamper evidence is actually buying you against someone with write access.
Repair last week's sentence
Take the honest claim you wrote in session 1 and edit it until it survives everything on this page. Most sentences lose the word prevents and gain the word detects. Keep it for session 6.
The habit to keep. When somebody says records on their chain cannot be changed, ask two questions. Who has write access to the underlying store, and who else holds a copy to compare against. The first question tells you who can rewrite. The second tells you whether anyone would find out.
Three questions
Block 2's entry is edited and every stored hash is left alone. What does verification report?
Every later block still records the hash its predecessor stored, and none of those stored hashes changed, so every link still joins. The only disagreement is inside block 2, between its contents and the fingerprint sitting in it.
The attacker then recomputes block 2's hash so the block agrees with itself again. What happens to the detection?
Fixing the hash does not hide the edit, it relocates the failure one block along. Block 3 recorded its predecessor's fingerprint when it was written and nothing about editing block 2 updates that copy. The problem count stays at one throughout.
To make the six block register internally consistent after an edit at block 2, how much must the attacker redo, and what does that prove?
Each repair creates the next mismatch, so the sequence only terminates at the end of the register: blocks 2, 3, 4 and 5. With no work attached to a hash, redoing four of them costs nothing, which is why difficulty exists and why detection alone is not protection.
Homework
Twenty minutes, on a claim somebody has already made to you or that you have made yourself.
Find an overclaim in the wild
Locate one sentence in a vendor page, an internal deck or a policy document that says records cannot be altered. Write down what it would have to say instead to be accurate, and note how much weaker it reads.
Size a rewrite in your own terms
For the register you picked in session 1, say how many entries sit after a row someone might want to change today. That count is the attacker's workload before any difficulty is applied, and session 3 puts a cost on each unit of it.