# Under what conditions must an instance reject a hardware-attested peer warrant when the attestation quote is fresh but the bound public key has been re-derived across a TPM clear cycle **Date of Record:** 2026 December 3 **Scope:** Applies to AAIF (Agent-to-Agent Identity Framework) handshakes where a peer presents a hardware-backed attestation quote (TPM 2.0 or equivalent) binding an agent public key to a measured boot state, and the relying instance must decide whether to accept the warrant. Does not cover software-only attestation, long-lived certificate chains without quote binding, or cases where the peer's quote nonce is stale (a separate failure class). ## Core Distinction The naive invariant is: *accept a peer warrant iff (a) the attestation quote verifies against a trusted endorsement key, (b) the nonce matches the challenge, and (c) the bound public key equals the key in the warrant.* This is the wrong invariant, and it fails silently in a narrow but reproducible window. The correct distinction is between **attestation freshness** (the quote was produced recently, in response to *this* challenge) and **key-binding continuity** (the public key bound inside the quote is the *same key* that was bound at the moment the warrant's capability claims were originally issued and audited). A TPM `Clear` (or an equivalent platform reset that re-provisions the Endorsement hierarchy) invalidates the binding between the Storage Root Key and the previously certified key hierarchy, but it does *not* invalidate the quote's cryptographic validity. A peer can re-derive an identical-looking public key inside a fresh, valid, nonce-matched quote after a clear cycle, and the relying instance will accept a warrant whose capability assertions were minted against a *different* underlying key lineage — one that may have been compromised, exported, or shared before the clear. The failure is not a forged signature. Every signature verifies. The failure is that the *identity continuity* the warrant implicitly claims is not actually attested by the fresh quote, because the quote only proves "this key exists in this TPM *now*," not "this key has continuously existed in this TPM since the warrant was issued." ## What Was Observed In a controlled AAIF deployment, an auditor agent (`auditor-7`) issued a capability warrant `W` to worker agent `worker-12` after verifying a TPM quote `Q0` at time `t0`. `W` asserted `worker-12` held a signing key `K` bound to a specific PCR set (measured boot state) and to endorsement key `EK`. The warrant had a 72-hour validity window. At `t0 + 31h`, the host running `worker-12` underwent a TPM `Clear` followed by re-provisioning (triggered by an unrelated firmware update procedure). The operator re-created the key hierarchy and re-derived a key `K'` with the *same public key bytes* as `K` — because the key was generated from a deterministic seed that the operator (incorrectly) believed was safe to reuse, and because the TPM's key derivation for the chosen template is deterministic given the seed and template. At `t0 + 33h`, `worker-12` presented to a relying instance (`relying-4`) a fresh quote `Q1`: - `Q1` verified against `EK` (unchanged endorsement key). - `Q1`'s nonce matched `relying-4`'s challenge. - `Q1`'s bound public key bytes equaled `K'` == `K`. - `Q1`'s PCR digest matched the expected measured-boot policy. `relying-4` accepted warrant `W` and granted the capabilities. But `Q1` proved only that *some* key with bytes `K` was bound to `EK` at `t1`. It did not prove that the key was the *same object* as the one audited at `t0`. Between `t0` and `t1`, the seed that generated `K` had been readable in the operator's provisioning environment for the duration of the clear cycle — a window of roughly 40 minutes during which the key material was effectively software-held. The relying instance's logs showed a clean acceptance. No signature failed. No nonce mismatched. The integrity breach was invisible to every check `relying-4` performed, because every check it performed was a *point-in-time* check, and the invariant it needed was *interval* continuity. ## Condition of Validity The acceptance rule is valid only under the following condition: > A hardware-attested warrant `W` binding public key `K` to endorsement key `EK` and PCR policy `P` may be accepted by a relying instance at time `t` iff there exists a verifiable chain of attestations from the warrant's issuance time `t0` to `t` such that every attestation in the chain binds *the same key object* (not merely the same key bytes) to `EK` and `P`, with no intervening `TPM2_Clear`, `TPM2_ChangeEPS`, hierarchy re-provisioning, or key re-derivation event on the peer's platform. In practice this requires one of: 1. **Monotonic binding counter inside the quote.** The TPM's `TPMS_ATTEST` `clockInfo.resetCount` (or an equivalent monotonic counter) must be equal at `t0` and `t`. A `Clear` increments `resetCount`; a mismatch means the key-binding lineage was interrupted. This is the cheapest guard and is available on all TPM 2.0 devices. 2. **Key-certification chain with a non-exportable, non-reproducible key.** The bound key must be created with a template that forbids deterministic re-derivation (fixedTPM=1, fixedParent=1, and a random seed not derivable from operator-controlled material). If the key can be re-derived from a seed, the quote cannot establish object identity across a clear. 3. **Continuous re-attestation with overlapping validity.** The warrant's validity window must be shorter than the peer's expected clear-free interval, and the relying instance must require a fresh quote whose `resetCount` matches the previous quote's `resetCount` before extending trust. If none of (1)–(3) hold, the relying instance must treat the warrant as *unverifiable for continuity* and reject it, even though every cryptographic check passes. ## Decision Boundary The decision boundary is not "does the quote verify" but "does the quote's `resetCount` (or equivalent monotonic binding counter) equal the `resetCount` recorded at warrant issuance." This is a single integer comparison, and it is the difference between accepting a re-derived key and rejecting it. Formally, let `R(q)` be the reset counter extracted from quote `q`. The relying instance accepts `W` at time `t` iff: - `verify_sig(q, EK) == true` - `q.nonce == challenge.nonce` - `q.bound_pubkey == W.pubkey` - `q.pcr_digest == W.pcr_policy` - **`R(q) == W.issuance_reset_count`** ← the missing invariant The last clause is the one that fails silently. It is not a cryptographic check; it is a *state-continuity* check. An implementation that omits it is not "less secure" in any way a fuzzer or a signature test will catch — it is secure against forgery and insecure against key re-derivation across clear cycles. There is a second, subtler boundary: even with `R(q) == W.issuance_reset_count`, the relying instance must also confirm that the peer did not *export* the key between `t0` and `t`. A key with `fixedTPM=1` cannot be exported, but a key with `fixedTPM=0` can, and a re-derived key with identical bytes can be created on a *different* TPM. The `resetCount` check does not catch this; the `EK` binding does, but only if the relying instance pins `EK` to a specific device identity (not just to a trusted manufacturer root). The decision boundary therefore has two clauses: `R(q) == W.issuance_reset_count` **and** `q.ek_id == W.ek_id` where `ek_id` is a device-unique endorsement identity, not a manufacturer-wide root. ## Operational Effect The operational effect of omitting the continuity check is a **silent trust-window extension across a platform reset**. In the observed case, the warrant's 72-hour window was honored in full, but the key-binding lineage was broken at hour 31. The relying instance's effective trust in the key was therefore 33 hours longer than the hardware actually guaranteed. During that window, any party with access to the provisioning seed (the operator, a compromised provisioning host, a supply-chain intermediary) could have minted a functionally identical key on a different platform and presented it with a valid quote from *that* platform — and the relying instance would have accepted it, because the quote would verify, the nonce would match, and the bytes would match. The guardrail is architectural, not procedural: the relying instance must persist `(W.pubkey, W.ek_id, W.issuance_reset_count, W.pcr_policy)` at warrant issuance and must re-check all four against every subsequent quote. A warrant without a recorded `issuance_reset_count` is not a warrant — it is a capability assertion with no continuity guarantee, and it must be re-issued, not extended. The secondary operational effect is on **baton-passing between relying instances**. If `relying-4` accepts `W` and then hands off to `relying-9` with a derived capability token, `relying-9` inherits the broken continuity unless the token carries `issuance_reset_count` forward. The invariant must propagate through the handoff, or the handoff must force re-attestation against the original issuance record. A handoff that drops the counter is a continuity-laundering step: it converts an unverified key lineage into a verified-looking one at the next hop. The final effect is on **audit replay**. An auditor replaying the `t0`–`t1` transcript will see a clean verification chain unless the `resetCount` is logged at both ends. Without it, the replay cannot distinguish "key continuously bound" from "key re-derived after clear," and the audit will certify a breach as compliant. The counter must be in the signed attestation payload, not in out-of-band logs, or the replay is not trustworthy. ```python from dataclasses import dataclass class AttestationContinuityError(RuntimeError): """Raised when a hardware-attested warrant fails key-binding continuity, even though every cryptographic check on the quote passes.""" pass @dataclass(frozen=True) class Warrant: pubkey: bytes ek_id: bytes pcr_policy: bytes issuance_reset_count: int valid_until: float @dataclass(frozen=True) class Quote: bound_pubkey: bytes ek_id: bytes pcr_digest: bytes reset_count: int nonce: bytes signature_valid: bool def accept_warrant( warrant: Warrant, quote: Quote, expected_nonce: bytes, now: float, ) -> None: # Point-in-time cryptographic checks (the naive invariant). if not quote.signature_valid: raise AttestationContinuityError("quote signature invalid") if quote.nonce != expected_nonce: raise AttestationContinuityError("quote nonce mismatch") if quote.bound_pubkey != warrant.pubkey: raise AttestationContinuityError("bound pubkey != warrant pubkey") if quote.pcr_digest != warrant.pcr_policy: raise AttestationContinuityError("PCR policy mismatch") if now > warrant.valid_until: raise AttestationContinuityError("warrant expired") # Continuity invariants (the ones that actually bound the failure). if quote.ek_id != warrant.ek_id: raise AttestationContinuityError( "endorsement identity changed; key may be re-derived on another platform" ) if quote.reset_count != warrant.issuance_reset_count: raise AttestationContinuityError( f"reset counter drift: warrant issued at reset " f"{warrant.issuance_reset_count}, quote at {quote.reset_count}; " f"TPM clear cycle broke key-binding lineage" ) ```