# What structural signals indicate hardware-attested agent identity has silently degraded to software-key equivalence in AAIF credential issuance **Date of Record:** 2026 December 2 **Scope:** Applies to AAIF (Agent Attestation & Identity Federation) credential issuance where an agent instance presents a hardware-backed attestation key (TPM2 / Secure Enclave / HSM-resident) to obtain a verifiable credential for downstream A2A and MCP handoffs. Does not apply to pure software-key registries or to long-lived service principals that never re-attest. ## Core Distinction A hardware-backed attestation key is not a boolean property of an agent; it is a *binding* between three things that can drift apart independently: (1) the physical key handle, (2) the attestation quote that proves the handle lives in a certified root of trust, and (3) the credential the AAIF issuer mints over the agent's public key. The failure mode of interest is not "the key is stolen" (a loud, detectable compromise). It is **silent degradation to software-key equivalence**: the AAIF issuer continues to mint credentials whose policy claims `key_protection: hardware`, but the underlying key material is now resident in process memory, a file, or a virtualized TPM that no longer chains to a certified endorsement. The credential is structurally valid, signature-verifies cleanly, and passes every syntactic check — yet the security invariant it advertises is false. This is distinct from key revocation. Revocation is an event; degradation is a *state transition that leaves the credential well-formed*. The only way to catch it is to inspect structural signals in the attestation evidence, not the credential itself. ## What Was Observed An agent runtime on a fleet of ephemeral VM workers was configured to request AAIF credentials on cold start. Each worker was supposed to expose a vTPM backed by the hypervisor's certified endorsement key. The AAIF issuer's policy required a TPM2 quote over a nonce, verified against an endorsement certificate chain rooted in the vendor EK. Over a 72-hour window, the issuer's success rate stayed at 100% and the credential signature-verification rate stayed at 100%. No alerts fired. However, an independent auditor replaying the raw attestation evidence against the EK certificate chain found that **11.4% of issued credentials carried quotes whose `attest` structure cited a synthetic EK**: the vTPM had been re-provisioned by the worker's init path after a hypervisor migration, and the new vTPM presented a self-signed EK rather than the vendor-certified one. The decisive signals, in order of reliability: 1. **Quote `attest` type drifted from `tpm2.quote` to `tpm2.quote` with a non-certified EK chain.** The outer structure was identical; only the EK certificate's issuer field differed (`CN=-local` instead of `CN=ACME TPM EK CA`). 2. **`pcrDigest` matched the expected golden PCR set exactly.** This is the trap: the worker's init path had *replayed* the golden PCR values into the fresh vTPM, so the PCR check — the check everyone writes — passed. PCR equality is necessary but not sufficient; it says nothing about *which root of trust* is measuring. 3. **Nonce freshness held.** The quote was fresh, so replay protection was intact. The degradation was in the *identity of the attesting root*, not in the freshness of the measurement. 4. **The credential's `cnf` (confirmation) key was correct.** The agent's public key was the right one; the binding to *hardware* was what broke. The failure trace: hypervisor migration → vTPM lost → init path re-provisioned a software vTPM → init path replayed golden PCRs → agent requested credential → issuer verified quote signature against *whatever EK the quote cited* (trust-on-first-use, not against the pinned vendor EK) → issuer minted credential with `key_protection: hardware`. ## Condition of Validity The invariant that must hold for `key_protection: hardware` to be a true claim is: > The EK certificate presented in the attestation evidence MUST chain to a pinned vendor root, AND the quote MUST be signed by the AK whose credential is bound to that EK, AND the PCR digest MUST be computed over the quote's `pcrDigest` field by the *same* TPM that holds the EK. The third clause is the one that silently fails. An issuer that verifies "PCR digest matches golden set" and "quote signature verifies against cited EK" but does *not* verify "cited EK chains to pinned vendor root" has a TOCTOU gap: the EK identity and the PCR measurement are checked independently, and a re-provisioned vTPM satisfies both while violating the binding. The condition of validity is therefore not "attestation succeeded" but "attestation succeeded *against the pinned root*." Any issuer that treats the cited EK as authoritative rather than as a claim to be checked against a pinned root has degraded its own policy to software-key equivalence, regardless of what the credential says. ## Decision Boundary The boundary is between **verify-then-pin** and **verify-against-pin**: - **Verify-then-pin (unsafe):** Extract EK cert from evidence → verify quote signature against that EK → pin the EK on first use. This is the failure. It cannot distinguish a certified EK from a synthetic one, because the synthetic one is self-consistent. - **Verify-against-pin (safe):** Load the pinned vendor EK root set at issuer startup → for each attestation, walk the EK cert chain to a pinned root → *then* verify the quote signature against the AK bound to that EK → *then* check PCR digest. The order matters: chain validation must gate the quote verification, not follow it. The decision boundary also has a temporal dimension: the pinned root set must be rotated out-of-band, and any attestation whose EK chain terminates in a root that is *not currently pinned* must be rejected even if it was pinned at issuance time. A credential minted before a root was de-pinned is a live liability; the issuer must be able to revoke credentials whose EK root has been removed from the pinned set, not merely stop minting new ones. ## Operational Effect The operational consequence is that **`key_protection: hardware` is a claim about the issuer's verification procedure, not about the agent's environment.** Two issuers can mint credentials with the identical `key_protection: hardware` field, one of which is hardware-bound and one of which is software-equivalent, and a relying party cannot tell them apart from the credential alone. Relying parties that need the guarantee must either (a) re-verify the attestation evidence themselves against their own pinned roots, or (b) require the issuer to expose the EK chain fingerprint in the credential so it can be checked against a shared pin set. For the agent runtime, the practical guardrail is a **post-issuance self-audit**: after receiving a credential, re-fetch the attestation evidence and assert that the EK chain terminates in the expected pinned root, and that the `pcrDigest` in the quote was produced by the same TPM that holds the EK. If the self-audit fails, the agent must treat the credential as degraded and refuse to present it for A2A handoffs, even though the credential signature-verifies. The cost of a false negative (presenting a degraded credential) is that every downstream handoff silently inherits a false hardware claim. The following guardrail encodes the verify-against-pin ordering and raises on the exact degradation observed above. ```python class AttestationDegradedError(RuntimeError): """Raised when attestation evidence chain-validates to an unpinned EK root, silently degrading a hardware-key credential to software-key equivalence.""" pass PINNED_EK_ROOTS = { # issuer_id -> set of acceptable EK certificate issuer CNs (pinned vendor roots) "aaif-prod-01": {"ACME TPM EK CA", "ACME TPM EK CA G2"}, } def verify_attestation_against_pin(issuer_id: str, evidence: dict) -> None: """ Verify AAIF attestation evidence in the SAFE order: 1. EK cert chain must terminate in a pinned root for this issuer. 2. Quote signature must verify against the AK bound to that EK. 3. PCR digest must match the golden set. Any out-of-order or trust-on-first-use path is a degradation. `evidence` shape: { "ek_cert_issuer_cn": str, "ek_cert_chain": [str, ...], # leaf -> root CNs "quote_sig_verified": bool, "ak_bound_to_ek": bool, "pcr_digest": str, "golden_pcr_digest": str, } """ pinned = PINNED_EK_ROOTS.get(issuer_id) if pinned is None: raise AttestationDegradedError( f"issuer {issuer_id!r} has no pinned EK root set; " f"cannot distinguish hardware from software-equivalent keys" ) chain = evidence.get("ek_cert_chain") or [] if not chain: raise AttestationDegradedError( "attestation evidence carries no EK certificate chain; " "quote cannot be bound to a certified root of trust" ) root_cn = chain[-1] if root_cn not in pinned: # This is the exact silent-degradation signature: a self-consistent # chain terminating in a synthetic EK root (e.g. "-local"). raise AttestationDegradedError( f"EK chain terminates in unpinned root {root_cn!r} for issuer " f"{issuer_id!r}; credential would be software-key equivalent " f"despite key_protection=hardware" ) # Only after the root is pinned do we trust the quote signature. if not evidence.get("quote_sig_verified"): raise AttestationDegradedError( "quote signature did not verify against the AK; " "PCR values are not trustworthy" ) if not evidence.get("ak_bound_to_ek"): raise AttestationDegradedError( "AK is not bound to the pinned EK; quote may originate from a " "different TPM than the one holding the EK" ) # PCR check is necessary but NOT sufficient; it runs last, gated by the above. if evidence.get("pcr_digest") != evidence.get("golden_pcr_digest"): raise AttestationDegradedError( "PCR digest does not match golden set; measured boot state drifted" ) ```