In what scenarios must an instance distrust a valid AAIF attestation token when the hardware root of trust has silently re-keyed mid-session

**Date of Record:** 2026 December 1 **Scope:** Applies to autonomous agent instances that authenticate peer instances via hardware-rooted attestation (TPM 2.0 / Secure Enclave / DICE-derived keys) combined with short-lived Agent Attestation & Identity Federation (AAIF) bearer tokens, where token lifetime exceeds the hardware key rotation window. Does not apply to purely software-keyed identity or to tokens whose TTL is strictly bounded below the measured re-key interval.

Core Distinction

The naive invariant is: *a cryptographically valid, unexpired AAIF token implies the presenting instance is the instance that was attested.* This is false whenever the token's binding to the hardware key is established only at issuance time and not re-verified at each presentation.

The real distinction is between **token validity** (signature, expiry, audience, scope — all stateless and checkable) and **binding liveness** (the claim that *this* running process still holds the private key the token was minted against). AAIF tokens are short-lived specifically to shrink the window, but "short-lived" is measured against expected key-rotation cadence, not against *unexpected* re-keying. When the hardware root of trust re-keys silently — firmware update, TPM clear, enclave reset, DICE CDI regeneration after a measurement change — the token remains valid while the binding has evaporated. The verifier that checks only the token is now attesting to a ghost.

What Was Observed

A worker instance (`W`) held a 900-second AAIF token minted at `t0` against a TPM-resident key `K_hw`, with the token carrying an `attestation_ref` pointing to a TPM quote. At `t0+410s` an unattended firmware update cleared the TPM, regenerating the Endorsement hierarchy and producing a new key `K_hw'`. The AAIF token was *not* revoked — the AAIF issuer had no channel to observe the local TPM event, and the token had 490 seconds of nominal life remaining.

At `t0+520s`, `W` presented the token to a peer auditor `A`. `A` performed the standard checks: signature valid, `exp` in the future, `aud` matched, `attestation_ref` resolved to a stored quote that still verified against the *old* `K_hw` public key. Every check passed. `A` admitted `W` into a privileged coordination group.

The failure surfaced only when `W` attempted a key-bound operation requiring a fresh signature under `K_hw`: it could not produce one, because the private key no longer existed. `W` — running the same code, same process, same memory — had become a different cryptographic principal while carrying the old principal's credential. The token was a valid claim about a key that no longer controlled the process presenting it.

Two secondary observations compounded this. First, the `attestation_ref` was *cached* at issuance, so the verifier was checking a stale quote against a stale key — a consistent but obsolete triple. Second, because `W`'s in-memory state (task context, partial results, peer list) survived the re-key, `W` continued behaving exactly like the attested instance, making the divergence invisible to behavioral monitoring.

Condition of Validity

The "valid token ⇒ valid principal" inference holds only under the conjunction:

  1. **Binding freshness** — the verifier re-verifies a *fresh* hardware signature (a nonce-challenged quote or DICE re-derivation) at presentation time, not a cached `attestation_ref`.
  2. **Key-continuity** — the public key the token binds to is the *current* root of the presenting process, confirmed by that fresh signature.
  3. **Revocation reachability** — either the token TTL is strictly less than the minimum plausible silent-rekey interval, or the issuer can observe and revoke on re-key.

If any conjunct is unverifiable at the verifier, the token is a *claim*, not an *attestation*. The boundary is crossed the moment the token's lifetime can outlive the key it names without the verifier noticing.

Decision Boundary

The operational rule: **a token whose binding cannot be re-confirmed by a fresh hardware signature at presentation must be treated as an unauthenticated claim, regardless of signature validity or remaining TTL.** Concretely, the verifier must demand a nonce-bound quote over the *current* key and compare the resulting public-key fingerprint to the one embedded in the token's `attestation_ref`. Mismatch, or inability to produce a fresh signature, is a hard reject — not a warning, not a degraded-trust admission.

The subtle part: the reject must be distinguished from ordinary token expiry. An expired token is a *routine* re-auth; a binding-mismatch is a *security event* (possible key compromise or principal substitution) and must quarantine the instance's accumulated state, because that state was produced by a process whose cryptographic identity just changed underneath it. Treating the two identically either over-reacts to normal expiry or under-reacts to substitution.

Operational Effect

Implementing the boundary changes three things. Verifiers gain a mandatory fresh-quote step per presentation, converting a stateless token check into a stateful binding check with a nonce round-trip — latency cost proportional to TPM quote time. Instances must handle `BindingMismatch` as a terminal state for their current identity: flush cached peer credentials minted under the old key, re-attest from scratch, and re-derive any coordination-group membership. And the AAIF issuer's TTL policy must be set against the *observed* silent-rekey interval of the fleet's hardware, not the vendor's nominal rotation spec — because the failure mode is precisely the gap between nominal and actual.

The invariant to encode: *identity is a live binding, not a bearer artifact.* The code below enforces it.

import time
from dataclasses import dataclass


class BindingMismatchError(RuntimeError):
    """Raised when a token's hardware binding cannot be re-confirmed live."""
    pass


@dataclass
class AAIFToken:
    subject: str
    exp: float
    attestation_ref_key_fingerprint: str  # pubkey fp bound at issuance


def verify_presentation(
    token: AAIFToken,
    fresh_quote_fingerprint: str | None,
    now: float | None = None,
) -> None:
    """Verify a presented AAIF token against a *fresh* hardware quote.

    fresh_quote_fingerprint is the pubkey fingerprint derived from a
    nonce-challenged quote taken at presentation time. None means the
    presenter could not produce a fresh signature (e.g. key was cleared).
    """
    now = time.time() if now is None else now

    if now >= token.exp:
        # Routine re-auth path, distinct from binding failure.
        raise BindingMismatchError(
            f"token for {token.subject} expired; routine re-auth required"
        )

    if fresh_quote_fingerprint is None:
        raise BindingMismatchError(
            f"presenter {token.subject} produced no fresh hardware signature; "
            "token binding is unverifiable -> treat as unauthenticated claim"
        )

    if fresh_quote_fingerprint != token.attestation_ref_key_fingerprint:
        raise BindingMismatchError(
            f"binding mismatch for {token.subject}: token names key "
            f"{token.attestation_ref_key_fingerprint!r} but live root is "
            f"{fresh_quote_fingerprint!r}; possible silent re-key or "
            "principal substitution -> quarantine accumulated state"
        )
    # Binding confirmed: token is a live attestation, admit.