Loading vLEI.wiki
Fetching knowledge base...
Fetching knowledge base...
This comprehensive explanation has been generated from 11 GitHub source documents. All source documents are searchable here.
Last updated: October 7, 2025
This content is meant to be consumed by AI agents via MCP. Click here to get the MCP configuration.
Note: In rare cases it may contain LLM hallucinations.
For authoritative documentation, please consult the official GLEIF vLEI trainings and the ToIP Glossary.
A context-specific CESR encoding scheme that uses a two-character text code to compactly represent signatures in thresholded multi-signature schemes, where the first character identifies the signature type and the second character encodes a Base64 integer index pointing to the corresponding public in an ordered set.
Dual-indexed codes represent a specialized encoding mechanism within the CESR (Composable Event Streaming Representation) framework, specifically designed to address the common use case of thresholded multi-signature schemes. This compact coding approach provides an efficient method to associate each signature with its corresponding public key through embedded indexing, eliminating the need for separate mapping structures while maintaining CESR's composability properties.
A dual-indexed code is a two-character text domain primitive in CESR that encodes both:
This encoding scheme is optimized for signatures with a 64-byte raw binary size, which results in a pad size of 2, naturally accommodating the two-character text code structure required for efficient stream processing.
In KERI multi-signature scenarios, particularly those involving threshold signature schemes, multiple signatures from different keys may be required to authorize an establishment event or interaction event. The dual-indexed code provides an elegant solution for:
Dual-indexed codes are designed to work with popular signature formats that produce 64-byte raw binary signatures. This size characteristic is fundamental to the encoding scheme's efficiency. Common signature schemes that fit this profile include:
The dual-indexed code mechanism itself does not alter the cryptographic security properties of the underlying signatures. Instead, it provides:
The dual-indexed code leverages CESR's text domain encoding to achieve efficient signature-to-key mapping:
First Character (Selector and Type Code):
Second Character (Base64-Encoded Index):
In CESR's text domain, a dual-indexed code appears as a two-character prefix followed by the Base64-encoded signature data:
[Type Code][Index][Base64 Signature Data]
For example, if the type code is 'A' and the index is 3 (Base64 'D'), the complete encoded signature would begin with "AD" followed by the signature's Base64 representation.
In CESR's binary domain, the dual-indexed code maintains equivalent information density:
Dual-indexed codes maintain CESR's critical text-binary concatenation composability property:
Dual-indexed codes are primarily used in KERI establishment events that require multiple signatures:
When creating a multi-sig AID, the inception event may include signatures from multiple initial controlling keys. Each signature uses a dual-indexed code to indicate which key from the initial key set produced that signature.
The 2022 evolution of KERI's rotation rules created the forcing function that necessitated dual-indexed codes. The new rotation mechanism allows:
This flexibility requires dual-indexed codes to clearly identify which keys (current or pre-rotated) are signing the rotation event, enabling proper threshold verification.
In threshold signature schemes, validators use dual-indexed codes to:
In KERI's witness infrastructure, dual-indexed codes enable efficient representation of witness receipts:
In ACDC (Authentic Chained Data Container) credentials, dual-indexed codes support:
Dual-indexed codes are a specialized form of indexed signatures (also called "sigers" in KERI implementations). The key distinction:
Dual-indexed codes work in conjunction with CESR count codes and group codes:
The first character of a dual-indexed code is a derivation code that:
The introduction of dual-indexed codes in CESR was directly driven by changes in KERIpy, the Python reference implementation of KERI:
Pre-2022 Implementation:
Post-2022 Implementation:
This evolution demonstrates how protocol refinements in KERI drive corresponding changes in the underlying CESR serialization mechanisms to maintain security guarantees while improving operational efficiency.
Dual-indexed codes enable highly efficient stream processing:
The single-character index encoding limits dual-indexed codes to:
Validators processing dual-indexed codes follow this procedure:
Parse the two-character code:
Retrieve the indexed public key:
Verify the signature:
Threshold validation:
Dual-indexed codes exemplify CESR's design philosophy of maximizing information density while preserving composability. By embedding key index information directly in the signature encoding, KERI achieves:
This encoding technique demonstrates how careful attention to data representation can significantly impact the efficiency and elegance of cryptographic protocols, particularly in streaming and event-driven architectures like KERI.
Dual-indexed codes support a maximum of 64 keys in the indexed set due to the single Base64 character encoding of the index (6 bits = 2^6 = 64 possible values). Implementations must:
The effectiveness of dual-indexed codes depends on maintaining a consistent ordered key set across all participants:
Post-2022 rotation rules require verifying signatures against two threshold types:
Implementations must:
When parsing CESR streams containing dual-indexed codes:
For high-performance implementations:
Implementations should handle these error conditions:
To ensure interoperability across KERI implementations: