An operator who administers a secret store can also edit the access record it writes — what actually constrains that?
answer
- evidence, not prevention
- each entry sealed to its predecessor
- append-only, administered by other people
- truncation leaves a valid chain
- alert on silence, not only content
basics
~20 sTwo things: sealing each entry to its predecessor so an edit or a removal breaks the chain, and shipping entries continuously to a destination whose write rights are append-only and whose administrators are different people. Both give evidence, not prevention.
solid answer
~40 sNothing prevents it — you make it **evident** and you keep a copy out of reach. Tamper-evidence means each entry carries a sequence number and a value derived from the previous entry, so editing a field or removing an entry in the middle breaks the chain for every entry after it. Shipping means the entries leave the store continuously for a destination where the rights are append-only and the administrators are different people, so a local deletion becomes a discrepancy between two copies rather than a disappearance. Neither stops an operator: they can still stop the emitter, and truncating the newest entries leaves a valid chain. That is why **continuity** is monitored — an unexplained gap in the sequence, or silence where entries were expected, is the alert.
code
pseudocode · 19 lines// writing: seal each entry to the one before it
entry.sequence = lastEntry.sequence + 1
entry.chainValue = digest(lastEntry.chainValue + serialize(entry))
append(localRecord, entry)
ship(externalSink, entry) // append-only rights, different administrators
// verifying: done by the READER of the record, over the shipped copy
expected = firstEntry.sequence
prev = firstEntry.chainValue
for entry in received:
if entry.sequence != expected:
report GAP(expected, entry.sequence) // an entry was removed
if entry.chainValue != digest(prev + serialize(entry)):
report EDIT(entry.sequence) // a field was changed
prev = entry.chainValue
expected = entry.sequence + 1
// nothing above fires if the newest entries were simply dropped:
// compare `expected` against the sequence the sink last receivedgo deeper
Recall the two moves: seal each entry to the one before it, and keep a second copy somewhere the store's operators cannot delete from.
Explain what a sequence number plus a per-entry derived value actually detects — an edit, a removal, a reordering — and that detection is not prevention.
Show the operating side: continuity monitoring, a heartbeat so absence has a meaning, verification performed by the reader over the shipped copy, and truncation as the gap the chain alone does not close.
Decide who administers the destination and on what terms, because that choice is the whole control; a copy your own team can purge has not left the boundary.
## Whose word the record is An access record is only worth what its reader believes about it, and the belief is a specific one: that it is complete and that nothing in it has been changed since it was written. If the record lives on the machine the store runs on, administered by the same people who administer the store, then everyone who could abuse the store could also curate the evidence of having done so. The record then supports every claim except the one it exists to support. So the goal is not to make editing impossible — inside an administrative boundary it rarely is — but to make editing and removal **leave a mark**, and to put a second copy where the same hands do not reach. ## Tamper-evidence: sealing each entry to the last Give every entry a monotonic sequence number, and derive a small value for each entry from its own content plus the previous entry's derived value. Each entry now depends on the entire history before it. - **Changing a field** in an old entry changes its derived value, so every later entry's derivation no longer agrees. The break points at the edited entry. - **Removing an entry** from the middle both leaves a hole in the sequence and breaks the derivation at the join. - **Reordering** breaks it for the same reason. The verification is done by the **reader** of the record, not by the store — a store that both writes and vouches for its own record has moved the problem, not solved it. ## Shipping it off the store In parallel, entries are sent as they are produced to a destination outside the store's administrative boundary, with two properties that matter more than where it is: the write rights there are **append-only** rather than read-write-delete, and the people who administer it are **not** the people who administer the store. A local deletion now produces a discrepancy: the shipped copy has entries the local one does not. Discrepancy is a signal; disappearance is not. ## The controls answer different questions | Control | What it detects | What it cannot touch | |---|---|---| | Sealing each entry to the last | an edited field, a removed entry, a reordering | entries never written, and a cut at the very end | | Shipping to an outside destination | a local deletion, a local rewrite, a rewritten history | an entry altered before it was sealed and sent | | Continuity monitoring | silence where entries were expected, a gap in the sequence | a period the emitter ran but the store recorded nothing for | Run the three together, because each closes a blind spot the others leave. Any one of them alone still admits a way to remove evidence without leaving a mark, and the combination is what turns "the record says so" into a claim a reader who does not trust you can check. ## What neither of these gives you 1. **Prevention.** An operator who can act can still act. The record's job is that the action is visible afterwards, which is a different and achievable goal. 2. **Protection against truncation.** Deleting the newest entries and stopping there leaves a chain that verifies perfectly — there is nothing after the cut to disagree with. Only an independent record of how far the sequence had got catches it, which the shipped copy provides, and which periodically publishing the current head to a separate party also provides. 3. **Protection against a stopped emitter.** If the process that writes or ships entries is killed, actions during that window produce nothing. Without continuity monitoring, that silence is indistinguishable from a quiet period. 4. **Protection against what happens before the seal.** An entry that was never written cannot be detected by any property of the entries that were. ## Operating it - **Alert on absence, not only on content.** Expect a heartbeat entry on a fixed interval even when nothing happens, and treat its absence as an incident in its own right. - **Verify the sequence continuously**, not during an investigation. A break discovered in month four is a break you cannot date. - **Hold the delete rights elsewhere.** If the team that runs the store can also expire or purge the shipped copy, the copy is back inside the boundary. - **Read the record from the shipped copy** by default, so the copy is exercised rather than assumed. Stores differ in how much of this they do for you: some seal their own entries and can ship them, some write an ordinary record and leave both to you, some record administrative actions in a place separate from data access. Find out which yours does by removing an entry from a test copy and seeing whether anything notices.
- The chain verifies from end to end. Which tampering is still consistent with that?Truncation. Deleting the most recent entries and stopping leaves a shorter record that verifies perfectly, because nothing after the cut remains to disagree. Catching it needs an independent witness of how far the sequence had reached — the shipped copy's last received sequence, or the current head published periodically to a party that does not administer the store.
- What operational signal tells you the entries stopped being emitted?A heartbeat plus sequence continuity. Emit an entry on a fixed interval even when there is no activity, and monitor for gaps in the sequence at the receiving end. Then absence has a meaning: no heartbeat means the emitter or the shipment is down, and that window is not evidence of anything.
- Why should the store not verify its own record?Because the property being checked is whether the store's operators changed it, and a check they control answers itself. Verification belongs to the reader working over the copy that left the store — ideally the same copy a reviewer would be handed, so what you verify and what you present are the same artefact.
A ticket book with numbered stubs. The numbering does not stop a clerk pocketing a fare, but a missing stub is obvious to whoever counts the book — provided the person counting is not the person selling tickets.
saying these in an interview costs you the question
- Believing an append-only setting makes a record unalterable
- Keeping the only copy on the machine the same team administers
- Treating tamper-evidence as prevention of tampering
- Reading silence in the record as no access having happened
- Letting the store vouch for the integrity of its own record
- Giving the store's operators delete rights on the shipped copy