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 rotation event is an establishment event in KERI that transfers control authority from the current set of authoritative keypairs to a new set that was cryptographically pre-committed in the prior establishment event, enabling secure key rotation while maintaining identifier continuity and providing forward security through the pre-rotation mechanism.
A rotation event (rot) is a fundamental cryptographic operation in the KERI protocol that enables secure transfer of control authority over an autonomic identifier (AID). It represents an establishment event that changes the authoritative key state of an identifier by rotating from the current controlling key set to a new pre-committed key set.
The rotation event accomplishes several critical objectives:
Root Control Authority Transfer: Transfers root control authority from the current set of controlling keys to a new set that was cryptographically committed to in the prior establishment event (either inception or rotation) as the pre-rotated key pair set.
Key State Update: Provides all necessary information to change the key-state, including:
Security Enhancement: Enables recovery from compromised keys and provides post-quantum security through cryptographic hiding of pre-rotated keys.
Implementations MUST verify that rotation events correctly reveal pre-committed keys:
def validate_rotation(rot_event, prior_event):
# Extract next key digests from prior event
prior_next_digests = prior_event['n']
# Extract current keys from rotation event
current_keys = rot_event['k']
# Verify each key matches its commitment
for i, key in enumerate(current_keys):
computed_digest = hash(key)
if computed_digest != prior_next_digests[i]:
raise ValidationError("Key does not match pre-rotation commitment")
Implementations must validate BOTH thresholds:
nt fieldkt fieldFailure to validate both thresholds creates security vulnerabilities.
Rotation events MUST have sequence numbers that:
When modifying witness sets:
br (removes) before ba (adds)bt threshold is achievable with resulting witness setImplementations should escrow rotation events when:
Escrow timeout policies should be configurable based on use case requirements.
Implementations MUST:
Rotation events are used in several critical scenarios:
The rotation process involves several key participants:
The rotation process follows a well-defined sequence that maintains cryptographic integrity throughout:
The process begins with an existing root-of-trust in a public/private key-pair that is cryptographically bound to an identifier derived from that key-pair. This root-of-trust was established either through:
Before a rotation can occur, the system verifies that:
n (next key digest) fieldnt (next threshold) fieldThe controller creates a rotation event message containing:
{
"v": "KERI10JSON0000160_",
"t": "rot",
"d": "ELvaU6Z-i0d8JJR2nmwyYAZAoTNZH3UfSVPzhzS6b5CM",
"i": "EH7Oq9oxCgYa-nnNLvwhp9sFZpALILlRYyB-6n4WDi7w",
"s": "1",
"p": "EEnwxEm5Bg5s5aTL...",
"kt": "1",
"k": ["DVcuJOOJF1IE8svqEtrSuyQjGTd2HhfAkt9y2QkUtFJI"],
"nt": "1",
"n": ["E-dapdcC6XR1..."],
"bt": "2",
"br": [],
"ba": [],
"a": []
}
Key fields include:
t: Event type ("rot" for rotation)d: SAID of the event itselfi: Identifier prefixs: Sequence number (incremented from prior event)p: Prior event digest (backward chaining)kt: Current signing thresholdk: New current public keysnt: Next signing thresholdn: Next key digests (pre-rotation commitment)bt: Witness thresholdbr: Witnesses to removeba: Witnesses to adda: Anchoring sealsThe rotation event is signed by keys that satisfy the prior next threshold from the previous establishment event. This dual-threshold validation ensures:
Rotation messages are verified by witnesses that were designated in either the inception event or subsequent rotation events:
Upon successful witnessing:
Once the rotation is witnessed and receipted:
Pre-Rotation Commitment: The rotation event MUST reveal keys that match the cryptographic digests committed in the prior establishment event's n field. This is verified by:
digest(new_public_key) == prior_event.n[index]
Dual Threshold Validation: A valid rotation must satisfy TWO distinct thresholds:
Prior Next Threshold: The threshold from the most recent prior establishment event, validated against the prior next key list (the unblinded public keys from the previous event's next key digest list)
Current Threshold: The signing threshold of the rotation event itself, validated against the current public key list being established by this rotation
This dual-threshold mechanism ensures cryptographic continuity across rotations.
Signature Requirements: The rotation event MUST be signed by keys that satisfy the prior next threshold. For a single-signature rotation:
verify(rotation_event, signature, prior_next_key) == true
For multi-signature rotations, the number of valid signatures must meet or exceed the prior next threshold.
Hash Chaining: Each rotation event includes:
p field: Digest of the prior event (backward chaining)d field: SAID of the current event (self-addressing)n field: Digests of next keys (forward commitment)This creates a tamper-evident chain where any modification to prior events or unauthorized rotations becomes cryptographically detectable.
Sequence Number Monotonicity: Rotation events MUST have strictly increasing sequence numbers. The sequence number s in a rotation event must be exactly one greater than the prior establishment event's sequence number.
Witness Receipt Timing: The rotation is not considered complete until a sufficient number of witness receipts are collected. The threshold of accountable duplicity (TOAD) parameter bt specifies the minimum number of witness confirmations required.
Asynchronous Processing: KERI's architecture supports asynchronous rotation processing:
First-Seen Policy: KERI employs a first-seen policy for rotation events. The first version of a rotation event observed by a witness or validator is considered authoritative. Any conflicting rotation at the same sequence number is evidence of duplicity.
Invalid Pre-Rotation: If the keys in a rotation event do not match the prior next key digests, the rotation MUST be rejected. This prevents unauthorized key rotations.
Threshold Violations: If the rotation event does not satisfy the prior next threshold, it MUST be rejected. This ensures only authorized parties can rotate keys.
Sequence Number Gaps: If a rotation event arrives with a sequence number that skips values, the event MUST be placed in escrow until the missing events arrive. This handles out-of-order delivery.
Witness Threshold Failures: If insufficient witness receipts are collected to meet the TOAD threshold, the rotation may not be considered fully established. Validators may choose to wait for additional receipts or reject the rotation based on their security policies.
Duplicity Detection: If multiple conflicting rotation events are observed at the same sequence number, this constitutes duplicity. The system MUST:
Regular Security Rotation: Organizations should implement periodic key rotation as part of security hygiene:
1. Generate new key pair securely
2. Create rotation event with new keys
3. Sign with current keys
4. Submit to witnesses
5. Collect receipts
6. Update local key state
7. Securely destroy old private keys
Emergency Compromise Recovery: When key compromise is suspected:
1. Immediately generate new key pair in secure environment
2. Create rotation event using pre-rotated keys (if current keys compromised)
3. Rush rotation through witness network
4. Broadcast rotation to all validators
5. Monitor for duplicitous rotation attempts by attacker
Witness Configuration Update: Changing witness sets:
1. Identify new witnesses to add
2. Create rotation event with:
- `ba`: Array of new witness AIDs to add
- `br`: Array of existing witness AIDs to remove
- Updated `bt`: New witness threshold
3. Coordinate with both old and new witnesses
4. Ensure smooth transition of witnessing duties
Custodial Rotation: Implementing custodial agent arrangements:
1. Generate custodian signing keys
2. Generate owner rotation keys (kept in reserve)
3. Create rotation event that:
- Sets current keys to custodian keys
- Sets next keys to owner rotation keys
4. Owner retains ability to rotate away from custodian
Pre-Rotation Key Management:
Threshold Configuration:
kt (current threshold) based on operational security requirementsnt (next threshold) to enable future rotation flexibilityWitness Selection:
bt (witness threshold) to balance security and availabilityRotation Frequency:
Application Integration: Applications using KERI identifiers must:
Multi-Signature Coordination: For multi-sig identifiers:
Delegation Hierarchies: In delegated identifier scenarios:
Transaction Event Log Integration: For identifiers with TELs:
Witness Network Coordination: When rotating witness configurations:
Recovery Procedures: Establish clear procedures for:
The rotation event mechanism is central to KERI's security model, enabling identifiers to maintain long-term security through regular key updates while providing robust recovery mechanisms for compromise scenarios. The pre-rotation commitment scheme ensures that even if current keys are compromised, the attacker cannot capture control of the identifier, as they lack knowledge of the pre-committed next keys.
Comprehensive test suites should cover: