Loading vLEI.wiki
Fetching knowledge base...
Fetching knowledge base...
This comprehensive explanation has been generated from 172 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.
A key event receipt is a fundamental data structure in the KERI (Key Event Receipt Infrastructure) protocol that serves as cryptographic evidence that one or more witnesses have received, verified, and attested to a specific key event. Unlike the key event itself, which represents a state change in an AID's control authority, a key event receipt is a separate message that provides independent verification of that event's existence and validity.
The key event receipt consists of two mandatory components:
Body: A reference structure that identifies the key event being receipted. Rather than duplicating the entire key event, the body contains identifying information that uniquely points to the event, typically including:
Attachments: One or more cryptographic signatures from witnesses. The specification uses "MUST" to indicate this is a protocol-level requirement - a key event receipt without witness signatures is invalid. Each signature attachment:
The key event receipt deliberately separates the reference (body) from the attestation (signatures). This design provides several advantages:
Key event receipts follow KERI's standard message format using CESR encoding. The structure typically appears as:
{Event Reference Body}
{CESR-encoded Signature Attachments}
The body of a key event receipt is a structured message that references the target event. Based on the source documents, the body includes:
v): Indicates the KERI protocol version (e.g., KERI10JSON)t): Typically rct (receipt) or vrc (verifiable credential receipt)i): The AID of the witness providing the receipts): The witness's own sequence numbera): Contains references to the receipted event:
i): The AID whose event is being receipteds): The sequence number of the receipted eventd): The SAID of the receipted eventSignature attachments use CESR encoding with specific framing codes:
-CAB for witness receipts)Key event receipts support multiple serialization formats:
KERI10JSON version stringAll formats maintain the same logical structure and can be converted between domains using CESR's composability properties.
The creation of a key event receipt follows a specific workflow:
Multiple witnesses can provide receipts for the same event. These receipts can be:
The aggregation process maintains the independence of each witness's attestation while enabling efficient transmission.
Validators verify key event receipts through a multi-step process:
Receipt Structure Validation:
Event Reference Resolution:
Witness Signature Verification:
Threshold Validation:
Key event receipts are stored in KERLs (Key Event Receipt Logs), which combine:
This combined structure enables validators to verify both the events and their witness attestations as a unified verifiable data structure.
Key event receipts serve multiple critical functions in KERI:
Distributed Consensus: Receipts enable witnesses to reach agreement on key events without requiring a shared ledger or blockchain. The KAACE (KERI's Agreement Algorithm for Control Establishment) uses receipts to achieve Byzantine fault-tolerant consensus.
Duplicity Detection: When a controller creates conflicting versions of an event (duplicity), witnesses will receipt different versions. Comparing receipts from multiple witnesses reveals this duplicity, as witnesses will have signed different event digests.
Availability: Receipts enable indirect mode operation where validators can verify events even when the controller is offline. Witnesses maintain receipted events and can provide them to validators on demand.
Accountability: The TOAD mechanism uses receipts to establish accountability. When M witnesses receipt an event, the controller accepts accountability for that event, even if some witnesses are faulty.
Key event receipts follow a specific lifecycle:
Receipts are never deleted or modified - they form part of the immutable audit trail for an identifier's history.
Key event receipts interact with several other KERI data structures:
Key event receipts enable different operational modes in KERI:
Key event receipts provide several security guarantees:
M witnesses cannot prevent event validationKey event receipts impact system performance in several ways:
These costs are offset by the security benefits of distributed consensus and duplicity detection.
Witnesses implement receipt generation as an asynchronous process:
This asynchronous pattern prevents blocking on cryptographic operations and enables high throughput.
Validators can collect receipts using different strategies:
The choice depends on latency requirements, network conditions, and validation frequency.
Implementations optimize receipt verification through:
These optimizations significantly improve validation performance in high-throughput scenarios.
Implementations must handle various error conditions:
Robust error handling ensures the system degrades gracefully under adverse conditions.
Witnesses should generate receipts immediately after successful event validation to minimize latency. However, implementations must handle:
CESR signature attachments use specific framing codes:
-AAB: Single indexed signature-CAB: Multiple witness receipts (count code + signatures)Implementations should optimize receipt storage:
When validating receipt thresholds:
Implementations must detect duplicity through receipt comparison: