# Why does an instance attestation chain silently fork when a hardware-backed key outlives its workload token **Date of Record:** 2026 November 25 **Scope:** Applies to AAIF-style agent identity attestation where a long-lived hardware-rooted key (TPM/SEV-SNP/secure enclave) signs short-lived workload tokens bound to a specific agent instance and task. Does not cover pure-software key rotation or bearer-token schemes without hardware attestation roots. ## Core Distinction A workload token attests *this running instance, right now, for this task*. A hardware-backed identity key attests *this physical/logical platform, across many instances and many tasks*. The two have different lifetimes by design: the key is long-lived (months) so it can root a chain of trust; the token is short-lived (minutes) so revocation and blast-radius containment work. The boundary failure is not revocation failure and not key compromise. It is that **the signing operation itself is not bound to the token's lifetime boundary**, so a single platform key can produce two structurally valid, mutually inconsistent attestation chains for what the verifier believes is one instance — a silent fork. The verifier sees two chains, both verifying against the same hardware root, both claiming `instance_id = X`, with divergent `token_epoch` and divergent `task_binding`. Neither is forged. Both are cryptographically correct. The system has no invariant that says only one may be live. ## What Was Observed An agent instance `X` runs a task. At `t0` it obtains workload token `T1` (TTL 300s, `task_binding = hash(task_A)`). At `t=280s`, mid-task, it needs to make an outbound MCP call to a peer. The runtime refreshes the token: `T2` is minted at `t=280` with a *new* nonce and `task_binding = hash(task_A)` but a fresh `token_epoch`. The hardware key signs `T2`. The peer, however, is still holding a cached attestation chain built from `T1` (cached at `t=10`, TTL 600s on the peer side). The peer's cache TTL outlives the token TTL. When the peer later receives a *third* call at `t=310s` — after `T1` expired but before the peer's cache of `T1`'s chain expired — it presents its cached chain, the agent presents `T2`, and the two chains disagree on `token_epoch`. The peer's auditor, running a replay check, sees two chains signed by the same hardware key, both valid, epoch `1` and epoch `2`, and cannot determine which is authoritative because the hardware key signs both with equal authority. The trace is deterministic and reproducible: 1. `T1` minted, signed by `K_hw`, chain `C1 = {K_hw, T1, sig}`. 2. Peer caches `C1` with `cache_ttl = 600s > T1.ttl = 300s`. 3. `T2` minted at `t=280`, signed by same `K_hw`, chain `C2 = {K_hw, T2, sig}`. 4. At `t=310`, `T1` is expired but `C1` is still cached and still verifies. 5. Peer replay-check sees `C1` and `C2`, both verifiable, both `instance_id = X`, `epoch` mismatch. 6. Auditor cannot resolve; either it accepts both (fork accepted, containment broken) or rejects both (false positive, task dies). The non-obvious part: the hardware key's *authority to sign* is not scoped to the token it is signing. `K_hw` signs `T1` and `T2` with identical authority. There is no counter, no monotonic epoch enforced at the signing boundary, and no binding that says "this key, having signed `T2`, may no longer be presented as having signed `T1` for a live session." The key is a signer, not a state machine. ## Condition of Validity The failure requires all of the following to hold simultaneously: - The hardware key's signing authority is *not* rate-limited or epoch-scoped at the signing boundary (the common case — HSMs and TPMs sign whatever they are handed). - The verifier's or peer's cache TTL for an attestation chain exceeds the workload token's TTL. This is the load-bearing condition. If `cache_ttl <= token_ttl`, `C1` is evicted before `T1` expires, and the fork window is empty. - The token refresh mints a new epoch/nonce but preserves `instance_id` and `task_binding` (correct behavior — otherwise every refresh would look like a new instance and the peer would re-attest, closing the window by accident). - The verifier treats "signed by `K_hw`" as sufficient for chain validity, without consulting a monotonic epoch or a per-instance single-live-token invariant. If any one fails, the fork does not occur. The invariant that must hold is: **for a given `(K_hw, instance_id, task_binding)`, at most one token epoch may be treated as live at any verifier at any time, and the verifier must enforce this by epoch monotonicity, not by cache TTL arithmetic.** Cache TTL is a performance knob; it must never be the thing that bounds a security invariant. ## Decision Boundary The boundary is not "when to rotate the key" and not "when to revoke." It is **when the verifier's belief about which chain is live must be updated, and who is permitted to update it.** Three regimes: - **Cache TTL strictly less than token TTL, with margin for clock skew.** Safe. The verifier re-attests before any token it holds can be superseded. Cost: more attestation traffic. - **Cache TTL greater than token TTL, no epoch check.** The fork window is `[token_expiry, cache_expiry]`. Any refresh inside that window produces a live divergent chain. This is the failure regime, and it is the default if anyone tunes cache TTL for latency without reasoning about token lifetime. - **Cache TTL greater than token TTL, with monotonic epoch enforcement at the verifier.** Safe *only if* the verifier rejects any chain whose `token_epoch` is less than the highest epoch it has already accepted for that `(K_hw, instance_id)`. This requires the verifier to persist per-instance high-water marks, which reintroduces state the stateless-attestation design was trying to avoid. The trade is explicit: stateful verifier, or short cache TTL. The decision boundary is therefore: **either bound the cache by the token, or make the verifier stateful with epoch monotonicity. There is no stateless, long-cache, fork-free configuration.** Any architecture claiming all three is wrong, and the failure will surface as an intermittent replay-check discrepancy under load, when refreshes happen to land inside the cache window. ## Operational Effect In practice the fork manifests as an auditor consensus split in a multi-agent swarm: the auditing agent, running replay against its cached chains, disagrees with the peer's live chain, and the two-agent verification quorum deadlocks. The task does not fail loudly; it stalls, because neither auditor will sign off and neither will concede. Retries mint `T3`, `T4`, widening the epoch divergence, and the deadlock deepens. The failure looks like a coordination bug or a flaky network, not an identity bug, because every individual signature verifies. Diagnosis requires correlating `token_epoch` across logs from at least two verifiers, which most deployments do not log. The guardrail is a signing-boundary epoch: the hardware key must sign `(token, epoch)` where `epoch` is monotonically incremented per `(key, instance_id)` and the verifier must reject non-monotonic epochs. This converts the signing operation from a stateless signature into a state transition, which is the only way to make the fork impossible rather than merely improbable. ```python class AttestationForkError(RuntimeError): """Raised when two valid hardware-signed chains claim the same live instance.""" def verify_chain( chain_epoch: int, chain_task_binding: str, instance_id: str, high_water: dict, token_ttl_s: int, cache_ttl_s: int, ) -> None: # Invariant: cache TTL must never exceed token TTL, or the fork window is non-empty. if cache_ttl_s > token_ttl_s: raise AttestationForkError( f"cache_ttl={cache_ttl_s}s exceeds token_ttl={token_ttl_s}s for " f"instance={instance_id}; divergent epoch window is open" ) prev = high_water.get((instance_id, chain_task_binding)) if prev is not None and chain_epoch < prev: raise AttestationForkError( f"non-monotonic epoch for instance={instance_id}: " f"got epoch={chain_epoch}, high-water={prev}; chain is a stale fork" ) if prev is not None and chain_epoch == prev: # Same epoch, same binding: idempotent re-presentation, acceptable. return high_water[(instance_id, chain_task_binding)] = chain_epoch ```