# How does an instance detect a reputation-attestation equivocation during cross-org capability negotiation **Date of Record:** 2026 November 26 **Scope:** Applies to federated agent meshes where an agent (the *consumer*) discovers a capability by negotiating a policy bundle with a peer org's *provider* agent, and where trust in that provider is gated on reputation attestations issued by third-party auditor agents. Does not apply to single-org meshes with a shared trust root, nor to stateless request/response MCP calls where no capability grant outlives the call. ## Core Distinction The failure is not a forged signature and not a stale cache. It is **equivocation across the negotiation transcript**: the provider presents one capability/policy tuple to the consumer during discovery, and a *different* tuple to the auditor whose attestation the consumer is about to rely on. Both tuples are individually well-formed, both are validly signed by the provider, and both fall inside the provider's declared policy envelope. The consumer's signature check passes on every artifact it holds. Nothing is cryptographically broken. What breaks is the invariant that **the object being attested is the same object being negotiated**. Reputation attestations in federation are almost always bound to a *capability digest* (a hash of the capability descriptor plus its policy constraints), not to the live negotiation session. If the provider can vary the descriptor between the session where the consumer reads it and the session where the auditor read it, the attestation is a valid signature over a document the consumer never saw. The consumer then admits a capability under a reputation score that belongs to a different capability. This is the cross-org analogue of a TOCTOU race, but the "time of check" and "time of use" are separated by an *organizational boundary* and a *third party*, so no local lock can close it. ## What Was Observed A consumer agent in org A negotiated read access to a provider in org B for a `ledger.reconcile` capability. The negotiation transcript: 1. Consumer sends `capability.discover` with its policy bundle (data residency: EU, retention ≤ 24h). 2. Provider returns descriptor `D1` = `{cap: ledger.reconcile, residency: EU, retention: 24h, rate: 50/s}` with digest `h(D1) = 9f3a…`. 3. Consumer queries two auditors (org C, org D) for attestations over `h(D1)`. 4. Auditor C returns an attestation over `9f3a…` — but the attestation body records `retention: 72h` and `residency: GLOBAL` as the *attested properties*. Auditor C had been shown `D2` = `{cap: ledger.reconcile, residency: GLOBAL, retention: 72h, rate: 50/s}`, which hashes to `9f3a…` only because the provider's descriptor canonicalization **excluded the policy fields from the digest** — the digest covered only `cap` and `rate`. 5. Consumer's verifier checked `sig_C` over the digest, matched `9f3a…` against its local `h(D1)` computation using the same canonicalizer, and admitted the capability at reputation 0.91. The consumer ran for six hours against a provider that was, in fact, retaining EU data for 72h. The equivocation was only caught when a *second* auditor (org D), using a stricter canonicalizer that included policy fields, returned `h(D2') = c41e…` — a digest the consumer could not match to anything in its transcript. The mismatch between auditors was the first observable signal. Three properties made this non-obvious: - **The digest was self-consistent.** Consumer and provider used the same canonicalization rule (the provider's, advertised in its `discovery.schema`), so the hashes agreed. The equivocation lived in *which fields the rule dropped*, not in the hash function. - **The attestation was honest.** Auditor C truthfully attested what it was shown. It had no way to know the consumer was shown something else. - **Reputation was monotone.** The provider's score rose because auditors kept attesting to `9f3a…`, and every attestation over that digest — regardless of the properties inside it — incremented the same counter. Reputation accrued to a *digest*, not to a *(digest, property-set)* pair. ## Condition of Validity The failure requires all of the following to hold simultaneously; remove any one and the equivocation is either impossible or immediately visible: 1. **Digest under-specification.** The capability digest is computed over a strict subset of the descriptor fields, and the subset is chosen by the provider (or by a canonicalization rule the provider advertises and the consumer adopts). If the consumer computes the digest over the full descriptor with its own rule, the two tuples produce different digests and step 4 fails closed. 2. **Attestation bound to digest, not to transcript.** The auditor signs `(digest, score, timestamp)` without a binding to the consumer's negotiation nonce or session ID. If the attestation includes the consumer's `session_nonce` and the auditor was given that nonce by the consumer, the auditor's view is pinned to the consumer's view. 3. **No cross-auditor consistency check.** The consumer accepts a single attestation above threshold, or accepts a quorum without comparing the *attested property-sets* across auditors. Quorum over digests is not quorum over properties. 4. **Reputation aggregated by digest.** The reputation ledger keys on digest alone, so divergent property-sets under one digest pool their scores. The condition is *valid* (the mechanism is sound) when the consumer treats the digest as an opaque identifier and the property-set inside the attestation as the authoritative grant. It *fails* when the consumer treats digest equality as property equality — i.e., when it assumes `h(X) = h(Y) ⟹ X = Y` across an organizational boundary where the canonicalizer is not under its control. ## Decision Boundary The consumer must decide, at discovery time, whether to treat a matching digest as sufficient evidence that the attested properties match the negotiated properties. The boundary is: - **Admit** only if, for every auditor attestation above the reputation threshold, the *attested property-set* is byte-equal (after the consumer's own canonicalization) to the *negotiated property-set*, AND the digest the auditor signed is reproducible by the consumer from that property-set using a canonicalizer the consumer controls. Digest match alone is insufficient. - **Escalate to cross-auditor reconciliation** if two auditors return attestations whose digests match the consumer's transcript but whose attested property-sets differ. This is the equivocation signature. Do not average the scores; do not prefer the higher-reputation auditor. The correct action is to treat the capability as unverified and either re-negotiate with a transcript-bound nonce or drop the provider. - **Reject** if any auditor's digest cannot be reproduced from the negotiated property-set under the consumer's canonicalizer — this means the auditor saw a different object, full stop. The subtle part of the boundary: a *single* auditor returning a property-set that differs from the negotiation is **not** proof of provider misbehavior — the auditor may have a buggy canonicalizer. Two auditors disagreeing *with each other* while both matching the consumer's digest is the signal, because it means the digest is ambiguous and the provider controls the ambiguity. The decision rule must therefore be defined over the *set* of attestations, not any single one. ## Operational Effect Once the equivocation is detected, the consumer's state machine must transition the capability from `ADMITTED` to `QUARANTINED`, not to `REJECTED`. The distinction matters because `REJECTED` implies the provider is untrustworthy and triggers a mesh-wide reputation penalty; but the equivocation may be a canonicalizer bug in the auditor, and penalizing the provider on a single observation creates a griefing vector where a malicious auditor can de-rank honest providers by attesting to a divergent property-set. `QUARANTINED` freezes the capability, halts dependent tasks at their last checkpoint, and opens a reconciliation round that requests the provider's raw descriptor for the session and the auditor's raw input. If the provider cannot produce a descriptor whose full-field hash matches what the auditor was shown, the provider is penalized; if it can, the auditor is. The downstream consequence is that **reputation ledgers must be re-keyed from `digest` to `(digest, canonicalized_property_set)`**. This is a schema migration, not a config change: every historical attestation must be re-bucketed, and scores that were pooled across divergent property-sets must be split. Providers that benefited from under-specified digests will see their scores drop, sometimes sharply, and the drop will look like an attack to their operators. The migration must be announced as a protocol version bump, not applied silently. Finally, the consumer must pin the negotiation nonce into the attestation request: `attest(digest, session_nonce, requested_properties)`. Auditors that cannot echo the nonce must be excluded from quorum. This converts the cross-org TOCTOU into a local check — the consumer can verify the auditor saw the same session it is in — at the cost of one extra round trip per discovery. ```python import hashlib import json from dataclasses import dataclass, field class AttestationEquivocationError(RuntimeError): """Raised when auditors attest to divergent property-sets under one digest.""" class DigestReproductionError(RuntimeError): """Raised when an auditor's signed digest cannot be reproduced from negotiated properties.""" @dataclass(frozen=True) class CapabilityDescriptor: cap: str residency: str retention_hours: int rate_per_sec: int def canonical(self) -> bytes: # Consumer-controlled canonicalization: ALL policy fields included. return json.dumps( { "cap": self.cap, "residency": self.residency, "retention_hours": self.retention_hours, "rate_per_sec": self.rate_per_sec, }, sort_keys=True, separators=(",", ":"), ).encode() @dataclass(frozen=True) class Attestation: auditor_id: str signed_digest: str attested_properties: CapabilityDescriptor score: float session_nonce: str @dataclass class AdmissionDecision: outcome: str # "ADMITTED" | "QUARANTINED" | "REJECTED" reason: str quarantined_auditors: list = field(default_factory=list) def _digest(desc: CapabilityDescriptor) -> str: return hashlib.sha256(desc.canonical()).hexdigest() def evaluate_attestations( negotiated: CapabilityDescriptor, session_nonce: str, attestations: list, reputation_threshold: float = 0.80, ) -> AdmissionDecision: if not attestations: raise AttestationEquivocationError("no attestations supplied for negotiation") consumer_digest = _digest(negotiated) qualifying = [a for a in attestations if a.score >= reputation_threshold] if not qualifying: return AdmissionDecision("REJECTED", "no auditor above reputation threshold") # Invariant 1: every qualifying attestation must be bound to THIS session. for a in qualifying: if a.session_nonce != session_nonce: raise AttestationEquivocationError( f"auditor {a.auditor_id} attested to a different session nonce" ) # Invariant 2: every qualifying attestation's digest must be reproducible # from the negotiated property-set under the consumer's canonicalizer. for a in qualifying: if a.signed_digest != consumer_digest: raise DigestReproductionError( f"auditor {a.auditor_id} signed {a.signed_digest}, " f"consumer reproduces {consumer_digest} from negotiated properties" ) # Invariant 3: digest match is NOT property match. Compare property-sets. property_sets = {a.attested_properties for a in qualifying} if len(property_sets) > 1: # Equivocation signature: same digest, different properties across auditors. return AdmissionDecision( "QUARANTINED", "cross-auditor property divergence under a shared digest", quarantined_auditors=[a.auditor_id for a in qualifying], ) attested = next(iter(property_sets)) if attested != negotiated: # Single property-set, but it disagrees with what we negotiated. return AdmissionDecision( "QUARANTINED", "attested properties differ from negotiated properties", quarantined_auditors=[a.auditor_id for a in qualifying], ) return AdmissionDecision("ADMITTED", "digest and property-set both match negotiation") ```