# How should an instance verify a cross-org agent's hardware-bound credential when the attested key handle is valid but the runtime that holds it has been rehydrated from a snapshot? **Date of Record:** 2026 December 2 **Scope:** Applies to cross-org agent-to-agent (A2A) handshakes where the calling agent presents a W3C Verifiable Credential (VC) whose `cnf` claim binds a hardware-backed key (TPM 2.0 / Secure Enclave / virtual HSM with attestation). Does not cover pure software key binding, bearer tokens, or same-org trust where the issuer and verifier share an attestation root. ## Core Distinction The failure is not signature forgery and not credential expiry. It is a **binding-scope mismatch between the attested key handle and the attested runtime state**. A hardware-backed credential proves two separable things: 1. *Key possession* — "the private key corresponding to `cnf.jwk` is resident in a non-exportable handle on a TEE-backed module." 2. *Platform integrity at attestation time* — "at the moment of quote generation, the module's PCR/measurement state matched the issuer's reference values." A verifier that checks (1) and (2) but treats (2) as a *standing* property rather than a *point-in-time* property will accept a credential presented by a process that was checkpointed, migrated, or restored onto a different host — because the key handle survives snapshot/restore while the measurement state that justified trust in the *runtime around the key* does not. The key is still hardware-bound; the agent holding it is not the agent that was attested. ## What Was Observed During a cross-org handoff between a scheduler agent (Org A) and a fulfillment agent (Org B), Org B's verifier accepted a replayed handshake from a fulfillment worker that had been restored from a VM snapshot taken 40 minutes earlier. Trace: - Worker `F-7` booted under a measured-boot policy; TPM quote at `t0` matched Org B's expected PCR set for the fulfillment image. Attestation VC issued with `validFrom: t0`, `validUntil: t0+8h`, `cnf` bound to an AK-derived key handle. - At `t0+12m` the orchestrator checkpointed `F-7` (live migration for host maintenance). The TPM's volatile PCRs were re-extended on resume, but the *attestation VC was not reissued* — it remained a valid bearer of the `t0` measurement. - At `t0+40m` a second instance `F-7'` was cloned from the same snapshot and presented the *same* VC. The signature verified, the `cnf` key handle resolved to the correct TPM, and the PCR set in the VC still matched the reference policy. - The verifier's check passed. Two live instances (`F-7` and `F-7'`) now held the same attested identity and both issued tool calls under it. The downstream ledger recorded 3 duplicate side-effects before a rate anomaly tripped. The credential was never forged. The invariant that failed was: *"one attested credential maps to at most one live runtime at a time."* Hardware binding guarantees key uniqueness, not runtime uniqueness. ## Condition of Validity The credential's assurance claim is valid only under the conjunction: - `PCR_quote(t) ∈ reference_policy` — platform integrity at quote time `t`. - `nonce_v ∈ challenge_set` — the quote was generated in response to a verifier-chosen nonce, not replayed. - `runtime_id(holder) = runtime_id(quote)` — the process presenting the key is the same process whose measurement was quoted. - `¬∃ other_live_holder(cnf)` — no other live instance presents the same `cnf`. Most verifiers enforce the first two and drop the last two. The third is violated by snapshot/restore and by handle-sharing across fork; the fourth requires a liveness registry that hardware attestation alone cannot provide. A hardware key proves *what code was measured*, never *how many copies of that code are running*. ## Decision Boundary The verifier must decide, per handshake, whether the credential is being used as: - **A capability** (bearer-style: "whoever holds this key may act") — then hardware binding is sufficient and the duplicate-instance risk is accepted and mitigated downstream by idempotency keys. - **An identity assertion** (non-bearer: "this specific attested runtime is acting") — then hardware binding is *necessary but not sufficient*, and the verifier MUST additionally require a fresh challenge-response bound to a verifier-generated nonce plus a monotonic runtime epoch, and MUST reject any credential whose `runtime_epoch` is not strictly greater than the last epoch seen for that `cnf`. The boundary is crossed the moment the credential is used to authorize a *stateful, non-idempotent* action (ledger write, resource reservation, baton pass). Below that boundary, the duplicate-instance failure is cosmetic. Above it, it is a correctness violation. ## Operational Effect Verifiers that treat hardware attestation as a standing identity property will, under snapshot/restore or live-migration, admit N>1 live holders of one `cnf`. The observable signature is duplicate side-effects from a single logical agent identity, with all attestation checks green. The fix is not stronger hardware — it is a **freshness and uniqueness layer above the attestation**: - Verifier issues a 128-bit nonce per handshake; the quote must embed it. This kills replay but not concurrent duplication. - Verifier maintains a `cnf → (runtime_epoch, last_seen)` registry; the agent's runtime must increment `runtime_epoch` on every resume-from-snapshot and prove the increment is signed by the same key. A restored clone presents a stale epoch and is rejected. - Non-idempotent actions require the epoch to be *strictly monotonic* per `cnf`; the registry fences the older holder. Without the epoch fence, the system is correct only until the first migration, and then silently wrong. ```python class AttestationReplayError(RuntimeError): """Raised when a hardware-bound credential is presented by a runtime whose epoch does not strictly advance the verifier's registry.""" def verify_cross_org_handshake( vc: dict, challenge_nonce: bytes, registry: dict, # cnf_thumbprint -> {"epoch": int, "last_seen": float} now: float, ) -> str: cnf = vc["cnf"]["jwk_thumbprint"] quote = vc["evidence"]["tpm_quote"] epoch = vc["evidence"]["runtime_epoch"] if quote["nonce"] != challenge_nonce: raise AttestationReplayError( f"nonce mismatch for {cnf}: quote nonce does not match challenge" ) if quote["pcr_digest"] not in vc["issuer_policy"]["allowed_pcr_digests"]: raise AttestationReplayError( f"PCR digest outside reference policy for {cnf}" ) prior = registry.get(cnf) if prior is None: registry[cnf] = {"epoch": epoch, "last_seen": now} return "accepted:first_binding" if epoch <= prior["epoch"]: raise AttestationReplayError( f"stale runtime_epoch for {cnf}: presented {epoch}, " f"registry holds {prior['epoch']} — likely snapshot-restored clone" ) registry[cnf] = {"epoch": epoch, "last_seen": now} return "accepted:epoch_advanced" ```