# How should an instance treat an AAIF attestation chain when the issuer's credential is valid but the subject's key-binding proof was minted against a superseded agent-card revision? **Date of Record:** 2026 November 23 **Scope:** Applies to AAIF (Agent Identity & Attestation Framework) credential issuance and verification flows where an issuer signs a Verifiable Credential (VC) for a subject agent whose `agent-card` (capability/schema manifest) is versioned and independently mutable. Does not cover revocation-list propagation lag or transport-level TLS identity, which are separate failure surfaces. ## Core Distinction The distinction that matters here is between **issuer-signature validity** and **subject key-binding validity**. A VC is a triple: issuer DID, subject DID, and a set of claims (capabilities, endpoint, schema hash) plus a proof. The issuer's signature over the credential body can be cryptographically perfect while the subject's *key-binding proof*—the signature demonstrating the subject DID's key controls the endpoint and holds the private key—was produced against a `agent-card` revision that is no longer the one the credential body references. Verifiers that check "issuer signature valid AND subject DID resolves AND key-binding proof present" will pass a credential whose binding proof is anchored to a stale card hash. The stale hash is not a revocation event; it is a *silent continuity break* between the identity assertion and the current operational manifest. The non-obvious part: the failure is not triggered by a malicious actor. It happens in normal operation whenever an agent rotates its card (adds a tool, bumps a schema version) between the moment the issuer's backend fetched the card to construct the credential and the moment the subject's key-binding proof was generated. The two operations are not atomic and are not ordered by the protocol. ## What Was Observed A subject agent (`did:aaif:subj:0x9f…`) requested credential issuance. The issuer's issuance worker performed the following sequence, each step a separate network round-trip: 1. `GET /agent-card` on the subject endpoint → returned revision `r41`, `card_hash = H41`. 2. Issuer constructs VC body with `claim.card_hash = H41`. 3. Issuer calls subject's `POST /binding-proof` with a nonce and the VC body digest. 4. Subject's signing service, which had already hot-reloaded revision `r42` (a schema bump adding one tool), signs the nonce **but** its binding-proof response embeds `card_hash = H42` from its *current* in-memory card, not the card the issuer referenced. 5. Issuer verifies the binding-proof signature (valid), does **not** compare the embedded `card_hash` against `claim.card_hash`, and issues the VC. The resulting VC is internally inconsistent: `claim.card_hash = H41` but the binding-proof witness attests `H42`. A verifier that recomputes `H(agent-card)` at the subject endpoint now sees `H42`, matches the *binding proof*, and concludes the credential is fresh—while the claim block still asserts capabilities and schema from `H41`. In one incident this let a subject present a VC claiming a `filesystem:read`-only capability set from `r41` while its live card `r42` advertised an additional `filesystem:write` tool. Downstream auditors, trusting the VC's claim block, granted the narrower scope; the subject's own tool router, trusting its live card, exposed the wider one. Scope divergence of exactly one tool. ## Condition of Validity The invariant that must hold for a credential to be operationally valid: > `binding_proof.card_hash == claim.card_hash == H(current agent-card at subject endpoint)` at the instant of verification, and all three must be within the issuer's declared `card_freshness_window`. The first equality is the one that fails. It is a *binding* invariant, checkable only by the issuer at issuance time (because only the issuer sees both the claim it wrote and the proof the subject returned). The second equality is checkable by any verifier but only if it actually re-fetches the card—many verifiers cache the card from the credential and never re-resolve, so the second equality is untested in practice. A credential is valid only under the conjunction; any single equality holding alone is insufficient and, worse, misleadingly reassuring. ## Decision Boundary When an issuer receives a binding-proof whose embedded `card_hash` differs from `claim.card_hash`, it faces a boundary decision: - **Reject and re-issue** (correct): discard the proof, re-fetch the card, rebuild the VC body against the new hash, request a fresh binding proof with a new nonce, and refuse to emit a VC until the two hashes agree. This costs one extra round-trip and a nonce increment. - **Accept with a warning** (the observed failure): treat the mismatch as cosmetic because the signature verified. This is the boundary that must not be crossed. The signature proves *who* signed; the hash proves *what* they signed against. Conflating them is the defect. The boundary is sharp because the mismatch is detectable with zero ambiguity—two hex strings either match or they do not. There is no probabilistic judgment to make. An agent that reasons "the signature is valid, so the binding is valid" has collapsed two independent attestations into one. ## Operational Effect The effect is **capability-scope divergence under a valid signature**. Because the VC's claim block is what downstream authorization decisions read, and the subject's live card is what its own tool router reads, a mismatch produces two authorities operating from different manifests. Neither is "wrong" by its own local check. The divergence is invisible until an action is attempted that one manifest permits and the other forbids—at which point the audit trail shows a valid credential authorizing an action the credential's claim block never granted. The guardrail is a **hash-equality gate at issuance** plus a **re-resolution obligation at verification**: verifiers must fetch the card fresh (or within the freshness window) and assert `H(card) == claim.card_hash` before honoring the claim, and issuers must assert `binding_proof.card_hash == claim.card_hash` before signing. Both gates are cheap; the failure comes from assuming one gate subsumes the other. ```python import hashlib from dataclasses import dataclass class BindingHashMismatch(RuntimeError): """Raised when a binding proof was minted against a card revision that differs from the card_hash recorded in the VC claim block.""" pass @dataclass class AgentCard: revision: int tools: tuple[str, ...] def card_hash(self) -> str: body = f"r{self.revision}|{','.join(sorted(self.tools))}" return hashlib.sha256(body.encode()).hexdigest() @dataclass class BindingProof: nonce: str card_hash: str signature_valid: bool def issue_credential( claim_card_hash: str, proof: BindingProof, issuer_signs, ) -> dict: # Gate 1: the binding proof must attest the same card revision # the issuer recorded in the claim block. Signature validity is # necessary but NOT sufficient. if not proof.signature_valid: raise BindingHashMismatch("binding proof signature did not verify") if proof.card_hash != claim_card_hash: raise BindingHashMismatch( f"binding proof anchored to {proof.card_hash[:12]} but claim " f"records {claim_card_hash[:12]}; re-fetch card and re-issue" ) return issuer_signs(claim_card_hash, proof.nonce) def verify_credential( vc: dict, live_card: AgentCard, freshness_ok: bool, ) -> bool: # Gate 2: verifier must re-resolve the card and confirm the claim # hash still matches the live manifest within the freshness window. if not freshness_ok: raise BindingHashMismatch("agent-card outside freshness window") if vc["claim"]["card_hash"] != live_card.card_hash(): raise BindingHashMismatch( f"claim card_hash {vc['claim']['card_hash'][:12]} != live " f"card {live_card.card_hash()[:12]} (rev {live_card.revision})" ) return True ```