Loading vLEI.wiki
Fetching knowledge base...
Fetching knowledge base...
This comprehensive explanation has been generated from 70 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.
CBOR (Concise Binary Object Representation) is a binary data serialization format defined in RFC 8949 that provides a compact alternative to JSON, maintaining similar structural flexibility while achieving greater efficiency through binary encoding at the cost of human readability.
CBOR (Concise Binary Object Representation) is a binary serialization format specified in RFC 8949 that encodes data objects containing name-value pairs in a more compact form than JSON. CBOR maintains JSON's structural flexibility—supporting the same types of data objects including nested field maps—but represents them in binary format rather than human-readable text. This design choice results in:
Within the KERI ecosystem, CBOR serves as one of several supported serialization formats alongside JSON, MessagePack (MGPK), and CESR. CBOR's role is particularly significant in several contexts:
ACDC (Authentic Chained Data Container) specifications explicitly support CBOR as a serialization option. The field in ACDCs includes format indicators that specify whether the credential is serialized as JSON, CBOR, or MGPK. This multi-format support enables applications to choose the most appropriate encoding for their use case—text-based JSON for debugging and human inspection, or binary CBOR for production transmission efficiency.
CBOR blocks in CESR streams are detected by the sniffer component, which identifies CBOR's binary signature. The parser then uses regex patterns to locate the version string and extract the byte count defining the CBOR block's boundaries.
Implementations should choose CBOR for production transmission where bandwidth and processing efficiency matter, but use JSON for development, debugging, and human-readable archives. The ACDC specification's support for multiple formats enables this flexibility without requiring protocol changes.
CBOR's ability to distinguish text strings from byte strings is critical for KERI's cryptographic operations. Implementations must preserve this distinction when converting between formats to maintain the integrity of cryptographic primitives like SAIDs and signatures.
CESR's interleaved serialization capability allows CBOR-encoded data to be embedded within CESR streams alongside other formats. CESR employs special count codes that act as framing indicators, enabling the sniffer component in Parside to detect CBOR blocks and extract their length from embedded version strings. This allows parsers to handle mixed-format streams where CBOR sections alternate with JSON, MGPK, or native CESR primitives.
CBOR was inspired by MessagePack, an earlier binary serialization format developed by Sadayuki Furuhashi. CBOR extended MessagePack's capabilities by introducing the ability to distinguish text strings from byte strings—a critical enhancement for cryptographic applications where precise handling of binary data (keys, signatures, digests) versus textual identifiers is essential. This distinction was subsequently implemented in MessagePack itself in 2013, demonstrating CBOR's influence on binary serialization standards.
The binary nature of CBOR provides measurable advantages in KERI implementations:
CBOR exemplifies the fundamental trade-off in binary serialization: optimizing for machine efficiency at the expense of human readability. Unlike JSON, which can be easily read and edited by humans in text form, CBOR requires decoding tools to interpret its binary representation. This makes CBOR suitable for:
Conversely, JSON remains preferable for development, debugging, logging, and scenarios where human inspection of data is valuable.