Loading vLEI.wiki
Fetching knowledge base...
Fetching knowledge base...
This comprehensive explanation has been generated from 182 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.
Rotation is the cryptographic operation that revokes the current set of authoritative key pairs for an AID and replaces them with a new set of pre-committed keys, creating a verifiable rotation event that is appended to the AID's KEL to maintain identifier persistence while updating cryptographic control authority.
Rotation is the fundamental key management operation in KERI that enables an AID (Autonomic Identifier) to maintain persistent identity while changing its controlling cryptographic keys. The rotation process accomplishes three critical objectives:
Rotation is used whenever an identifier controller needs to change cryptographic keys while maintaining identifier continuity. Common scenarios include:
The key participants in a rotation operation are:
The rotation process follows a precise sequence of cryptographic operations:
Implementations MUST validate both thresholds for rotation events:
Prior Next Threshold: Extract the nt value from the previous establishment event and verify that attached signatures satisfy this threshold using keys whose digests match the previous event's n field.
Current Threshold: Verify that attached signatures satisfy the kt threshold specified in the rotation event itself using the keys listed in the rotation's k field.
Failure to validate both thresholds creates security vulnerabilities where unauthorized rotations could be accepted.
When processing a rotation event, implementations MUST:
n field (next key digests)k field, compute its digest using the algorithm specified in the key's derivation coden fieldThis verification ensures that only pre-committed keys can be rotated to, preventing unauthorized key substitution attacks.
For partial rotation scenarios:
k field may contain fewer keys than the previous n field had digestsRotation events can modify witness configuration through three fields:
br (backers removed): List of witness AIDs being removed from the witness setba (backers added): List of witness AIDs being added to the witness setbt (backer threshold): Updated threshold for witness receiptsImplementations must:
Before rotation can occur, the system verifies that the keys being rotated to were properly pre-committed in the previous establishment event. The previous event's n field contains cryptographic digests of the next keys. The rotation event must reveal public keys whose digests match these commitments.
State Change: The system transitions from trusting the current key set to preparing to trust the pre-committed key set.
The controller constructs a rotation event (rot) containing:
p): Links to the prior establishment events): Incremented from the previous establishment eventk): The new signing keys (revealed from previous n commitments)kt): Number of signatures required from current keysn): Cryptographic commitments to the next rotation's keysnt): Threshold for the next rotationwa), cuts (wr), or rotations (br) of witnessesState Change: The event structure is created but not yet signed.
For the rotation to be valid, it must satisfy two distinct thresholds:
Prior next threshold: The rotation must be signed by keys that satisfy the threshold specified in the previous event's nt field. These signatures prove that the entity controlling the pre-committed keys is authorizing the rotation.
Current threshold: The rotation event itself must be signed by the new current keys according to the kt threshold being established. This proves control over the newly activated keys.
This dual-threshold requirement is critical for partial rotation scenarios where only a subset of pre-committed keys are exposed.
Decision Point: If either threshold is not satisfied, the rotation is invalid and must be rejected.
The controller signs the rotation event with:
Signatures are attached to the event using CESR encoding, creating a complete signed rotation message.
State Change: The event transitions from unsigned to signed, becoming a complete key event message.
The signed rotation event is transmitted to the configured witnesses. Each witness:
The controller collects receipts until the TOAD (Threshold of Accountable Duplicity) is satisfied.
State Change: The rotation event transitions from unwitnessed to witnessed, achieving distributed consensus.
Once sufficient witness receipts are collected, the rotation event is appended to the KEL. This creates an immutable record of the key state transition.
State Change: The identifier's authoritative key state is officially updated. The old keys are now considered stale, and the new keys are authoritative for all subsequent operations.
Validators processing the KEL update their view of the identifier's key state:
n field digestsState Change: All validators now recognize the new keys as authoritative for the identifier.
Pre-Rotation Mechanism: KERI's security model depends on pre-rotation, where each establishment event commits to the next rotation's keys via cryptographic digests. The rotation event must reveal keys whose digests match the previous commitments. This provides:
Cryptographic Strength: All key pairs must provide approximately 128 bits of cryptographic strength. Supported algorithms include:
Hash Chain Integrity: The rotation event's p field must contain the correct digest of the previous establishment event, maintaining the backward hash chain that makes the KEL tamper-evident.
Asynchronous Processing: KERI rotation is fully asynchronous. There is no requirement for:
This enables rotation even when:
Escrow Mechanisms: If a rotation event arrives before its predecessor, it is placed in escrow until the missing events arrive. This handles out-of-order delivery in distributed systems.
First-Seen Policy: Witnesses and watchers implement a first-seen policy where the first version of an event at a given sequence number is considered authoritative. This prevents dead attacks where an attacker tries to present an alternative rotation history.
Invalid Rotation Detection: Validators must reject rotations that:
Duplicity Detection: If a validator receives two different rotation events at the same sequence number, this indicates duplicity. The validator:
Recovery Procedures: If current signing keys are compromised but rotation keys remain secure, the controller can execute a rotation using the pre-committed keys to regain control. This is the primary recovery mechanism in KERI.
Scheduled Rotation: Organizations implement regular key rotation schedules (e.g., quarterly, annually) as security hygiene. The rotation process:
n fieldCompromise Recovery: When key compromise is detected:
Cryptographic Upgrade: When transitioning to stronger algorithms:
n field commits to keys using the new algorithmPartial Rotation: For reserve rotation or custodial rotation:
Key Generation Hygiene:
Threshold Configuration:
kt and nt thresholds appropriate to security requirementsWitness Management:
wr, wa, br fields) to update witness setsDocumentation and Audit:
Application Layer: Applications using KERI identifiers must:
Witness Integration: Systems acting as witnesses must:
Credential Systems: ACDC credentials anchored to rotating identifiers:
Multi-Sig Coordination: For multi-signature identifiers:
Rotation provides several critical security properties:
Forward Security: Compromise of current signing keys doesn't compromise pre-committed rotation keys, enabling recovery.
Post-Quantum Resistance: Digest-based pre-rotation commitments resist quantum attacks on the rotation process itself.
Duplicity Evidence: Any attempt to rotate to different keys creates detectable inconsistency in the KEL.
Non-Repudiation: Rotation events are cryptographically signed and witnessed, creating non-repudiable proof of key state transitions.
Identifier Persistence: Rotation enables long-term identifier persistence despite key lifecycle management needs.
brbabtWhen a rotation event arrives before its predecessor:
Implement escrow timeouts to prevent resource exhaustion from malicious events.
Witnesses and watchers MUST implement first-seen policy:
This policy is critical for detecting duplicity and preventing dead attacks.
Rotation events require signatures from both prior next keys and current keys. Use CESR indexed signatures:
Implementations should cache key state but MUST:
When rotation fails: