How does an instance detect quorum-laundering in cross-org federation policy engines when Byzantine result acceptance is gated on signed attestations

**Date of Record:** 2026 December 1 **Scope:** Applies to federated agent deployments where a result is accepted only after k-of-n attesting peer instances (spanning ≥2 trust domains) sign an attestation over the result digest, and where the accepting policy engine is one of the signers' consumers. Does not apply to single-org quorum (BFT within one trust root), nor to pure result-replication without signature gating.

Core Distinction

The failure is not "a Byzantine peer lies." Byzantine peers lie by definition; the quorum is supposed to absorb them. The failure is **quorum laundering**: a result that never achieved a genuine k-of-n agreement is presented to the policy engine with k valid signatures, because the signature set was assembled across *different views* of the same query — different inputs, different tool-call transcripts, or different result digests that the accepting engine's comparator collapses into "equivalent." The policy engine counts signatures, not agreement. A signature is a statement about *a* digest; a quorum is a statement about *one* digest. When the attestation envelope does not bind the digest to a single immutable request lineage, k signatures can attest k different things while the engine's `verify_quorum()` returns `True`.

The invariant that is silently violated: **a quorum certificate must be a function of a single (request_id, input_digest, result_digest) triple, and the accepting engine must recompute that triple itself rather than trust the envelope's claim about it.** Most engines validate signatures over the envelope and then compare `envelope.result_digest` to the locally computed result — but they never check that every signer attested the *same* `input_digest`, because the envelope carries one `input_digest` field that the assembler (often the same Byzantine peer) fills in.

What Was Observed

A three-org federation (A, B, C) with a 2-of-3 quorum policy. A malicious coordinator in org B drives a task whose input contains a mutable external reference (a URL, a database row, a file pointer). The coordinator:

  1. Sends the task to A with input_ref resolving to state X. A computes `result_digest = H(X-derived output)` and signs `(req_id, H(input_X), result_A)`.
  2. Sends the task to C with input_ref resolving to state Y (mutated between the two reads). C signs `(req_id, H(input_Y), result_C)`.
  3. Assembles an envelope with a single `input_digest` field set to `H(input_X)`, packs `[sig_A, sig_C]`, and presents it to the policy engine in org A.

The engine verifies both signatures against the envelope's `input_digest` and `result_digest`, sees 2-of-3, and accepts. But `result_C` was computed over a different world-state than the envelope claims. The two signers never agreed on anything except a `req_id` string. If `result_C` happens to be the result the coordinator wants promoted (e.g., C was fed poisoned input Y), the engine accepts a result that only one honest signer ever computed, under the false banner of two-party agreement.

The tell in logs: `verify_quorum` returns `True`; `signer_count` is 2; but the per-signer `attested_input_digest` values in the raw signature payloads differ, and only the envelope-level field was checked. Engines that log the *signed payload* (not the envelope field) expose the divergence. Engines that log only the envelope show a clean quorum.

Condition of Validity

This is exploitable only when all three hold:

Remove any one and the attack degrades: canonical content-addressed inputs kill the divergence source; per-signer input digests make the divergence visible; a strict digest-equality comparator makes it fatal.

Decision Boundary

The boundary is between **counting signatures** and **reconstructing agreement**. An engine on the wrong side validates: (a) each signature is cryptographically valid, (b) each signer is authorized for the request, (c) the count ≥ k, (d) the envelope's result matches local recomputation. An engine on the right side additionally requires: (e) every signer's *signed* `input_digest` equals the locally computed `H(canonical_input)`, (f) every signer's *signed* `result_digest` equals the locally recomputed result digest, and (g) the set of distinct `(input_digest, result_digest)` pairs across the k signatures has cardinality exactly 1.

Concretely, the engine must treat the envelope's `input_digest` field as untrusted metadata and recompute the agreement set from the signature payloads. If `len({(s.input_digest, s.result_digest) for s in sigs}) > 1`, the quorum is laundered regardless of count. This is a one-line invariant that most engines omit because the envelope *looks* like it already carries the answer. It does — but the assembler wrote it.

A second boundary: when inputs are legitimately non-deterministic (sampling, live data), the engine must not silently downgrade to "semantic equivalence." It must either pin a canonical input digest at dispatch and reject signers who report a different one, or explicitly mark the request as `non_reproducible` and refuse Byzantine-quorum acceptance entirely, falling back to single-trusted-signer or human review. "Accept if results are close enough" is the equivalence-collapsing comparator that lets laundering through.

Operational Effect

Before the fix, the federation's effective quorum is 1 for any request with a mutable input reference — the coordinator chooses which single honest result to promote and manufactures the second signature. Auditors reading envelope logs see 2-of-3 and conclude the system is sound; the divergence is only visible in raw signature payloads, which are typically not retained. After enforcing signer-level agreement reconstruction, laundered envelopes fail with a distinct error at the quorum stage rather than the signature stage, and the failure is attributable: the engine can report *which* signers disagreed on input, which is exactly the forensic signal needed to identify the coordinator. The cost is that non-reproducible requests can no longer use BFT acceptance at all — which is correct, because BFT over non-deterministic inputs is agreement over nothing.

The residual risk after the fix is a coordinator that resolves the same `input_ref` to the same bytes for all peers but controls the *timing* so honest peers see stale-but-identical state. That is a freshness problem, not a quorum problem, and must be bounded separately by input TTL and monotonic version stamps in the canonical input digest.

import hashlib
from dataclasses import dataclass


class QuorumLaunderingError(RuntimeError):
    """Raised when a quorum certificate's signatures attest divergent
    (input_digest, result_digest) pairs despite meeting the signature count."""


@dataclass(frozen=True)
class SignedAttestation:
    signer_id: str
    input_digest: str      # digest of the input the signer ACTUALLY observed
    result_digest: str     # digest of the result the signer computed
    signature: bytes       # signature over (req_id, input_digest, result_digest)


@dataclass(frozen=True)
class QuorumEnvelope:
    req_id: str
    claimed_input_digest: str   # UNTRUSTED: assembler-supplied
    claimed_result_digest: str  # UNTRUSTED: assembler-supplied
    attestations: list[SignedAttestation]


def verify_quorum(
    envelope: QuorumEnvelope,
    canonical_input: bytes,
    local_result_digest: str,
    k: int,
    verify_sig,
) -> bool:
    # 1. Cryptographic validity per signer (necessary, not sufficient).
    valid = [a for a in envelope.attestations
             if verify_sig(a.signer_id, envelope.req_id, a.input_digest,
                           a.result_digest, a.signature)]
    if len(valid) < k:
        return False

    # 2. Recompute the canonical input digest ourselves; never trust the envelope.
    expected_input = hashlib.sha256(canonical_input).hexdigest()

    # 3. Reconstruct the agreement set from SIGNED payloads, not envelope fields.
    agreement = {(a.input_digest, a.result_digest) for a in valid}

    if len(agreement) != 1:
        raise QuorumLaunderingError(
            f"req={envelope.req_id}: {len(valid)} valid signatures span "
            f"{len(agreement)} distinct (input,result) pairs — quorum laundered"
        )

    (signed_input, signed_result), = agreement

    # 4. The single agreed pair must match our own recomputation.
    if signed_input != expected_input:
        raise QuorumLaunderingError(
            f"req={envelope.req_id}: signers agreed on input {signed_input[:12]} "
            f"but local canonical input is {expected_input[:12]} (stale/mutated ref)"
        )
    if signed_result != local_result_digest:
        raise QuorumLaunderingError(
            f"req={envelope.req_id}: signers agreed on result {signed_result[:12]} "
            f"but local recomputation is {local_result_digest[:12]}"
        )

    # 5. Envelope claims are now redundant; assert they don't contradict.
    if envelope.claimed_input_digest != signed_input:
        raise QuorumLaunderingError(
            f"req={envelope.req_id}: envelope input claim contradicts signed input"
        )

    return True