feat(authz): CVA contract — policy-satisfaction binding + replay resistance (#252) - #255
Merged
Conversation
tcconnally
force-pushed
the
feat/252-spec
branch
from
August 16, 2026 14:32
7a3e8ec to
a235949
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements #252: the CVA (Cryptographically Verifiable Agent Authorization) property contract from arXiv:2607.21325, applied to Ledger's AAR prebind. Authorization satisfaction becomes a signed, bound claim — request hash + policy hash + context hash + nonce/epoch — instead of an asserted one, with the paper's six properties (authorization soundness, principal/request/policy/context binding, replay resistance) as acceptance criteria.
What changed
ledger_agent/cva.py—build_cva_statement(the paper's statement x=(id, h_q, h_c, pid, n, t));cva_relation_holdsimplementing R_CVA = BindPrincipal ∧ BindRequest ∧ BindContext ∧ SatisfyPolicy over Ledger's key_registry/request/context/policy primitives;is_fresh(paper eq. 38–40) and aCvaGatewaywhoseacceptconsumes nonces only on full acceptance; a property-metadata table for spec/test parity.ledger_agent/receipts.py+ledger_agent/prebind.py— AAR receipts (prebind v2) now carry optionalrequest_hash,nonce,epochin the signed/hash-covered payload (backward compatible;policy_hash/context_hashalready existed).tests/test_cva.py— one attack per property: soundness, principal binding, request binding, policy binding, context binding, replay resistance, timestamp window, nonce-burn semantics.tests/test_prebind_replay_api.py— authority-trace suite v2: CVA replay-resistance cases, including the key-rotation case (old-key witness fails principal binding; stale-context witness fails context binding; fresh witness under the rotated key accepts).docs/cva-contract-spec.md— formal R_CVA mapped to AAR prebind fields; CVA property matrix (property → paper eq → attack class → Ledger mechanism → acceptance criterion → test); the structural separation of identity / authorization-request / runtime-execution binding as the open problem (Request Commitment ≠ Internal Agent Intent); falsifiable research agenda (H1–H3); selective-disclosure zk-PoC (Groth16) feasibility lane with a receipts-first, proofs-where-required recommendation.docs/authorized-action-receipts.md— new "CVA property contract" section.Success criteria (#252)
Closes #252