Loading vLEI.wiki
Fetching knowledge base...
Fetching knowledge base...
This comprehensive explanation has been generated from 57 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 computing, a pad character is used to fill empty space when applications require fields of a particular length. Within the CESR (Composable Event Streaming Representation) protocol, KERI introduces specific terminology to distinguish between different padding mechanisms:
= in Base64) added after encodingThis terminological distinction is critical for understanding CESR's encoding mechanics and avoiding confusion between pre-conversion and post-conversion padding strategies.
CESR requires strict 24-bit boundary alignment to satisfy its composability property. This alignment is the least common multiple of:
Without proper alignment, conversions between text and binary domains would create bit-level dependencies between adjacent primitives, breaking composability.
CESR supports two distinct methods for achieving 24-bit alignment:
1. Post-Padding (Naive Base64)
Implementers must understand when to use each padding approach:
= charactersThe distinction between 'pad character' and 'lead bytes' is not merely semantic:
All CESR primitives must align on 24-bit boundaries:
In CESR, the positions where pad characters would appear in naive Base64 are instead occupied by derivation codes that provide type information. This dual-purpose use of the pad positions is a key CESR optimization.
When implementing CESR encoding:
ps = (3 - (N % 3)) % 3= characters appear in output=2. Pre-Padding (CESR Approach)
=A notable property that can cause confusion: the number of pad characters in post-conversion padding equals the number of lead bytes in pre-conversion padding. However, these are fundamentally different operations occurring at different stages of the encoding process.
The pre-padding approach using lead bytes is essential for CESR's design goals:
= characters in CESR streamsBy prepending zeros to the binary representation before encoding, rather than appending pad characters after encoding, CESR achieves more efficient and predictable encoding suitable for streaming cryptographic primitives.