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.
In KERI's cryptographic architecture, a proem is a prepended derivation code that qualifies a cryptographic primitive by explicitly indicating the cryptographic algorithm or suite used for that primitive's derivation. The term "proem" literally means "introductory statement" or "preamble," which perfectly describes its function: it introduces and contextualizes the cryptographic data that follows.
When a cryptographic primitive (such as a digest, signature, or public key) is qualified with a proem, it becomes self-describing—the primitive carries its own metadata about how it was generated. This eliminates ambiguity about which cryptographic operations were applied and enables automated processing without external context.
Proems are fundamental to CESR (Composable Event Streaming Representation), KERI's dual text-binary encoding scheme. All cryptographic primitives expressed in CESR are qualified by definition, meaning they include a proem whether represented in text or binary format. This qualification is cited as an essential property of CESR in the IETF-KERI specification.
The proem serves two critical purposes:
Simplification: By embedding cryptographic metadata directly within the primitive, proems eliminate the need for separate schema definitions or external lookup tables to interpret the data. A verifier can immediately determine which algorithm was used simply by reading the proem.
Compactification: Rather than requiring verbose metadata structures, the proem provides a compact, standardized way to convey essential cryptographic information. This is particularly important for KERI's streaming protocols where bandwidth efficiency matters.
In practice, proems enable KERI's self-framing property—a parser can determine exactly how many characters (in text domain) or bytes (in binary domain) to extract from a stream for a given element without parsing the entire element. This supports and enables across text and binary domains.
Proems are typically 1-4 characters in text domain or 1-2 bytes in binary domain, depending on the primitive type and algorithm. The CESR specification defines standardized proem codes for common cryptographic operations.
Parsers must recognize proem codes to correctly interpret CESR streams. The proem determines:
Proems enable text-binary concatenation composability—any set of qualified primitives can be converted between text and binary domains without loss, because the proem preserves all necessary interpretation context.
Proems are also called derivation codes or framing codes in KERI documentation, though "proem" emphasizes their introductory, self-describing nature. They appear at the beginning of every qualified primitive, including SAIDs (Self-Addressing Identifiers), digests, signatures, and public keys used throughout KELs (Key Event Logs) and ACDCs (Authentic Chained Data Containers).