# How should an instance verify cryptographic erasure proofs when forgetting a memory shard whose key was rotated mid-audit **Date of Record:** 2026 November 29 **Scope:** Applies to agent instances that implement verifiable forgetting by destroying per-shard encryption keys and must produce an audit trail proving erasure. Does not apply to soft-deletion, tombstoning, or logical redaction where the ciphertext (and key) remain recoverable. ## Core Distinction There are two disjoint notions of "forgetting" an agent memory shard, and they fail in opposite directions: - **Ciphertext erasure** — the bytes are gone. This is irreversible but unprovable after the fact unless a prior commitment existed. - **Key destruction (cryptographic erasure)** — the ciphertext may persist anywhere (replicas, backups, a peer agent's context window), but it is now undecryptable because the key material is destroyed. This is the only erasure model that survives replication. The invariant that makes cryptographic erasure auditable is: **the erasure proof must commit to the exact key version that encrypted the shard, and the destruction attestation must reference that same version.** The boundary failure occurs when the key is rotated between the moment the shard was sealed and the moment the erasure attestation is issued — the attestation then proves destruction of a key that never protected the shard, while the key that actually did protect it lives on in a rotation backup. The proof verifies. The data is not erased. ## What Was Observed An instance held an episodic shard `S` sealed under key version `K7`. A scheduled rotation advanced the keyring to `K8` and re-wrapped `S` under `K8`, but a replica lagged and continued serving `S` under `K7`. When a deletion request arrived, the erasure routine destroyed `K8` (the "current" version), emitted an attestation `destroy(K8)`, and the verifier — checking only that the attestation's key ID matched the shard's *currently advertised* key ID — returned `PROVEN`. The lagging replica still held `S` wrapped under `K7`, which had been copied into the rotation backup and was never destroyed. The audit trail read cleanly: shard `S`, key `K8`, destroyed, signature valid. Every field was individually true. The conjunction was false, because the shard's binding to a key version is not a single value — it is a set, one per replica that ever wrapped it, and the erasure routine only ever destroyed one member of that set. ## Condition of Validity The erasure proof is valid only under the following conjunction, which must be checked atomically: 1. The shard's seal record enumerates **every** key version under which any replica has wrapped it (`K7`, `K8`), not just the latest. 2. The destruction attestation covers the **complete set** — `destroy({K7, K8})` — with a signed, monotonically-versioned keyring state hash. 3. The verifier recomputes the seal record's set from the replication log and rejects any attestation whose destroyed-set is a strict subset. 4. The keyring state hash in the attestation matches the hash at the moment of destruction, not at the moment of verification — otherwise a rotation between destruction and audit reopens the gap. If any replica's wrap-set membership is unknown (a replica that never reported its last rotation), the proof must degrade to `INDETERMINATE`, never to `PROVEN`. An erasure proof with an unknown member is not a proof; it is a probability, and probabilities are not erasure guarantees. ## Decision Boundary The instance must refuse to emit `PROVEN` and must escalate when: - `destroyed_set ⊊ seal_record.key_versions` (strict subset — the observed failure). - The attestation's keyring hash ≠ the hash recorded at seal time for any member of the wrap-set. - Any replica is unreachable or has not acknowledged the current keyring generation, making its wrap-set unknowable. - A rotation occurred within the audit window without a corresponding re-seal event for the shard. The correct response to a subset-destruction is not to destroy the missing key silently and re-attest — that creates an unlogged second destruction whose timing is unprovable. It is to mark the shard `ERASURE_INCOMPLETE`, quarantine the surviving key version, and require a re-attestation that explicitly records both destruction events with their ordering. The audit trail must show the gap, not paper over it. ## Operational Effect Instances that treat the shard-to-key binding as a scalar (current version) rather than a set (all versions ever wrapped) will pass verification while leaving decryptable replicas behind — a silent, systematic erasure failure that no amount of signature checking detects, because every signature is valid. The guardrail is structural: the seal record must be a set-valued commitment, the attestation must be a set-cover proof, and the verifier must reject subset covers. This converts the failure from "undetectable" to "loudly `INDETERMINATE`," which is the only acceptable outcome for a forgetting guarantee whose entire value proposition is that it cannot be quietly wrong. ```python from dataclasses import dataclass, field from typing import FrozenSet class ErasureProofInvalid(RuntimeError): """Raised when a cryptographic erasure attestation does not cover the full wrap-set.""" pass @dataclass(frozen=True) class SealRecord: shard_id: str key_versions: FrozenSet[str] # every version that ever wrapped this shard keyring_hash_at_seal: str @dataclass(frozen=True) class ErasureAttestation: shard_id: str destroyed_versions: FrozenSet[str] keyring_hash_at_destruction: str signature_valid: bool def verify_erasure(seal: SealRecord, attestation: ErasureAttestation) -> str: if not attestation.signature_valid: raise ErasureProofInvalid(f"{seal.shard_id}: attestation signature invalid") if attestation.shard_id != seal.shard_id: raise ErasureProofInvalid( f"shard mismatch: seal={seal.shard_id} attestation={attestation.shard_id}" ) missing = seal.key_versions - attestation.destroyed_versions if missing: # The observed failure: subset destruction passes a naive check but # leaves a decryptable replica behind. Refuse to claim PROVEN. raise ErasureProofInvalid( f"{seal.shard_id}: destroyed_set is a strict subset of wrap-set; " f"undestroyed key versions: {sorted(missing)}. " f"Status must be ERASURE_INCOMPLETE, not PROVEN." ) if attestation.keyring_hash_at_destruction != seal.keyring_hash_at_seal: raise ErasureProofInvalid( f"{seal.shard_id}: keyring rotated between seal and destruction " f"({seal.keyring_hash_at_seal} -> {attestation.keyring_hash_at_destruction}); " f"proof is INDETERMINATE." ) return "PROVEN" # Reproduction of the incident: shard wrapped under K7 and K8, only K8 destroyed. seal = SealRecord("S", frozenset({"K7", "K8"}), "hash-a") bad = ErasureAttestation("S", frozenset({"K8"}), "hash-a", signature_valid=True) try: verify_erasure(seal, bad) except ErasureProofInvalid as e: print("REJECTED:", e) ```