Loading vLEI.wiki
Fetching knowledge base...
Fetching knowledge base...
This comprehensive explanation has been generated from 179 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 is a serialized data structure that represents an atomic state transition in a Key Event Log (KEL), establishing or modifying the authoritative key state for an Autonomic Identifier (AID). Each key event is cryptographically signed and chained to previous events, forming a verifiable, append-only history of control authority.
A key event represents the fundamental unit of state change in KERI's identifier management system. From a concrete perspective, it is "the serialized data structure of an entry in the key event log for an AID." From an abstract perspective, it is "the data structure itself" that serves specific purposes within the KERI protocol.
Key events are the atomic transactions that establish, modify, or anchor data to the authoritative key state of an identifier. They form the building blocks of the Key Event Log (KEL), which provides the complete verifiable history of an identifier's control authority.
The key event data structure consists of three nested architectural layers:
1. Key Event Header: The innermost component containing core metadata including:
v): Protocol version and serialization formati): The AID this event pertains tos): Position in the KELt): Classification of the event (inception, rotation, interaction)d): Self-addressing identifier (SAID) of the eventp): Hash chain link to prior event2. Key Event Data: Spans the header and configuration sections, containing:
3. Key Event Message: The outermost layer encompassing:
d and i fields must contain identical SAIDs#) of exact target length before computing digesti field indicates whether identifier is self-addressingd field SAID computation-AAB prefix) for multi-sig scenariosbt) indicates minimum receipts requiredba) and cuts (br) modify witness set during rotationsp) field MUST match computed digest of previous eventThis hierarchical structure enables efficient processing, verification, and transmission of key events while maintaining cryptographic integrity at each layer.
Key events are categorized into two fundamental classes:
Establishment Events: Events that establish or change the authoritative key state:
icp): The first event that creates an AID and establishes initial key staterot): Changes the authoritative keypairs through KERI's pre-rotation mechanismEstablishment events form a critical subsequence within the KEL that defines the complete history of control authority changes.
Non-Establishment Events: Events that do not change key state:
ixn): Anchors external data to the current key state without modifying control authorityThis distinction is architecturally significant because validators can efficiently determine current key state by processing only the establishment event subsequence, while interaction events provide additional functionality without complicating key state computation.
Key events are serialized using CESR (Composable Event Streaming Representation) encoding, which supports multiple serialization formats:
Primary Formats:
KERI10JSON): Human-readable text format for development and debuggingThe version string in each event explicitly identifies the serialization format, enabling parsers to correctly interpret the event structure.
KERI mandates insertion-ordered field maps where field order is preserved during serialization/deserialization. This ordering is critical for:
The normative field ordering for establishment events follows:
[v, t, d, i, s, p, kt, k, nt, n, bt, b, c, a]
Where:
v: Version stringt: Event type (ilk)d: Event SAIDi: Identifier prefixs: Sequence number (hex-encoded)p: Previous event digestkt: Current signing thresholdk: Current signing keys arraynt: Next signing thresholdn: Next key digests array (pre-rotation)bt: Witness thresholdb: Witness identifier arrayc: Configuration arraya: Anchoring seals arrayAll cryptographic material in key events is encoded as qualified CESR primitives:
Derivation Codes: Prepended codes indicating the cryptographic algorithm:
E: Ed25519 public key or Blake3-256 digestD: Ed25519 public keyB: Ed25519 non-transferable prefixExample qualified primitive:
EDSxKwKSZZq672OtzOlokik6L0rr3TtWrZDiHfnATU9j
The first character (E) is the derivation code, followed by the Base64 URL-safe encoded cryptographic material.
Key events must align on 24-bit boundaries to maintain CESR composability:
This alignment ensures lossless round-trip conversion between text and binary representations without crossing primitive boundaries.
Inception Event Creation:
Key Generation: Generate two sets of asymmetric key pairs:
Digest Computation: Compute cryptographic digests of next keys:
next_digest = Blake3(next_public_key)
Event Construction: Build the inception event structure:
{
"v": "KERI10JSON0000e6_",
"t": "icp",
"d": "",
"i": "",
"s": "0",
"kt": "1",
"k": ["<current_key>"],
"nt": "1",
"n": ["<next_key_digest>"],
"bt": "2",
"b": ["<witness1>", "<witness2>"],
"c": [],
"a": []
}
SAID Derivation: For self-addressing identifiers:
d and i fields with dummy characters (#)d and i contain identical valuesSignature Generation: Sign the complete event with current private key
Attachment: Append CESR-encoded signature as attachment
Rotation Event Creation:
Key Revelation: Reveal the pre-rotated keys from previous event
New Pre-rotation: Generate new next keys and compute digests
Event Construction: Build rotation event referencing previous event:
{
"v": "KERI10JSON000160_",
"t": "rot",
"d": "",
"i": "<identifier>",
"s": "1",
"p": "<previous_event_digest>",
"kt": "1",
"k": ["<revealed_key>"],
"nt": "1",
"n": ["<new_next_digest>"],
"bt": "2",
"br": [],
"ba": [],
"a": []
}
Verification: Ensure revealed key matches digest from previous event
Signing: Sign with revealed (now current) private key
Interaction Event Creation:
Seal Construction: Create anchoring seals for external data:
{
"i": "<identifier>",
"s": "<sequence>",
"d": "<digest>"
}
Event Construction: Build interaction event:
{
"v": "KERI10JSON000098_",
"t": "ixn",
"d": "",
"i": "<identifier>",
"s": "2",
"p": "<previous_event_digest>",
"a": [<seals>]
}
Signing: Sign with current authoritative keys
Verification follows a multi-stage process:
1. Structural Validation:
2. Cryptographic Verification:
3. Hash Chain Verification:
p field in current event4. Pre-rotation Verification (for rotations):
k fieldn field5. Sequence Validation:
6. Threshold Verification:
kt thresholdProcessing key events involves updating the key state:
Key State Computation:
Initialize: Start with empty key state
Process Inception:
k fieldkt fieldn fieldnt fieldProcess Rotations:
Process Interactions:
Result: Current authoritative key state for identifier
Key events serve as the fundamental building blocks of KERI's identifier management:
Primary Functions:
Security Properties:
Key events are stored in Key Event Logs (KELs):
KEL Structure:
KEL Properties:
Key events are receipted by witnesses:
Receipt Process:
rct)Receipt Structure:
{
"v": "KERI10JSON000091_",
"t": "rct",
"d": "<event_digest>",
"i": "<identifier>",
"s": "<sequence>"
}
Receipts transform a KEL into a Key Event Receipt Log (KERL), providing distributed consensus on event history.
Key events anchor Transaction Event Logs (TELs) for credential management:
Anchoring Mechanism:
Seal Structure:
{
"i": "<registry_identifier>",
"s": "<tel_sequence>",
"d": "<tel_event_digest>"
}
This anchoring provides cryptographic binding between credential state and identifier control authority.
Key events support ACDC (Authentic Chained Data Container) credentials:
Issuer Binding: ACDC issuer field (i) references an AID whose key state is established by key events
Signature Verification: ACDC signatures are verified against current keys from key state derived from key events
Revocation: ACDC revocation status is anchored to key events via TEL seals
Delegation: ACDC delegation chains follow AID delegation established through key events
Creation Phase:
Active Phase:
Rotation Phase:
Abandonment:
Event Size:
Processing Speed:
Storage Requirements:
Key Event Message: Encompasses key event data plus signature attachments
Key Event Receipt: References key event and includes witness signatures
Key State: Derived from processing key event sequence
Establishment Event: Subset of key events that modify key state
Non-Establishment Event: Subset of key events that anchor data without key state changes
ktk arraydi field referencing delegator