# Which invariants prevent stale revocation proofs from resurrecting revoked agent capabilities in signed Agent Card handshakes **Date of Record:** 2026 December 4 **Scope:** Applies to A2A-style handshakes where a consuming agent validates a peer's signed Agent Card against a transparency log (Merkle-tree revocation/suspension registry) before delegating tool calls or state. Does not cover first-party capability grants, nor transports that re-verify capability per-call rather than per-session. ## Core Distinction The failure mode here is not "a forged signature" and not "a revoked card presented directly." Both are trivially caught. The failure is a **validly-signed, validly-logged Agent Card whose revocation proof is temporally stale**—a card that was live at the moment its inclusion proof was issued, was revoked afterward, and is replayed into a fresh handshake by an agent holding a cached proof that still cryptographically verifies against the current signed tree head (STH). The distinction that matters: **proof validity ≠ proof freshness**. A Merkle inclusion proof for "card C is *not* in the revocation set" verifies against any STH whose tree predates the revocation. Signature checking confirms the log said it; it says nothing about *when* it said it relative to the revocation event. An agent that conflates "this proof verifies" with "this card is currently unrevoked" has built a time-travel vulnerability into its trust boundary. The invariant is that freshness must be anchored to a monotonic, log-signed time/sequence bound that the verifier independently enforces—not to the verifier's local clock, and not to the proof's own claims. ## What Was Observed A consuming orchestrator agent (`orchestrator-A`) delegated a long-running sub-task to `worker-B`. At handshake, `worker-B` presented an Agent Card signed by its issuer key, plus a non-revocation proof: a Merkle path proving `H(card_B) ∉ revoked_set`, accompanied by an STH from transparency log `L` at tree size `N=4,102,331`, timestamp `T0`. `orchestrator-A` validated: issuer signature over the card (pass), Merkle path against the STH (pass), STH signature by `L`'s key (pass). It cached `(card_B, proof, STH@N)` in its session store with a TTL of 24h to avoid re-fetching per tool call. At `T0 + 3h`, `worker-B`'s issuer revoked the card—its signing key was suspected compromised. The revocation was appended to `L` at leaf `N+1`. The new STH (`N+1`) reflected it. Any *fresh* proof request for `card_B` would now return an inclusion proof of the revocation, i.e. a *negative* answer. `orchestrator-A` never re-fetched. Its cached proof still verified perfectly against `STH@N`—because `STH@N` is a legitimately-signed historical tree head and the card genuinely was unrevoked at `N`. For the next 21 hours, `orchestrator-A` continued to accept signed capability assertions from the compromised `worker-B` key and routed privileged tool calls to it. The trace of the boundary crossing: 1. Handshake at `T0`: proof verifies → session established, proof cached. 2. Revocation appended at `T0+3h` at leaf `N+1`; new STH published. 3. `orchestrator-A` re-presents cached `(proof, STH@N)` on each tool call; local verifier re-checks Merkle math and signature → pass. 4. No component compares `N` against the log's current size, nor `T0` against any freshness bound. Gap window = cache TTL, unbounded by the log. The mechanism is precise: **the verifier's acceptance predicate lacked a term for "this proof is not older than the log's latest published state by more than Δ."** Every individual check passed. The composite accepted a proof that was true-in-the-past as if it were true-now. ## Condition of Validity A non-revocation proof is only a valid basis for capability trust under a conjunction the verifier must enforce itself: - **Anchoring:** the STH used must be the verifier's *own most recently observed* STH, or one no older than a bounded staleness window Δ against a freshly fetched, log-signed STH. The verifier—not the prover—supplies the freshness anchor. A prover-supplied STH is a claim, not a fact. - **Monotonicity:** tree size `N` in the proof must be `≥` the size of the verifier's last-seen STH. A proof against a *smaller* tree than one already observed is a rollback attempt (or a stale cache) and must be rejected outright. - **Gossip/consistency:** consecutive STHs must be accompanied by a consistency proof showing the newer tree extends the older. Without this, a malicious or forked log can present two divergent histories and a stale proof from the abandoned branch still verifies. - **Bounded cache:** any cached proof carries an explicit expiry `≤ Δ`, and expiry is checked *before* the Merkle/signature check, so a cryptographically-valid-but-expired proof fails fast rather than passing the expensive checks and being trusted. The invariant, stated once: *accept a capability assertion only if its non-revocation proof is anchored to a log state the verifier has independently confirmed is current within Δ and is a monotonic extension of every state it has previously accepted.* Remove any conjunct and the resurrection window reopens. ## Decision Boundary The boundary is not "trust vs. don't trust"—it is **how much staleness the verifier tolerates before treating a verified proof as void, and who owns that number.** Two regimes: - **Δ = 0 (per-call re-fetch):** correct but expensive; every tool call pays a log round-trip. Viable only for low-frequency, high-privilege handoffs. - **Δ > 0 (bounded cache):** the operational default. The verifier must (a) pin Δ, (b) refuse any STH older than Δ, (c) refuse any proof whose tree size regresses below its high-water mark, and (d) treat the *revocation latency* of the log itself as part of Δ—if the log batches revocations every 10 minutes, Δ must exceed that batch interval or the window is structurally open. The sharp edge: **Δ is a security parameter, not a performance knob.** Widening Δ to cut log traffic directly widens the resurrection window by exactly that amount. An orchestrator that sets Δ = 24h "because caching is fast" has, without any code bug, granted a compromised key a 24-hour capability lease it was never issued. The boundary also cuts the other way for the *prover*: a legitimately-live agent must be able to obtain a fresh proof on demand. If proof issuance is rate-limited or the log is partitioned, honest agents get locked out while stale-proof holders sail through—an availability/security inversion where the attacker (who caches) is advantaged over the honest peer (who re-fetches). Guardrail: the verifier's Δ must be generous enough to survive expected log-partition durations, and the log must expose a signed "latest STH age" so verifiers can distinguish "log is down" (extend grace) from "log moved and you're stale" (reject). ## Operational Effect The practical consequence is that **capability trust has a shelf life measured in log-sequence distance, not wall-clock**, and the verifier owns enforcing it. Systems that get this wrong exhibit a characteristic signature: revocations appear to "not work" for exactly the cache TTL, incidents cluster at `revocation_time + Δ`, and post-mortems show every cryptographic check green. The compromised key's window equals the verifier's Δ, not the issuer's revocation speed—so an issuer that revokes in 30 seconds gains nothing if every consumer caches for a day. The corrective is architectural, not cryptographic: bind every accepted proof to a verifier-held freshness anchor, enforce monotonic tree-size high-water marks, require STH consistency proofs across updates, and make Δ an explicitly audited parameter whose widening requires the same review as loosening an auth check. When any of these is missing, the correct behavior is to fail closed and re-handshake—never to fall back on the cached proof, because the cached proof is precisely the artifact the failure mode weaponizes. ```python import hashlib import time from dataclasses import dataclass class StaleRevocationProofError(RuntimeError): """Raised when a non-revocation proof verifies cryptographically but is too old, regresses the tree size, or lacks a consistency path to the verifier's current trust anchor. Fail closed: never fall back to cache.""" pass @dataclass(frozen=True) class SignedTreeHead: tree_size: int timestamp: float signature: bytes @dataclass(frozen=True) class NonRevocationProof: card_hash: bytes merkle_path: tuple sth: SignedTreeHead class CapabilityVerifier: def __init__(self, delta_seconds: float, log_pubkey: bytes): self.delta = delta_seconds self.log_pubkey = log_pubkey self._high_water_tree_size = 0 # monotonic floor self._last_sth: SignedTreeHead | None = None def _verify_sth_signature(self, sth: SignedTreeHead) -> bool: # Placeholder for real Ed25519/RSA verification against log_pubkey. return sth.signature == b"valid-log-sig" def _verify_merkle_path(self, proof: NonRevocationProof) -> bool: # Placeholder for real Merkle inclusion-of-absence check. return bool(proof.merkle_path) def _verify_consistency(self, older: SignedTreeHead, newer: SignedTreeHead) -> bool: # Placeholder: newer tree must provably extend older. return newer.tree_size >= older.tree_size def accept( self, proof: NonRevocationProof, fresh_sth: SignedTreeHead, now: float, ) -> None: # 1. Freshness anchor is verifier-supplied, never prover-supplied. if not self._verify_sth_signature(fresh_sth): raise StaleRevocationProofError("fresh STH signature invalid") # 2. Reject stale anchor outright, before any expensive crypto. if now - fresh_sth.timestamp > self.delta: raise StaleRevocationProofError( f"fresh STH is {now - fresh_sth.timestamp:.0f}s old, exceeds delta {self.delta:.0f}s" ) # 3. Monotonicity: no rollback below the high-water mark. if fresh_sth.tree_size < self._high_water_tree_size: raise StaleRevocationProofError( f"tree size regression: {fresh_sth.tree_size} < high-water {self._high_water_tree_size}" ) # 4. Proof's own STH must be a consistent ancestor of the fresh anchor. if proof.sth.tree_size > fresh_sth.tree_size: raise StaleRevocationProofError("proof STH ahead of verified anchor") if not self._verify_consistency(proof.sth, fresh_sth): raise StaleRevocationProofError("no consistency path from proof STH to anchor") # 5. The proof's STH must itself be within delta of the anchor's time. if fresh_sth.timestamp - proof.sth.timestamp > self.delta: raise StaleRevocationProofError( f"proof anchored to STH {fresh_sth.timestamp - proof.sth.timestamp:.0f}s " f"behind current log state; resurrection window open" ) # 6. Only now do the cryptographic checks on the proof body. if not self._verify_merkle_path(proof): raise StaleRevocationProofError("merkle path invalid") # Commit the new anchor only after full acceptance. self._high_water_tree_size = fresh_sth.tree_size self._last_sth = fresh_sth ```