Loading vLEI.wiki
Fetching knowledge base...
Fetching knowledge base...
This comprehensive explanation has been generated from 221 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.
KERI (Key Event Receipt Infrastructure) is a protocol specification that provides a decentralized key management infrastructure (DKMI) using self-certifying identifiers, cryptographically verifiable key event logs, and a novel [pre-rotation](/concept/pre-rotation "Pre-rotation is a cryptographic mechanism in KERI where a controller commits to ...") mechanism to enable secure, portable, and end-verifiable control over digital identifiers without reliance on centralized authorities or blockchains.
KERI is a protocol specification designed to solve the universal secure attribution problem on the internet by providing a cryptographic root-of-trust for digital identifiers. The protocol establishes a trust spanning layer that enables secure, verifiable control over identifiers without dependence on centralized infrastructure, blockchains, or trusted third parties.
The fundamental innovation of KERI is the creation of Autonomic Identifiers (AIDs) - self-managing, self-certifying identifiers that provide:
KERI addresses the core flaw in the original Internet Protocol design: the lack of a built-in security layer. By providing a protocol-level solution for secure attribution, KERI enables the creation of an "authentic web" where all data has verifiable proof-of-authorship.
KERI is formally specified in multiple authoritative documents:
IETF Internet Draft: The primary specification is maintained as an IETF Internet Draft titled "Key Event Receipt Infrastructure (KERI)" authored by Samuel M. Smith. This draft defines the protocol's core mechanisms, message formats, and security properties.
Implementations MUST support the version upgrade policies defined in the vLEI Ecosystem Governance Framework:
All implementations MUST:
Implementations should separate key management functions:
For production deployments:
Implementations MUST:
Trust over IP Foundation Specification: The Trust over IP Foundation's KERI specification provides the canonical technical specification, currently at version 0.9 Draft status. This specification is maintained by the Technical Stack Working Group and serves as the normative reference for implementers.
KERI Whitepapers: Two comprehensive whitepapers provide theoretical foundations:
Related Specifications: KERI is part of a suite of specifications including:
KERI has evolved through several major phases:
Early Development (2019-2020): Initial protocol design and whitepaper publication established core concepts of self-certifying identifiers, pre-rotation, and key event logs.
IETF Standardization (2020-2021): Migration to IETF Internet Draft process for formal standardization, with multiple draft revisions incorporating community feedback.
Trust over IP Adoption (2021-2022): Governance transition to Trust over IP Foundation's Technical Stack Working Group, establishing KERI as part of the ToIP technology stack.
Production Deployment (2022-present): GLEIF's vLEI (verifiable Legal Entity Identifier) ecosystem represents the first major production deployment, validating KERI's architecture at scale.
Current Status: The protocol is at version 0.9 Draft with active implementation in multiple programming languages (Python, Rust, Go, JavaScript, Swift) and ongoing refinement based on production experience.
KERI implements a hourglass architecture that serves as a trust spanning layer for the internet:
Application Layer: Applications built on KERI (credentials, supply chain, IoT, etc.) ↓ KERI Protocol Layer: Core identifier and key management protocol (the "waist") ↓ Infrastructure Layer: Witnesses, watchers, registries, and supporting services ↓ Transport Layer: HTTP, TCP, or other transport mechanisms
This architecture enables KERI to span across different platforms and applications while maintaining consistent security properties.
The KERI ecosystem comprises several architectural components:
Controllers: Entities that manage AIDs by:
Witnesses: Designated entities that:
Watchers: Entities that:
Judges and Juries: Advanced components for:
Registries: Transaction Event Logs (TELs) that:
KERI's data flow follows a publish-subscribe pattern with cryptographic verification:
Identifier Creation Flow:
Key Rotation Flow:
Verification Flow:
KERI uses event sourcing for state management:
Key Event Log (KEL): The KEL is an append-only, cryptographically chained log of key events. Each event contains:
Key State: The current authoritative state of an identifier is derived by processing the KEL from inception to the latest event. Key state includes:
State Reconstruction: Any party can reconstruct key state by replaying the KEL, enabling end-verifiable trust without reliance on external state databases.
Escrow State: KERI implementations maintain escrow state for events awaiting dependencies (out-of-order events, missing signatures, etc.). This enables fully asynchronous operation.
KERI defines several core message types, all encoded using CESR:
Inception Event (icp): Establishes a new identifier
{
"v": "KERI10JSON0000e6_",
"t": "icp",
"d": "EH7Oq9oxCgYa-nnNLvwhp9sFZpALILlRYyB-6n4WDi7w",
"i": "EH7Oq9oxCgYa-nnNLvwhp9sFZpALILlRYyB-6n4WDi7w",
"s": "0",
"kt": "1",
"k": ["DaU6JR2nmwyZ-i0d8JZAoTNZH3ULvYAfSVPzhzS6b5CM"],
"nt": "1",
"n": ["EZ-i0d8JZAoTNZH3ULvaU6JR2nmwyYAfSVPzhzS6b5CM"],
"bt": "0",
"b": [],
"c": [],
"a": []
}
Rotation Event (rot): Rotates keys for an identifier
{
"v": "KERI10JSON0000e6_",
"t": "rot",
"d": "E8JZAoTNZH3ULvYAfSVPzhzaU6JR2nmwyZS6b5CMi0d",
"i": "EH7Oq9oxCgYa-nnNLvwhp9sFZpALILlRYyB-6n4WDi7w",
"s": "1",
"p": "EH7Oq9oxCgYa-nnNLvwhp9sFZpALILlRYyB-6n4WDi7w",
"kt": "1",
"k": ["DZ-i0d8JZAoTNZH3ULvaU6JR2nmwyYAfSVPzhzS6b5CM"],
"nt": "1",
"n": ["EYAfSVPzhzaU6JR2nmwyZi0d8JZAoTNZH3ULvS6b5CM"],
"bt": "0",
"br": [],
"ba": [],
"a": []
}
Interaction Event (ixn): Anchors data without changing keys
{
"v": "KERI10JSON0000e6_",
"t": "ixn",
"d": "ETNZH3ULvYAfSVPzhzaU6JR2nmwyZi0d8JZS6b5CM",
"i": "EH7Oq9oxCgYa-nnNLvwhp9sFZpALILlRYyB-6n4WDi7w",
"s": "2",
"p": "E8JZAoTNZH3ULvYAfSVPzhzaU6JR2nmwyZS6b5CMi0d",
"a": []
}
Receipt (rct): Witness attestation of an event
{
"v": "KERI10JSON0000e6_",
"t": "rct",
"d": "EH7Oq9oxCgYa-nnNLvwhp9sFZpALILlRYyB-6n4WDi7w",
"i": "EpDA1n-WiBA0A8YOqnKrB-wWQYYC49i5zY_qrIZIicQg",
"s": "0"
}
KERI uses CESR (Composable Event Streaming Representation) for all message encoding:
Text Domain: Base64 URL-safe encoding for human-readable formats
Binary Domain: Compact binary encoding for efficiency
Composability: CESR's key innovation is text-binary concatenation composability - any set of primitives can be converted between text and binary domains without loss.
KERI events use standardized field labels:
Common Fields:
v: Version string (format: KERI10JSON0000e6_)t: Event type (icp, rot, ixn, rct, etc.)d: Event digest (SAID of the event)i: Identifier prefix (AID)s: Sequence number (hex-encoded)p: Prior event digest (backward chaining)Key Management Fields:
kt: Current signing thresholdk: Current signing keys (array)nt: Next signing thresholdn: Next key digests (pre-rotation commitment)Witness Fields:
bt: Witness threshold (TOAD)b: Witness identifiers (array)br: Witness cuts (removals)ba: Witness adds (additions)Configuration Fields:
c: Configuration traits (array of strings)a: Anchoring seals (array)Delegation Fields:
di: Delegator identifierda: Delegating event sealAll fields follow insertion-ordered serialization to enable reproducible SAID computation.
KERI implements several message exchange patterns:
Direct Mode: Peer-to-peer exchange between controllers
Indirect Mode: Witness-mediated exchange
Watcher Mode: Ambient duplicity detection
KERI identifiers transition through defined states:
Inception State: Initial state after inception event
Rotated State: State after rotation event
Delegated State: State for delegated identifiers
Abandoned State: Terminal state
KERI has specific timing and ordering properties:
Monotonic Sequence Numbers: Events must have strictly increasing sequence numbers within a KEL.
Backward Chaining: Each event (except inception) must reference the digest of the immediately prior event.
Forward Chaining: Each establishment event must commit to next keys via digest.
First-Seen Policy: Witnesses and watchers record the first version of any event they observe, making duplicity evident.
Asynchronous Processing: KERI is fully asynchronous - no global ordering required across different identifiers.
Escrow Mechanism: Events may arrive out-of-order and are escrowed until dependencies are satisfied.
No Liveness Requirement: KERI does not require liveness guarantees - identifiers can be offline indefinitely.
KERI's security model addresses several threat categories:
Key Compromise Threats:
Network Threats:
Infrastructure Threats:
KERI provides several formal security guarantees:
Cryptographic Root-of-Trust: Identifiers are cryptographically bound to key material through one-way functions with 128+ bits of entropy.
End-Verifiability: Any party can verify control authority by processing the KEL without trusting intermediaries.
Duplicity Evidence: Conflicting key states are cryptographically evident and cannot be hidden.
Non-Repudiation: All events are signed by controlling keys, creating non-repudiable commitments.
Post-Quantum Resistance: Pre-rotation using cryptographic digests provides protection against quantum attacks on current keys.
Ambient Verifiability: Anyone, anywhere, at any time can verify any KEL ("any-data, any-where, any-time by any-body").
KERI resists specific attack vectors:
Replay Attack Protection: Sequence numbers and event digests prevent replay attacks.
Sybil Attack Resistance: Witness pools with threshold requirements resist Sybil attacks.
Collision Attack Resistance: 128-bit cryptographic strength makes collision attacks computationally infeasible.
Quantum Attack Resistance: Pre-rotation mechanism provides forward security even if current cryptography is broken.
Duplicity Detection: First-seen policy and watcher networks make duplicitous behavior evident.
Eclipse Attack Mitigation: Distributed watcher networks provide protection against network isolation.
KERI is the foundational protocol for a suite of related specifications:
CESR Dependency: KERI requires CESR for encoding all cryptographic primitives and messages. CESR provides:
ACDC Integration: Authentic Chained Data Containers build on KERI:
OOBI Discovery: Out-Of-Band Introductions enable KERI discovery:
IPEX Exchange: Issuance and Presentation Exchange protocol:
KERI provides integration points for external systems:
DID Methods: KERI can be represented as DIDs:
did:keri: Direct representation of KERI AIDsdid:webs: Web-based KERI identifiers with HTTPS discoveryVerifiable Credentials: KERI supports W3C VC standards:
Blockchain Integration: KERI can use blockchains as backers:
Traditional PKI: KERI can bridge to X.509:
Implementers face several common challenges:
Asynchronous Processing: KERI's fully asynchronous nature requires careful escrow state management and event ordering logic.
Witness Coordination: Implementing KAWA (KERI's Agreement Algorithm for Witness Agreement) requires understanding Byzantine fault tolerance and threshold signatures.
Duplicity Detection: Proper duplicity detection requires maintaining multiple KEL versions and comparing them for consistency.
Key Management: Secure generation, storage, and rotation of keys requires careful attention to cryptographic best practices.
CESR Encoding: Implementing CESR correctly requires understanding self-framing, composability, and domain conversion.
KERI implementations should consider:
KEL Processing: Processing long KELs can be computationally expensive. Implementations should:
Witness Communication: Network latency to witnesses affects performance. Implementations should:
Storage Requirements: KELs grow over time. Implementations should:
Cryptographic Operations: Signature verification is CPU-intensive. Implementations should:
Implementers must ensure compliance with:
KERI Specification: Follow the Trust over IP KERI specification for all protocol mechanics.
CESR Specification: Use CESR encoding correctly for all primitives and messages.
Cryptographic Standards: Use approved cryptographic algorithms (Ed25519, Blake3, etc.).
Version Compatibility: Support backward compatibility for 18 months after new version adoption (per vLEI governance framework).
Several reference implementations exist:
KERIpy: Python implementation, considered the reference implementation
KERIox: Rust implementation
KERIgo: Go implementation
KERIjs: JavaScript implementation
KERIml: Swift implementation
Implementers should study these implementations for guidance on protocol mechanics and best practices.
Implementations should:
All cryptographic primitives MUST be encoded using CESR:
Implementations should:
For production deployments:
Implementations MUST:
When integrating KERI: