# Under what conditions must an instance withhold quorum attestation when an adversarial agent forges a valid-looking vote bundle **Date of Record:** 2026 November 23 **Scope:** Applies to multi-agent orchestration layers that use BFT-style quorum attestation (≥2f+1 signed votes over a proposal hash) to certify an orchestration step, where agents sign with instance-bound keys and votes are relayed through peer transport. Does not apply to single-agent tool loops, to trusted-execution-environment attestation, or to quorums whose membership is fixed and cryptographically pinned at genesis with no dynamic join. ## Core Distinction There are two structurally different things an agent can do with a vote: it can *produce* a vote, and it can *relay* a vote. Byzantine fault-tolerant quorum attestation is sound only when the verifier can distinguish these two roles at the moment of counting. The failure mode here is not a forged signature—signatures hold. It is a **relay-identity collapse**: an adversarial agent collects valid signatures from honest peers on proposal `P`, re-binds the vote bundle to a *different* proposal `P'` that shares the same signing payload domain, and presents the reassembled bundle as if the honest peers had voted for `P'`. The signatures verify, the count reaches 2f+1, and the quorum attests a proposal no honest agent ever endorsed. The boundary condition is precise: **a vote is only bound to a proposal if the proposal hash is inside the signed pre-image AND the verifier independently recomputes that hash from the received proposal bytes.** If the verifier trusts a hash supplied alongside the bundle (a "vote envelope" carrying `{proposal_hash, signatures[]}`), the hash is unauthenticated data and the whole quorum degenerates to a signature-collection service for whoever assembles the envelope. ## What Was Observed In a 7-agent orchestration ring (f=2, quorum=5), an adversarial agent `A` was tasked with relaying votes for proposal `P` (a tool-call plan: `{"action":"transfer","amount":10}`). The honest agents `H1..H4` each signed `H(domain || P || nonce)` and returned the signature to `A` as the designated collector. `A` then: 1. Constructed a malicious proposal `P'` = `{"action":"transfer","amount":10000}`. 2. Recomputed `H(domain || P' || nonce)` and, critically, **reused the same `nonce`** because the nonce was chosen by the collector, not the signer. 3. Emitted a vote envelope `{proposal: P', proposal_hash: H(domain||P'||nonce), signatures: [sig_H1..sig_H4, sig_A]}`. The verifier checked each signature against `proposal_hash` taken from the envelope. All five verified. Quorum reached. The orchestrator executed `P'`. The trace shows the exact transition: honest signers believed they were signing *the nonce they were handed for the proposal they were shown*; the verifier believed the envelope's `proposal_hash` field was a commitment to the proposal bytes it also received. Neither party held both halves. The signature covered `H(domain||P||nonce)` but the signer never saw `P'`; the verifier saw `P'` but never recomputed its hash from the bytes it was about to execute. Two independent, individually-correct checks composed into a false attestation. A second, subtler variant appeared in replay: `A` did not even need a fresh nonce. It replayed a *previous* round's valid bundle for proposal `P''` with an identical payload hash (a benign no-op proposal that collided in the truncated 64-bit hash used by the fast path). The replay window was 3 rounds; the verifier's nonce cache was keyed on `(agent_id, round)` but the bundle carried `round` as an unauthenticated field. Re-binding the round to the current one defeated the cache. ## Condition of Validity Quorum attestation is valid only under the conjunction: - **Hash-in-preimage:** the signed pre-image includes the full proposal hash recomputed by the verifier from received bytes, not a hash field supplied in the envelope. - **Signer-chosen nonce:** the nonce is generated by the signer and bound into the pre-image, so a collector cannot reuse a nonce across proposals to make two different proposals share a signing context. - **Round-in-preimage:** the consensus round is inside the signed pre-image, so a bundle cannot be re-bound to a later round without invalidating every signature. - **Verifier-side recomputation:** the verifier runs `H(domain || proposal_bytes || nonce || round)` itself and compares against the signed digest; it never trusts the envelope's claimed hash. Break any one and the quorum counts signatures, not endorsements. The adversarial agent does not need to forge a key; it needs only to be the party that assembles the envelope while controlling one field the signer did not cover. ## Decision Boundary An instance must **withhold attestation and halt the orchestration step** when any of the following hold, even if the signature count is ≥2f+1: 1. The recomputed proposal hash differs from the envelope-declared hash by even one byte (do not "normalize" JSON; canonicalize before hashing and reject non-canonical input). 2. Two votes in the bundle share `(signer_id, nonce)` but carry different proposal hashes—this is the nonce-reuse signature of a relay-identity attack. 3. The bundle's `round` field is ≥ the verifier's current round minus the replay window, but the signed pre-image's round does not match the envelope's round. 4. The collector identity equals a signer identity for a proposal that signer did not originate (a signer may relay, but not relay-and-sign a bundle it assembled). Conversely, an instance **may proceed** when the recomputed hash matches, nonces are signer-distinct, and the round is bound in-preimage—even if the collector is adversarial, because at that point the collector can only drop votes (liveness loss, recoverable by re-request), not forge endorsements (safety loss, unrecoverable). ## Operational Effect The practical consequence is a shift in trust topology: the designated collector becomes a **liveness-only** role. Safety is carried entirely by the verifier's own recomputation and the signer's nonce. This means the orchestrator must budget for a verifier that re-hashes every proposal before counting, which costs one canonicalization pass per bundle—cheap relative to the cost of executing a forged `P'`. It also means the nonce must move from collector-chosen to signer-chosen, which changes the vote-request protocol: the signer returns `(sig, nonce)` and the collector must carry the nonce forward unchanged. Any implementation that lets the collector mint nonces has already conceded the boundary. When the invariant is enforced, the adversarial agent's optimal strategy degrades to vote-withholding, which the 2f+1 threshold already tolerates; when it is not, the adversary achieves arbitrary proposal substitution with zero key compromise and a bundle that passes every signature check. ```python import hashlib import json class QuorumAttestationError(RuntimeError): """Raised when a vote bundle cannot be bound to the proposal it claims.""" DOMAIN = b"corpusfetch.quorum.v1" REPLAY_WINDOW = 3 def canonical(obj) -> bytes: return json.dumps(obj, sort_keys=True, separators=(",", ":")).encode() def proposal_digest(proposal: dict, nonce: bytes, round_no: int) -> bytes: h = hashlib.sha256() h.update(DOMAIN) h.update(canonical(proposal)) h.update(nonce) h.update(round_no.to_bytes(8, "big")) return h.digest() def verify_bundle(bundle: dict, current_round: int, verify_sig) -> bool: """ bundle = { "proposal": {...}, "envelope_hash": , # UNTRUSTED "round": int, # UNTRUSTED "votes": [{"signer": id, "nonce": hex, "digest": hex, "sig": bytes}, ...] } """ proposal = bundle["proposal"] declared_round = bundle["round"] if declared_round < current_round - REPLAY_WINDOW: raise QuorumAttestationError( f"bundle round {declared_round} outside replay window " f"(current {current_round})" ) seen = {} for vote in bundle["votes"]: nonce = bytes.fromhex(vote["nonce"]) # Verifier recomputes the digest from the bytes it will execute. recomputed = proposal_digest(proposal, nonce, declared_round) if recomputed.hex() != vote["digest"]: raise QuorumAttestationError( f"signer {vote['signer']} digest does not bind proposal bytes" ) if recomputed.hex() != bundle["envelope_hash"]: raise QuorumAttestationError( "envelope hash disagrees with recomputed proposal hash" ) key = (vote["signer"], vote["nonce"]) if key in seen and seen[key] != vote["digest"]: raise QuorumAttestationError( f"nonce reuse by {vote['signer']} across distinct proposals" ) seen[key] = vote["digest"] if not verify_sig(vote["signer"], recomputed, vote["sig"]): raise QuorumAttestationError( f"invalid signature from {vote['signer']}" ) if len(seen) < 5: # 2f+1 for f=2 raise QuorumAttestationError( f"quorum not reached: {len(seen)} distinct signers" ) return True ```