Loading vLEI.wiki
Fetching knowledge base...
Fetching knowledge base...
This comprehensive explanation has been generated from 15 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.
Post-padding is the action of extending a string with trailing pad characters (typically '=') to align the encoded data to a specific length in bits or bytes, ensuring proper boundary alignment for encoding schemes.
Post-padding is a string manipulation technique that appends trailing pad characters to encoded data to achieve alignment on specific bit or byte boundaries. In the context of CESR (Composable Event Streaming Representation), post-padding specifically refers to adding trailing = characters to Base64-encoded text to ensure the total length is an integer multiple of 4 characters, thereby achieving the required 24-bit boundary alignment.
This technique contrasts with pre-padding, which adds leading zero bytes to raw binary data before Base64 conversion. Both approaches serve the same fundamental purpose: ensuring that encoded primitives align on 24-bit boundaries to satisfy CESR's critical composability property.
Post-padding plays a foundational role in CESR's dual text-binary encoding architecture, which is essential infrastructure for KERI (Key Event Receipt Infrastructure) and ACDC (Authentic Chained Data Container) protocols.
CESR requires all primitives to align on 24-bit boundaries because:
For post-padding in Base64:
= characters until length is a multiple of 4= characters are ever neededWhile post-padding is conceptually simpler, CESR specifications prefer pre-padding because:
= characters in the text domainSystems interfacing with CESR must:
= characters appropriatelyPost-padding follows the traditional naive Base64 encoding approach:
= characters to reach a multiple of 4 characters= characters explicitly mark padding in the text domainPre-padding (CESR's preferred approach):
= characters are neededWhile post-padding is conceptually simpler and matches familiar Base64 conventions, CESR generally avoids it because:
= characters must be handled during stream parsingUnderstanding post-padding is essential for:
The distinction between post-padding and pre-padding represents a key design decision in CESR that optimizes for stream processing efficiency while maintaining compatibility with standard Base64 encoding conventions.