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.
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
- CESR Proof Extension: Extends signature attachments to arbitrary SADs beyond KERI events
- SAD Path Language: Introduces a Base64-compatible path language for referencing nested content
Protocol Architecture
Layering Model
CESR Proof Signatures operates within a layered architecture:
Layer 1: Serialization Formats
- JSON (JavaScript Object Notation)
- CBOR (Concise Binary Object Representation per RFC8949)
- MessagePack (MGPK)
Layer 2: Self-Addressing Data (SAD)
- Data structures containing SAID fields
- Cryptographically bound identifiers derived from content
- Support for nested field maps with insertion-ordered dictionaries
Layer 3: CESR Encoding
- Dual text-binary encoding with composability
- 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:
- The SAD being signed (via SAID)
- The path to the signed content within the SAD
- The signing AID (Autonomic Identifier)
- The signature value itself
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
SAD Structure Requirements
For a data structure to be signable with CESR Proof Signatures, it must be a valid SAD:
Required Properties:
- Must be serializable in JSON, CBOR, or MessagePack
- Must use insertion-ordered field maps (dictionaries)
- Must contain at least one SAID field
- 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
CESR Proof Signature attachments follow CESR encoding conventions:
Attachment Structure (conceptual):
[Signature Count Code]
[Signature 1: Indexed Signature with Path]
[Signature 2: Indexed Signature with Path]
...
[Signature N: Indexed Signature with Path]
Indexed Signature Components:
- Derivation Code: Indicates signature algorithm (e.g., Ed25519)
- 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
Compact vs. Full Disclosure
CESR Proof Signatures supports multiple disclosure patterns:
Compact Disclosure: Replace nested field maps with their SAIDs:
{
"v": "ACDC10JSON000197_",
"d": "ELEjyRTtmfyp4VpTBTkv_b6KONMS1V8-EW-aGJ5P_QMo",
"i": "EKxy2sgzfplyr-tgwIxS19f2OchFHtLwPWD3v4oYimBx",
"s": "EBabiu_JCkE0GbiglDXNB5C4NQq-hiGgxhHKXBxkiojg",
"a": "ELEjyRTtmfyp4VpTBTkv_b6KONMS1V8-EW-aGJ5P_QMo"
}
Full Disclosure: Include complete nested content:
{
"v": "ACDC10JSON000197_",
"d": "ELEjyRTtmfyp4VpTBTkv_b6KONMS1V8-EW-aGJ5P_QMo",
"i": "EKxy2sgzfplyr-tgwIxS19f2OchFHtLwPWD3v4oYimBx",
"s": "EBabiu_JCkE0GbiglDXNB5C4NQq-hiGgxhHKXBxkiojg",
"a": {
"d": "ELEjyRTtmfyp4VpTBTkv_b6KONMS1V8-EW-aGJ5P_QMo",
"personal": {
"legalName": "John Doe",
"birthDate": "1990-01-01"
},
"LEI": "254900OPPU84GM83MG36"
}
}
Signature Validity: A signature on the compact form is cryptographically equivalent to a signature on the full form because:
- The SAID is a cryptographic digest of the full content
- Verifying the signature on the SAID verifies the signature on the content
- The path reference identifies which SAID was signed
Nested Partial Signatures
A defining feature is the ability to sign multiple portions of a SAD:
Use Case: An ACDC credential with multiple attribute sections:
{
"v": "ACDC10JSON000197_",
"d": "ERoot_SAID_of_entire_credential",
"i": "EIssuer_AID",
"a": {
"d": "EAttributes_SAID",
"personal": {
"d": "EPersonal_SAID",
"legalName": "John Doe"
},
"business": {
"d": "EBusiness_SAID",
"LEI": "254900OPPU84GM83MG36"
}
}
}
Signature Scenarios:
- Sign entire credential: Path
- signs root SAID
- Sign attributes only: Path
-a signs attributes SAID
- Sign personal info: Path
-a-personal signs personal SAID
- Sign business info: Path
-a-business signs business SAID
- Sign multiple sections: Multiple signatures with different paths
Verification: Each signature is verified independently:
- Resolve the path to identify the signed content
- Extract the SAID at that path
- Verify the signature against the SAID
- Optionally verify the SAID against the full content (if disclosed)
Protocol Mechanics
Signature Generation Process
The protocol defines a deterministic process for generating CESR Proof Signatures:
Step 1: SAD Preparation
- Construct the SAD with all required fields
- Compute SAIDs for all nested field maps
- Ensure insertion-ordered field maps
- Serialize in chosen format (JSON, CBOR, or MessagePack)
Step 2: Path Identification
- Identify the portion(s) of the SAD to be signed
- 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:
Original Structure:
{
"v": "KERI10JSON000197_",
"t": "exn",
"d": "EExchange_SAID",
"e": {
"acdc": {
"v": "ACDC10JSON000197_",
"d": "EACDC_SAID",
"i": "EIssuer_AID",
"a": "EAttributes_SAID"
}
}
}
Signature on ACDC: Path -e-acdc-a references attributes within the embedded credential.
Transposition: When the ACDC is extracted and streamed separately:
- Path Update: Change path from
-e-acdc-a to -a (relative to ACDC root)
- Signature Preservation: The signature value remains unchanged
- Verification: Signature verifies against the same SAID, now at a different path
Protocol Rule: Transposition is valid if:
- The signed SAID is preserved
- The path is updated to reflect the new structure
- The signature value is unchanged
- The signing AID and key state are unchanged
Message Exchange Patterns
CESR Proof Signatures supports several exchange patterns:
Pattern 1: Direct Credential Issuance
- Issuer constructs ACDC credential
- Issuer signs credential with CESR Proof Signature
- Issuer streams credential and signature to issuee
- Issuee verifies signature and stores credential
Pattern 2: Credential Presentation
- Holder retrieves stored credential and signature
- Holder optionally adds additional signatures (endorsements)
- Holder streams credential and signatures to verifier
- Verifier verifies all signatures
Pattern 3: Embedded Credential Exchange
- Discloser embeds credential within IPEX exchange message
- Discloser transposes signature attachments to reference embedded structure
- Discloser streams exchange message with transposed signatures
- Disclosee extracts credential and verifies signatures
Pattern 4: Graduated Disclosure
- Discloser sends compact credential (SAIDs only) with signatures
- Disclosee verifies signatures on SAIDs
- Discloser progressively reveals full content for verified SAIDs
- Disclosee verifies revealed content matches signed SAIDs
State Transitions
While the protocol is stateless, credential lifecycle involves state transitions:
Issuance State:
- Credential is signed by issuer
- Signature attachments reference credential structure
- Credential is recorded in TEL (Transaction Event Log)
Presentation State:
- Credential is retrieved from storage
- Signature attachments are verified
- Additional signatures may be added (endorsements)
Revocation State:
- Credential status is updated in TEL
- Signatures remain valid but credential is marked revoked
- Verifiers check TEL status during verification
Transposition State:
- Credential is embedded in different envelope
- Signature paths are updated to reflect new structure
- Signature values remain unchanged
Timing and Ordering Requirements
The protocol has minimal timing requirements:
Signature Generation: No time constraints, can be performed offline
Signature Verification: Requires access to:
- Current KEL for signing AID
- Current TEL for credential status (if applicable)
- Witness receipts for key state validation
Ordering: Signatures can be verified in any order, but:
- KEL events must be processed in order
- TEL events must be processed in order
- Signature verification depends on key state at time of signing
Expiration: Signatures do not expire, but:
- Credentials may have expiration dates
- Key state may change through rotation
- TEL status may change (revocation)
Security Properties
Threat Model
CESR Proof Signatures operates within the KERI threat model:
Assumptions:
- Cryptographic Primitives: Hash functions and signature algorithms are secure
- Key Management: Signing keys are protected by controller
- KEL Integrity: Key Event Logs are verifiable and duplicity-evident
- Witness Honesty: Sufficient witnesses are honest (threshold-based)
Adversary Capabilities:
- Network Control: Adversary can intercept, delay, or modify network traffic
- Witness Compromise: Adversary can compromise up to threshold of witnesses
- Computational Power: Adversary has bounded computational resources
- Quantum Resistance: Protocol supports post-quantum signature algorithms
Out of Scope:
- Key Compromise: If signing keys are compromised, signatures are invalid
- Social Engineering: Protocol does not protect against phishing or social attacks
- Implementation Bugs: Security depends on correct implementation
Security Guarantees
Authenticity: CESR Proof Signatures provide strong authenticity guarantees:
- Non-Repudiation: Signatures are cryptographically bound to signing AID
- Integrity: Signatures verify content has not been modified
- Attribution: Signatures prove authorship by controller of signing AID
Proof Mechanism:
- Signature verifies against public key in KEL
- KEL is verifiable back to inception event
- Witness receipts provide distributed consensus on key state
- Duplicity detection prevents equivocation
Confidentiality: The protocol provides limited confidentiality:
- Compact Disclosure: SAIDs hide content from rainbow table attacks (with sufficient entropy)
- Selective Disclosure: Only signed portions need be revealed
- Graduated Disclosure: Content can be revealed progressively
Limitations:
- Signatures do not encrypt content
- SAIDs without high-entropy nonces are vulnerable to rainbow tables
- Metadata (structure, field names) is visible even in compact form
Integrity: Strong integrity guarantees:
- Content Binding: SAIDs cryptographically bind to content
- Signature Binding: Signatures cryptographically bind to SAIDs
- Path Binding: Paths identify signed content within structure
Verification:
- Recompute SAID from disclosed content
- Verify recomputed SAID matches signed SAID
- Verify signature against SAID using public key
- Verify public key is current for signing AID
Attack Resistance
Forgery Attacks: Prevented by cryptographic signatures:
- Signature Forgery: Computationally infeasible without private key
- SAID Forgery: Requires finding hash collision (computationally infeasible)
- Path Manipulation: Changing path invalidates signature
Replay Attacks: Mitigated by context:
- Credential Replay: TEL status prevents reuse of revoked credentials
- Signature Replay: Signatures are bound to specific SAIDs
- Timestamp Binding: Credentials can include issuance timestamps
Man-in-the-Middle Attacks: Prevented by end-to-end verification:
- Content Modification: Invalidates SAID and signature
- Signature Stripping: Verifier requires valid signatures
- Key Substitution: KEL verification prevents key substitution
Duplicity Attacks: Detected by KERI mechanisms:
- Key State Equivocation: Witness receipts detect duplicity
- Credential Equivocation: TEL provides single source of truth
- Signature Equivocation: Signatures are deterministic
Rainbow Table Attacks: Mitigated by entropy:
- Public ACDCs: Vulnerable if content is predictable
- Private ACDCs: High-entropy UUID field prevents rainbow tables
- Selective Disclosure: Only revealed content is vulnerable
Quantum Attacks: Addressed by algorithm choice:
- Signature Algorithms: Protocol supports post-quantum algorithms
- Hash Functions: Protocol supports quantum-resistant hash functions
- Key Rotation: KERI supports key rotation to post-quantum keys
Privacy Properties
Selective Disclosure: Protocol enables fine-grained disclosure:
- Compact Form: Reveal only SAIDs, hide content
- Partial Disclosure: Reveal some sections, hide others
- Graduated Disclosure: Reveal content progressively
Unlinkability: Limited unlinkability properties:
- Credential Correlation: Different credentials from same issuer are linkable via issuer AID
- Presentation Correlation: Multiple presentations of same credential are linkable via credential SAID
- Holder Privacy: Holder AID may be pseudonymous
Metadata Leakage: Some metadata is always visible:
- Structure: Field names and nesting are visible
- Schema: Schema SAID reveals credential type
- Issuer: Issuer AID is always visible
Interoperability
Dependencies on KERI Protocols
CESR Proof Signatures has normative dependencies on:
KERI (Key Event Receipt Infrastructure):
- Provides AID (Autonomic Identifier) system
- Defines KEL (Key Event Log) structure
- Specifies witness and watcher roles
- Establishes duplicity detection mechanisms
CESR (Composable Event Streaming Representation):
- Defines encoding for cryptographic primitives
- Specifies text-binary composability
- Provides self-framing stream parsing
- Establishes derivation code system
SAID (Self-Addressing Identifier):
- Defines content-addressable identifier protocol
- Specifies digest computation rules
- Establishes self-referential data structures
ACDC (Authentic Chained Data Container):
- Primary use case for CESR Proof Signatures
- Defines credential structure and semantics
- Specifies chaining and provenance mechanisms
Integration with ACDC
CESR Proof Signatures is designed specifically for ACDC credentials:
Credential Signing:
- ACDC defines credential structure with SAID fields
- CESR Proof Signatures provides signature attachments
- Signatures reference ACDC sections via SAD Path Language
- Verification uses ACDC schema for path resolution
Chained Credentials:
- ACDC supports credential chains via edge sections
- Each credential in chain has independent signatures
- Signatures verify each credential's integrity
- Chain verification requires verifying all signatures
Selective Disclosure:
- ACDC defines compact and full disclosure variants
- CESR Proof Signatures supports signing both variants
- Signatures on compact form verify full form
- Graduated disclosure reveals content progressively
Integration with IPEX
The IPEX (Issuance and Presentation Exchange) protocol uses CESR Proof Signatures:
Issuance Exchange:
- Issuer signs ACDC with CESR Proof Signature
- Issuer embeds signed ACDC in IPEX exchange message
- Issuee verifies signature and stores credential
Presentation Exchange:
- Holder retrieves signed ACDC from storage
- Holder embeds ACDC in IPEX presentation message
- Verifier extracts ACDC and verifies signatures
Contractually Protected Disclosure:
- Discloser sends compact ACDC with signatures
- Disclosee verifies signatures on SAIDs
- Discloser reveals full content after agreement
- Disclosee verifies revealed content matches signed SAIDs
Integration with TEL
The TEL (Transaction Event Log) protocol tracks credential status:
Issuance Events:
- Issuer creates ACDC and signs with CESR Proof Signature
- Issuer anchors issuance event in TEL
- TEL event references credential SAID
- Verifiers check TEL for credential status
Revocation Events:
- Issuer creates revocation event in TEL
- Revocation event references credential SAID
- Signatures remain valid but credential is revoked
- Verifiers reject revoked credentials
Status Verification:
- Verifier extracts credential SAID
- Verifier queries TEL for status
- Verifier checks for revocation events
- Verifier accepts only non-revoked credentials
Integration with OOBI
The OOBI (Out-Of-Band Introduction) protocol enables discovery:
AID Discovery:
- Verifier receives signed ACDC
- Verifier extracts issuer AID
- Verifier uses OOBI to discover issuer's KEL
- Verifier verifies KEL and extracts public key
Witness Discovery:
- Verifier extracts witness list from KEL
- Verifier uses OOBI to discover witness endpoints
- Verifier queries witnesses for receipts
- Verifier verifies witness receipts
Schema Discovery:
- Verifier extracts schema SAID from ACDC
- Verifier uses OOBI to discover schema content
- Verifier retrieves schema for path resolution
- Verifier uses schema to validate credential structure
Implementation Considerations
Path Resolution Complexity
Implementing SAD Path Language requires careful handling:
Static Field Ordering: Implementations must:
- Preserve insertion order in dictionaries/maps
- Use ordered data structures (e.g., Python
OrderedDict, JavaScript Map)
- Serialize fields in consistent order
- Verify field order matches across serialization formats
Integer Index Resolution: Implementations must:
- Maintain field index mappings
- Handle both label and index path components
- Validate indices are within bounds
- Support efficient index lookup
Nested Structure Traversal: Implementations must:
- Recursively traverse nested field maps
- Handle both map and array contexts
- Validate path components match context type
- Provide clear error messages for invalid paths
Performance considerations for verification:
KEL Caching: Implementations should:
- Cache KEL data for frequently-used AIDs
- Update cache when new events are received
- Implement cache eviction policies
- Validate cached data is current
Batch Verification: Implementations can:
- Verify multiple signatures in parallel
- Batch KEL retrievals for multiple AIDs
- Optimize witness receipt verification
- Cache public keys for repeated verification
Incremental Verification: Implementations can:
- Verify signatures incrementally as content is disclosed
- Skip verification of already-verified SAIDs
- Cache verification results
- Provide partial verification status
Transposition Implementation
Implementing transposition requires:
Path Transformation: Implementations must:
- Parse original path from signature attachment
- Compute new path relative to new structure
- Validate new path resolves to same SAID
- Update signature attachment with new path
Signature Preservation: Implementations must:
- Preserve signature value unchanged
- Preserve signing AID unchanged
- Preserve signature index unchanged
- Update only the path reference
Validation: Implementations should:
- Verify transposed signature against original SAID
- Verify transposed signature against new structure
- Validate path transformation is correct
- Provide clear error messages for invalid transposition
Error Handling
Implementations should handle common error cases:
Path Resolution Errors:
- Invalid path syntax
- Path component not found
- Index out of bounds
- Type mismatch (label in array context, index in map context)
Signature Verification Errors:
- Invalid signature format
- Signature verification failure
- KEL not found for signing AID
- Public key not found in KEL
- Witness receipts insufficient
Content Verification Errors:
- SAID mismatch (recomputed vs. signed)
- Missing required fields
- Invalid field types
- Schema validation failure
Implementations should support multiple formats:
JSON:
- Use insertion-ordered dictionaries
- Preserve field order in serialization
- Handle Unicode characters correctly
- Validate JSON syntax
CBOR:
- Use CBOR maps with insertion order
- Handle CBOR data types correctly
- Validate CBOR encoding
- Support CBOR tags if needed
MessagePack:
- Use MessagePack maps with insertion order
- Handle MessagePack data types correctly
- Validate MessagePack encoding
- Support MessagePack extensions if needed
Format Conversion: Implementations should:
- Support conversion between formats
- Preserve field order across conversions
- Validate converted data matches original
- Provide clear error messages for conversion failures
Testing Strategies
Implementations should include comprehensive tests:
Unit Tests:
- Path resolution with various path expressions
- Signature generation and verification
- SAID computation and verification
- Transposition with various structures
Integration Tests:
- End-to-end credential issuance and verification
- Graduated disclosure workflows
- Embedded credential extraction and verification
- TEL status checking
Interoperability Tests:
- Cross-implementation signature verification
- Format conversion between implementations
- KEL and TEL compatibility
- OOBI discovery compatibility
Performance Tests:
- Signature verification throughput
- Path resolution performance
- KEL caching effectiveness
- Batch verification scalability
Security Implementation Notes
Key Management: Implementations must:
- Protect signing keys with appropriate security
- Use secure random number generation
- Implement key rotation mechanisms
- Support hardware security modules (HSMs) if needed
Cryptographic Algorithms: Implementations should:
- Support multiple signature algorithms (Ed25519, ECDSA, etc.)
- Support post-quantum algorithms (Dilithium, etc.)
- Use constant-time comparison for signature verification
- Validate algorithm parameters
Side-Channel Resistance: Implementations should:
- Use constant-time cryptographic operations
- Avoid timing-dependent branches
- Clear sensitive data from memory
- Use secure memory allocation if available
Dependency Management: Implementations should:
- Use well-vetted cryptographic libraries
- Keep dependencies up to date
- Audit dependencies for vulnerabilities
- Pin dependency versions for reproducibility