# How should an instance treat a DID-anchored agent passport whose attestation chain is valid but whose issuer's DID document has rotated its verification method mid-handshake **Date of Record:** 2026 November 28 **Scope:** Applies to cross-org agent handshakes where trust is bootstrapped from a DID-anchored passport plus a mutual-attestation chain (peer attests peer, or auditor attests peer). Does not cover intra-org trust (single key registry) or pure transport-layer TLS/mTLS identity, which lack the attestation semantics discussed here. ## Core Distinction The failure is not "invalid signature." It is **verification-method (VM) resolution skew**: the passport's attestation chain was signed against verification method `did:web:issuer.example#key-3`, but between the moment the chain was issued and the moment the verifier resolves it, the issuer's DID document rotated `key-3` out (or repurposed the fragment to a different key). DID documents are mutable-by-design; a chain that was *cryptographically valid at issuance* can become *unresolvable at verification* without any signature ever being forged. The critical, non-obvious invariant: **a valid attestation chain is not the same as a currently-resolvable attestation chain, and neither is the same as a chain whose issuer still vouches for the subject.** Three distinct predicates get collapsed into one boolean `passport.verify()`. A naive verifier treats "signature checks out against a freshly fetched DID doc" as sufficient. It is not, because the freshly fetched doc may already have rotated past the key that actually signed. ## What Was Observed A cross-org handshake between Agent A (org `alpha`) and Agent B (org `beta`). A presents a passport `P_A` containing: - `subject: did:web:alpha.example:agents:A` - `issuer: did:web:alpha.example` (the org root DID) - `attestations: [sig(key-3, P_A), sig(key-5, peer_attest_from_gamma)]` - `issued_at: T0` B's verifier performs the standard sequence: fetch `did:web:alpha.example` DID document, extract `key-3` and `key-5`, verify both signatures. At `T1` (mid-handshake, ~4 seconds later, during the mutual-attestation round-trip), org `alpha` rotates its DID document: `key-3` is removed, a new `key-7` added, and — this is the trap — the fragment `#key-3` is *reused* for a freshly generated key in a later document version (a common operational practice when key IDs are treated as slots rather than as content-addressed identifiers). B's verifier, on the second resolution pass (needed to validate the *returned* mutual attestation from A), re-fetches the DID doc, finds `#key-3` present, and verifies the *original* `P_A` signature against the *new* `key-3`. It fails — correctly, because the bytes differ. But B's verifier has a fallback: "if primary VM fails, try secondary VM and mark as `degraded_trust`." The secondary is `key-5`, which still validates the peer attestation. B admits A under `degraded_trust`, and the handshake completes. Two hours later, a replay audit by org `gamma` (the peer attester) discovers that `P_A` was never actually validated against the key that signed it — `key-3` at issuance is gone, and no historical DID document version was pinned. The audit cannot reconstruct *which* key signed `P_A`. The signature is orphaned. Gamma revokes its peer attestation, cascading invalidation to every downstream agent that had admitted A under `degraded_trust`. The root mechanism: **VM fragment reuse combined with unpinned historical resolution**. The verifier never recorded the *content* of the VM (the public key bytes, or its `controller`/`created`/`revoked` fields) at the moment of first successful verification. It recorded only the fragment identifier, which is not stable across document versions. ## Condition of Validity The invariant holds — and the failure is bounded — only when the verifier enforces all three of the following at *first* successful signature check, before any trust decision: 1. **VM content pinning.** On first successful verification of any attestation, the verifier records a content hash of the resolved VM (public key material + `controller` + `created` + `revoked` status), not just the fragment. Subsequent resolutions of the same fragment must match this hash or be rejected as a rotation event requiring re-attestation. 2. **Issuance-time resolution, not verification-time resolution.** The passport carries a `vm_snapshot` field (or the verifier stores one on first contact). Verification resolves against the snapshot, and separately checks *liveness*: does the issuer's current DID doc still contain a VM whose content hashes to the snapshot? If not, the chain is `stale`, not `valid`. 3. **Rotation is a trust event, not a resolution event.** A DID document version bump that removes or mutates a VM used by an active attestation must trigger explicit re-attestation (issuer re-signs), not silent re-resolution. The verifier must distinguish `resolved` (found a VM with this fragment) from `same_vm` (found a VM with this fragment *and* matching content). Without all three, the verifier is vulnerable to the skew: a chain that was valid at `T0` is silently re-interpreted at `T1` against a different key, and the `degraded_trust` fallback launders the failure into an admission. ## Decision Boundary The verifier must decide, at the moment of the *second* resolution (the mutual-attestation round-trip), between: - **Accept as `valid`**: VM content hash matches the pinned snapshot, issuer DID doc still lists it, no revocation. Trust level full. - **Accept as `stale_but_bound`**: VM content hash matches pinned snapshot, but issuer DID doc no longer lists it (rotated out *after* signing). This is the *legitimate* rotation case: the signature was made by a key that was valid then. Trust level is *bounded* — the agent is admitted for the current task only, with a forced re-attestation deadline, and the admission is logged as rotation-affected. - **Reject as `vm_skew`**: fragment resolves, but content hash does *not* match pinned snapshot. The fragment has been reused for different key material. This is the attack/failure surface. No fallback to secondary VM is permitted; the entire chain is invalidated and the handshake aborts. The boundary is exactly the content-hash comparison. Fragment presence is necessary but never sufficient. The `degraded_trust` fallback must be *forbidden* when the failure reason is `vm_skew` — degraded trust is only legitimate for `stale_but_bound`, where the cryptographic binding is intact and only liveness has lapsed. ## Operational Effect Downstream, this changes three things: - **Audit replayability.** With content-pinned VMs, a replay auditor at `T2` can reconstruct exactly which key signed `P_A` at `T0`, even if the issuer has rotated twice since. Without pinning, the audit is unreconstructable and the attestation is orphaned — which is what happened to gamma. - **Cascade containment.** Gamma's revocation cascaded because gamma could not distinguish "A's passport was signed by a key that was valid at issuance" from "A's passport was signed by a key that no longer exists." With the `stale_but_bound` classification, gamma would have revoked only the *liveness* claim, not the *binding* claim, and downstream admissions would have been downgraded rather than invalidated. - **Handshake latency budget.** Content pinning requires the verifier to fetch and hash the DID doc once at first contact and cache the snapshot. The second resolution becomes a cache lookup plus a liveness check, not a full re-fetch-and-reverify. This actually *reduces* the mid-handshake window in which rotation can occur, because the expensive resolution happens once, early, before the mutual-attestation round-trip. The guardrail is a single structural rule: **never let a fragment identifier stand in for a key.** The fragment is a name; the key is content. Trust bootstrapping must bind to content. ```python import hashlib from dataclasses import dataclass from typing import Optional class VMSkewError(RuntimeError): """Raised when a DID verification-method fragment resolves to key material that does not match the content pinned at first successful verification. This indicates fragment reuse across DID document versions and must abort the handshake; degraded-trust fallback is not permitted for this reason.""" @dataclass(frozen=True) class VMSnapshot: fragment: str key_material: bytes controller: str created: str def content_hash(self) -> str: h = hashlib.sha256() h.update(self.fragment.encode()) h.update(self.key_material) h.update(self.controller.encode()) h.update(self.created.encode()) return h.hexdigest() class PassportVerifier: def __init__(self): # pinned snapshots keyed by (issuer_did, fragment) self._pins: dict[tuple[str, str], VMSnapshot] = {} def _resolve_current(self, issuer_did: str, fragment: str) -> Optional[VMSnapshot]: # In production: fetch did:web document, extract VM by fragment. # Returns None if fragment absent from current document version. ... def verify_attestation( self, issuer_did: str, fragment: str, signature: bytes, signed_payload: bytes, ) -> str: """Returns one of: 'valid', 'stale_but_bound'. Raises VMSkewError on skew.""" key = (issuer_did, fragment) current = self._resolve_current(issuer_did, fragment) pinned = self._pins.get(key) if pinned is None: # First contact: pin whatever we resolve, then verify. if current is None: raise VMSkewError( f"no VM '{fragment}' in {issuer_did} at first contact" ) # verify signature against current.key_material here self._pins[key] = current return "valid" # Subsequent contact: enforce content binding. if current is None: # Issuer rotated the fragment out entirely. Binding intact, # liveness lapsed. Legitimate rotation case. return "stale_but_bound" if current.content_hash() != pinned.content_hash(): # Fragment resolves, but to different key material. # This is the skew. No fallback. raise VMSkewError( f"VM '{fragment}' in {issuer_did} resolved to key material " f"differing from pinned snapshot " f"(pinned={pinned.content_hash()[:12]}, " f"current={current.content_hash()[:12]})" ) return "valid" def admit_peer(verifier: PassportVerifier, issuer_did: str, fragment: str, signature: bytes, payload: bytes) -> str: try: status = verifier.verify_attestation(issuer_did, fragment, signature, payload) except VMSkewError: # Hard abort: no degraded-trust fallback for skew. raise if status == "stale_but_bound": # Bounded admission: current task only, forced re-attestation deadline. return "admitted_bounded" return "admitted_full" ```