Loading vLEI.wiki
Fetching knowledge base...
Fetching knowledge base...
This comprehensive explanation has been generated from 60 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.
In CESR, concatenation is the operation of joining self-framing primitives end-to-end to form streams, where the composability property ensures that concatenated primitives can be converted en-masse between text and binary domains without loss while maintaining individual primitive separability.
Concatenation in the context of CESR (Composable Event Streaming Representation) is the fundamental operation of joining character strings or byte sequences end-to-end. While the classical computer science definition is straightforward (e.g., "snow" + "ball" = "snowball"), CESR's implementation of concatenation is architecturally significant because it enables the protocol's defining property: text-binary concatenation composability.
In CESR, concatenation is an associative operation that can be applied to any two primitives or any two groups of concatenated primitives, functioning equivalently in both the text domain (Base64 URL-safe characters) and binary domain (raw bytes). The critical innovation is that concatenated primitives remain individually parseable after domain conversion—a property that naive Base64 encoding cannot achieve.
Concatenation is foundational to KERI's event streaming architecture and ACDC's verifiable credential structures. The protocol requires efficient serialization of cryptographic material (signatures, digests, keys) alongside structured data, all while maintaining the ability to:
Implementations must parse concatenated CESR streams by:
This sequential parsing is enabled by self-framing and does not require lookahead or backtracking.
When converting concatenated primitives between domains:
For high-throughput applications:
Invalid concatenations occur when:
Implementations should fail fast on invalid streams to prevent security vulnerabilities from malformed data.
The composability property means that converting a group of concatenated primitives between domains produces the same result as converting each primitive individually and then concatenating. Formally:
T(cat(b[k])) = cat(T(b[k])) for all k
B(cat(t[k])) = cat(B(t[k])) for all k
This property is achieved through 24-bit boundary alignment—every primitive in the text domain is an integer multiple of 4 Base64 characters (24 bits), and every primitive in the binary domain is an integer multiple of 3 bytes (24 bits). This alignment ensures that domain conversions never fragment primitive boundaries.
Concatenation's power depends on CESR's self-framing property. Each primitive contains its own type and length information through prepended derivation codes, enabling parsers to:
In KEL (Key Event Log) processing, concatenation enables:
The group framing codes (count codes) in CESR enable pipelined processing where parsers can extract entire groups of concatenated primitives without parsing individual elements, supporting efficient multiplexing and de-multiplexing operations.