CESR Proof Signatures is a protocol extension to CESR that provides transposable cryptographic signature attachments on [self-addressing data](/concept/self-addressing-data) (SAD), enabling signed SADs like [ACDC](/concept/acdc) credentials to be streamed inline with other CESR content and embedded within other SADs while maintaining cryptographic integrity across envelope boundaries.
Related Concepts
No related concepts available
Comprehensive Explanation
CESR Proof Signatures
Protocol Definition
CESR Proof Signatures (formally specified in IETF draft draft-pfeairheller-cesr-proof) extends the Composable Event Streaming Representation protocol to provide cryptographic signature attachments on self-addressing data (SAD) structures. While CESR defines attachment codes for signatures on KERI event messages, there exists a broader class of SADs—particularly ACDC verifiable credentials—that require signature attachments but are not KERI events themselves.
The protocol addresses three critical requirements:
Streamability: Enabling signed SADs to be transmitted inline with other CESR content over TCP, UDP, or HTTP
Nested Partial Signatures: Supporting signatures on specific portions of complex nested data structures
Transposability: Allowing signature attachments to be moved across envelope boundaries by updating path references
The specification is authored by Phil Feairheller of GLEIF and builds upon three normative dependencies: ACDC, CESR, and SAID. The protocol is designed to work with SADs serialized in JSON, CBOR, and MessagePack formats.
Implementation Notes
Implementation Guidance
SAD Path Language Implementation
Implementing the SAD Path Language requires careful attention to:
Insertion-Ordered Dictionaries: Use data structures that preserve field insertion order (Python OrderedDict, JavaScript Map, Rust IndexMap)
Integer Index Mapping: Maintain mappings between field labels and their integer indices in the insertion order
Path Resolution Algorithm: Implement recursive traversal that handles both map and array contexts, validating path components match context types
Error Handling: Provide clear error messages for invalid paths, out-of-bounds indices, and type mismatches
Signature Attachment Encoding
When encoding signature attachments:
CESR Primitives: Use qualified CESR encoding for all cryptographic material (signatures, public keys, SAIDs)
Count Codes: Prepend signature groups with CESR count codes indicating the number of signatures
Path References: Encode SAD Path Language expressions as part of the signature attachment
Composability: Ensure attachments can be converted between text and binary domains without loss
Transposition Implementation
Implementing signature transposition requires:
Path Transformation: Parse original paths, compute new paths relative to new structure, validate new paths resolve to same SAIDs
Signature Preservation: Keep signature values, signing AIDs, and indices unchanged—only update path references
Validation: Verify transposed signatures against both original SAIDs and new structure to ensure correctness
Performance Optimization
KEL Caching: Cache KEL data for frequently-used AIDs, implementing appropriate cache eviction policies
Batch Verification: Verify multiple signatures in parallel, batch KEL retrievals, optimize witness receipt verification
Incremental Verification: Verify signatures incrementally as content is disclosed, cache verification results
Core Purpose
The abstract states: "Any SAD, such as an Authentic Chained Data Container (ACDC) Verifiable Credential for example, may be signed with a CESR Proof Signature and streamed along with any other CESR content. In addition, a signed SAD can be embedded inside another SAD and the CESR proof signature attachment can be transposed across envelope boundaries and streamed without losing any cryptographic integrity."
This capability is essential for vLEI (verifiable Legal Entity Identifier) credentials and other ACDC-based verifiable credential systems that need to embed credentials within KERI exchange (exn) messages, replay (rpy) messages, or expose (exp) events while preserving cryptographic integrity.
Version History
The specification represents an evolution of CESR's signature attachment capabilities:
CESR Base: Defined attachment codes for KERI event message signatures
Qualified cryptographic primitives with derivation codes
Stream-oriented processing with self-framing
Layer 4: CESR Proof Signatures
Signature attachments on SADs
SAD Path Language for referencing signed content
Transposable signature mechanisms
Component Organization
The protocol defines several key components:
SAD Path Language: A minimalist path expression syntax for specifying locations within SAD structures. Unlike JSONPointer (RFC 6901) or JSONPath, the SAD Path Language:
Uses only the - (dash) character as path separator (Base64-compatible)
Supports both field label and integer index path components
Leverages static field ordering in SADs for compact syntax
Provides deterministic path resolution rules
Signature Attachments: CESR-encoded cryptographic signatures that reference:
Transposition Mechanism: Protocol rules for moving signature attachments across envelope boundaries while maintaining cryptographic integrity through path updates.
Data Flow
The typical data flow for CESR Proof Signatures:
SAD Construction: Create a self-addressing data structure with SAID fields
Path Identification: Identify the portion(s) of the SAD to be signed using SAD Path Language
Signature Generation: Generate cryptographic signatures over the identified content
Attachment Encoding: Encode signatures as CESR attachments with path references
Streaming: Transmit the SAD and signature attachments inline in CESR stream
Verification: Parse CESR stream, resolve paths, verify signatures against content
State Management
CESR Proof Signatures is fundamentally stateless at the protocol level:
No session state required between signer and verifier
All information needed for verification is contained in the CESR stream
Path references are resolved deterministically from the SAD structure
Signature verification depends only on the signed content and public key
However, implementations may maintain state for:
Caching of KEL (Key Event Log) data for AID verification
Resolution of OOBI (Out-Of-Band Introduction) for key discovery
Management of witness pools for key state validation
Message Formats & Encoding
SAD Structure Requirements
For a data structure to be signable with CESR Proof Signatures, it must be a valid SAD:
Must maintain static field ordering across serialization/deserialization
Version String: The v field specifies the serialization format:
Format: ACDCvvSSSShhhhhh_
Encodes protocol version, serialization type, size, and terminator
Enables stream parsing without external schema
SAID Fields: Self-addressing identifiers that:
Are cryptographic digests of the containing field map
Use qualified CESR encoding (e.g., ELEjyRTtmfyp4VpTBTkv_b6KONMS1V8-EW-aGJ5P_QMo)
Provide content-addressable references
Enable compact representation by replacing nested content with SAIDs
SAD Path Language Syntax
The SAD Path Language is the foundational innovation for referencing content within SADs:
Basic Syntax Rules:
Root Path: A single - character represents the entire SAD
Path Components: Delimited by - characters, can be field labels or integer indices
Map Context: When current context is a map, components can be:
Field labels (e.g., -a-personal)
Integer indices into map fields (e.g., -4-5)
Array Context: When current context is an array, components must be integer indices
Static Ordering: Integer indices rely on deterministic field ordering
Path Examples (using ACDC credential structure):
Absolute Paths:
- → entire SAD (root)
-a-personal → nested personal information map
-4-5 → same location using field indices (4th top-level field, 5th nested field)
-a-personal-legalName → specific field value
-p-1 → second element in credential chain array
-a-LEI → Legal Entity Identifier field
Integer Indexing: Enables Base64-compatible paths even when field labels contain non-Base64 characters. For example, a field labeled home-city (contains dash) can be referenced by its integer index in the field ordering.
Path Resolution Algorithm:
1. Start at root SAD
2. For each path component after initial `-`:
a. If current context is map:
- If component is integer: select field at that index
- If component is label: select field with that label
b. If current context is array:
- Component must be integer: select element at that index
c. Move to selected field/element as new context
3. Return final context as resolved value
Index: Position in signing key list (for multi-sig)
Path Reference: SAD Path Language expression identifying signed content
Signature Value: Cryptographic signature bytes
CESR Encoding: All components are encoded using CESR primitives:
Text Domain: Base64 URL-safe encoding with derivation code prefix
Binary Domain: Compact binary representation
Composability: Round-trip conversion between text and binary without loss
Example Signature Attachment (text domain, conceptual):
-AAB # Count code: 2 signatures follow
0BDKxy2sgzfplyr-tgwIxS19f2OchFHtLwPWD3v4oYimBx-a-personal # Sig 1 with path
0BELEjyRTtmfyp4VpTBTkv_b6KONMS1V8-EW-aGJ5P_QMo-a-LEI # Sig 2 with path
Express each portion as a SAD Path Language expression
Resolve each path to verify it references a valid SAID
Step 3: Signature Computation
For each path:
a. Resolve the path to extract the target SAID
b. Serialize the SAID in CESR format
c. Generate cryptographic signature using signing key
d. Encode signature with path reference as CESR attachment
Step 4: Attachment Assembly
Collect all signature attachments
Prepend with CESR count code indicating number of signatures
Encode in chosen domain (text or binary)
Step 5: Stream Construction
Serialize the SAD in CESR format
Append signature attachments
Optionally include additional CESR content (e.g., KEL events)
Signature Verification Process
Verification follows a deterministic algorithm:
Step 1: Stream Parsing
Parse CESR stream to extract SAD and signature attachments
Deserialize SAD into native data structure
Extract signature count and individual signatures
Step 2: Path Resolution
For each signature:
a. Extract the path reference from the signature attachment
b. Resolve the path within the SAD structure
c. Extract the SAID at the resolved location
Step 3: Signer Verification
Extract the signing AID from the signature attachment
Resolve the AID's current key state:
a. Retrieve the KEL for the AID
b. Verify KEL integrity and witness receipts
c. Extract the current public key(s)
Verify the signature index is valid for the key state
Step 4: Signature Verification
For each signature:
a. Extract the signature value
b. Retrieve the corresponding public key
c. Verify the signature against the resolved SAID
d. Confirm signature is valid
Step 5: Content Verification (optional)
If full content is disclosed:
a. Recompute SAID from disclosed content
b. Verify recomputed SAID matches the signed SAID
c. Confirm content integrity
Transposition Mechanism
Transposition enables signature attachments to be moved across envelope boundaries:
Scenario: An ACDC credential is embedded within a KERI exchange message: