AAC ↔ AEP Digest Binding Specification
Rendered from
docs/interop/aac-aep-digest-binding.mdinaction-state-group/agent-action-capsuleat commit563dcb8010e5942c07c14453bd22bbc397cca0e3. The repository is the source of record; this page changes only when the site’s pinned commit does.
Status: Pinned protocol — agreed for the Anton Sokolov (Tyche) live cross-verify
Date: 2026-06-29
Live cross-verify scheduled: IETF 126 Hackathon, Vienna, 18–19 July 2026
Applicable to: draft-mih-scitt-agent-action-capsule-01 ↔ draft-sokolov-rats-aep-composition
Purpose
This document pins the digest-binding protocol so that the bidirectional cross-verify passes on first attempt. It specifies which AAC fields Anton binds into an AEP/TPM quote, which AEP fields the AAC side verifies, and the exact byte encoding on both sides.
Digest field reference
AAC side (purchase capsule — the artifact handed to Anton)
| Field path | Value (hex-lowercase, 64 chars) | Meaning |
|---|---|---|
capsule_id | 29b9a5569bc99585628040e3f262a3087809ce0044c79dbab98b5c7e9cae181b | SHA-256 of canonical capsule — the primary content address |
effect.response_digest | 248cdd0827f66d2ac5dfa46cfb58d5d0a48c254a237ce4422a4345f33b53f56e | SHA-256 of agent_output (the “did” — digest-of-id for the payment decision) |
model_attestation.compute_attestation.agent_input_digest | e4e17626f890da25d269e1a6e80c6c9b5e43403a38f5bdf76fc80e882eadcd08 | SHA-256 of agent_input (procurement prompt) |
Example: a procurement payment — pay approved invoice INV-2026-0418, $4,250.00 ACH to
Acme Office Supplies. Status: confirmed, dispatched. Preimages in docs/interop/purchase-example/.
All AAC digests are SHA-256, hex-lowercase, 64 characters. No salt was applied
(salt_digests=False) — digests are deterministic and reproducible from the preimage JSON files.
The JSON input was serialized with sort_keys=True, separators=(",",":") before hashing (JCS-compatible).
AEP side (Anton’s bundle)
| Field path | Encoding | Meaning |
|---|---|---|
metadata.json → attestation_id | ULID string | Unique AEP attestation identifier |
hash.sha256 | hex-lowercase, 64 chars | SHA-256 of canonical.bin = response.txt ∥ 0x0A ∥ JCS(metadata.json) |
Receipt receipt_b64 (our SCITT receipt) | Base64-standard | COSE Receipt proving capsule_id was registered |
Encoding agreement (explicit)
Both sides MUST agree on these encoding points:
| Concern | Agreed encoding |
|---|---|
| Hash algorithm | SHA-256 |
| Digest representation in JSON | hex-lowercase string (64 chars) — e.g. "c52a66d0…" |
| Digest representation in AEP quote / PCR extension / swtpm nonce | raw bytes (32 bytes binary), NOT the hex string |
| JSON input for digest computation | JCS-canonical form: sort_keys=True, separators=(",",":"), no BOM, UTF-8 |
Capsule body for capsule_id derivation | All fields except capsule_id itself, JCS-sorted |
| Receipt format | COSE Receipt per RFC 9162 (CT Merkle + Ed25519), Base64-standard |
Critical: The raw-bytes-in-quote / hex-in-JSON distinction is where cross-format
verifiers most commonly misalign. The nonce or PCR-extension in an swtpm quote is
binary; the capsule_id in the capsule JSON and the hash.sha256 in AEP metadata
are both hex strings. Confirm at the wire level before first cross-verify.
Machine-checkable interop vector
The positive case and first negative cases are pinned in
docs/interop/aac-aep-scitt-digest-binding-vector.json and checked by
python/tests/test_interop_digest_binding.py. The vector is intentionally small:
it binds the purchase-example AAC capsule, the AEP quote commitment, and the SCITT
receipt to one digest thread.
The verifier contract is:
- Recompute
capsule_idfrom the canonical capsule form. - Recompute
effect.response_digestfrom JCS(output.json). - Recompute
model_attestation.compute_attestation.agent_input_digestfrom JCS(prompt.json). - Decode the AEP quote commitment as raw digest bytes and compare it to
bytes.fromhex(response_digest)or the explicitly selected digest. - Require the shared profile label
urn:action-state:aac-aep-scitt:digest-binding:2026-07-02. - Require the SCITT receipt to resolve to the same
capsule_id.
The negative cases are not advisory. A verifier MUST reject at least these classes of mismatch:
digest_binding_encoding_mismatch: the quote commits to ASCII hex string bytes instead of raw digest bytes.digest_binding_mismatch: the quote commits to 32 raw bytes, but not the AAC digest selected for binding.profile_label_mismatch: the same bytes are carried under another composition label.canonicalization_mismatch: a digest is computed from non-JCS JSON bytes.receipt_statement_mismatch: the SCITT receipt resolves to a different statement orcapsule_id.
Direction A — Anton binds our capsule into his AEP/TPM quote
What he does:
-
Takes our
capsule_id(hex string) andresponse_digest(hex string) fromdocs/interop/aac-aep-interop-artifacts.md. -
Constructs an AEP
response.txtthat references our capsule, e.g.:AAC capsule_id: 29b9a5569bc99585628040e3f262a3087809ce0044c79dbab98b5c7e9cae181b AAC response_digest: 248cdd0827f66d2ac5dfa46cfb58d5d0a48c254a237ce4422a4345f33b53f56e AAC spec: draft-mih-scitt-agent-action-capsule-01 AAC action: procurement payment (send_payment/INV-2026-0418) -
(If using swtpm/RATS layer) Folds the raw bytes of
capsule_idand/orresponse_digestas a nonce or PCR-extension in the TPM quote. The raw-bytes form is:capsule_id_bytes = bytes.fromhex("29b9a5569bc99585628040e3f262a3087809ce0044c79dbab98b5c7e9cae181b") response_digest_bytes = bytes.fromhex("248cdd0827f66d2ac5dfa46cfb58d5d0a48c254a237ce4422a4345f33b53f56e") # Concatenate or use individually as nonce material in the TPM quote -
The resulting AEP bundle + its TPM quote commits to our
capsule_id. He sends us the AEPhash.sha256+ the TPM quote evidence.
What we verify:
- His AEP
hash.sha256is SHA-256 ofcanonical.bin(=response.txt∥ LF ∥ JCS(metadata)). - The
response.txtin that canonical form contains ourcapsule_id+response_digest. - (If TPM layer) The quote nonce contains
capsule_id_bytesorresponse_digest_bytes. - The AEP
hash.sha256can be recomputed independently — verifier MUST refuse if mismatch.
Direction B — We anchor in SCITT; Anton verifies the receipt resolves
What we provide:
The SCITT receipt from docs/interop/aac-aep-interop-artifacts.md (anchored 2026-06-29):
{
"receipt_b64": "0oRHogEnGQGLAaEZAYyhIIFYSIMEA4JYIM6ef1L3fWsfmekhxus/h/CvzFR+NmhRoIj5tNPqybstWCBWrtv+syZpMz1A0QgGO5XHNJwp7vkvenEv+7zJOyjwd/ZYQNiJOU57SscGqnCtnZ8daxKse/BXLZF9Ks3+5UcP4jy/7ydfQ80DV3BGaW9Uknfi5DdSypRtBuzDRGNc6/u+Egc=",
"entry_hash": "8767e07982b43db647cb39451719c07364a13444cce0b0003854c270f27317e5",
"leaf_index": 3,
"tree_size": 4
}Anchor public key (key_id: 39bb654c9dc0afe1):
GET https://anchor.agentactioncapsule.org/.well-known/did.json # key_id + Ed25519 JWK
GET https://anchor.agentactioncapsule.org/anchor/authority-pubkey # raw authority pubkeyResolved value (key_id 39bb654c9dc0afe1, Ed25519): JWK x = ObtlTJ3Ar-HA7e8N7_qmkJm4UYg2ybom4EkVNYQPlrU;
raw hex 39bb654c9dc0afe1c0edef0deffaa69099b8518836c9ba26e0491535840f96b5 (note: key_id = first 8 bytes of the raw key).
What Anton verifies:
- Decode
receipt_b64as a COSE Receipt (COSE_Sign1 with an inclusion proof in the unprotected header, per RFC 9162 §4). - Confirm the inclusion proof resolves
capsule_idatleaf_index=3in a log oftree_size=4under the signed tree head. - Verify the Ed25519 signature over the STH using the anchor’s published public key
(
key_id: 39bb654c9dc0afe1). - Confirm the root hash in the STH matches his independently-computed Merkle root.
Anchor log query (live):
# Verify the capsule is in the log
curl -s "https://anchor.agentactioncapsule.org/anchor/inclusion-proof?leaf_index=3"
# Get the current STH
curl -s "https://anchor.agentactioncapsule.org/anchor/sth"Composability: full four-layer digest thread
PermitReceipt.action_digest
│
▼
AAC capsule_id ←────────── SHA-256(JCS(capsule JSON \ {capsule_id}))
│
├─ effect.response_digest ←── SHA-256(JCS(agent_output)) ← folded into AEP response.txt
│ and optionally TPM nonce
└─ SCITT receipt ←─────────── RFC 9162 inclusion proof over capsule_id
→ AEP verifier cross-checks receipt_b64
AEP hash.sha256 ←────────── SHA-256(response.txt ∥ 0x0A ∥ JCS(metadata.json))
│ where response.txt contains our capsule_id + response_digest
└─ TPM/swtpm quote ←── nonce or PCR-ext = raw bytes of capsule_id or response_digest
→ Veraison verifies the quoteThe same SHA-256 digest threads all four layers. No separate hash-of-hashes is needed;
capsule_id is already the content address of the full capsule, and response_digest
is already the content address of the output that the AEP response text repeats.
Summary checklist for first cross-verify (hackathon day 1)
- Capsule minted (purchase payment,
capsule_id: 29b9a556…e181b) — 2026-06-29 - Anchored at
anchor.agentactioncapsule.org(leaf_index=3, tree_size=4) — 2026-06-29 - Anton has received
capsule_id+response_digest+receipt_b64(from artifacts doc) — Steven to send - Anton confirms raw-bytes-in-quote / hex-in-JSON encoding
- Anton confirms which AEP canonicalization his live signer uses (v0.1 response-only vs v1 response+LF+JCS)
- Anton produces AEP bundle with our
capsule_id+response_digestinresponse.txt - We confirm his
hash.sha256covers a document containing our fields - We decode his TPM quote and confirm the nonce/PCR-ext matches our digest bytes
- Anton decodes our
receipt_b64and verifies the Ed25519 STH signature - Anton confirms inclusion proof resolves at
leaf_index=3, tree_size=4 - Both sides confirm: one SHA-256 threads the full chain