Partial rotation is a KERIkey management mechanism that enables rotation events where only a threshold-satisfying subset of pre-rotated keys participates, allowing controllers to expose some keys while keeping others in reserve, thereby supporting flexible delegation patterns and enhanced security through selective key exposure.
Related Concepts
No related concepts available
Comprehensive Explanation
partial-rotation
Process Definition
Partial rotation is a sophisticated key management mechanism within KERI that extends the fundamental pre-rotation concept to enable more flexible and secure key rotation strategies. Unlike standard rotation where all pre-rotated keys must be exposed and rotated simultaneously, partial rotation allows controllers to selectively expose and rotate only a subset of their pre-committed keypairs while maintaining others in reserve (unexposed).
The process accomplishes several critical objectives:
Selective Key Exposure: Controllers can reveal only the keys necessary for current operations, minimizing attack surface
Reserve Key Management: Unexposed keys remain cryptographically committed but hidden for future use
Enhanced Security Posture: Provides defense-in-depth through layered key management strategies
Partial rotation is used when controllers need to:
Delegate operational signing to custodial agents while retaining ultimate control
Maintain backup rotation keys in secure reserve
Implement hierarchical key management with different security levels
Support gradual key exposure strategies
Key participants in partial rotation include:
Controller: The entity managing the AID and making rotation decisions
Implementation Notes
Critical Implementation Requirements
Syntax Changes
Implementations must support the modified establishment event syntax:
Next Threshold Field: Add nt field to all establishment events (inception and rotation). This field must be validated as a string representation of integer or fractional threshold.
Ordered Digest List: Change n field from single XORed string to ordered array of individual digests. Maintain strict ordering as position determines key correspondence in multi-sig scenarios.
Backward Compatibility: Consider supporting both old and new syntax during transition period. Detect syntax version from event structure.
Validation Logic
Implement dual threshold validation:
Current Threshold: Verify attached signatures satisfy kt field against k field keys
Prior Next Threshold: Verify signatures satisfy prior event's nt field against prior event's n field digests
Digest Matching: Verify each exposed key's digest appears in prior next digest list
Threshold Calculation: Support both integer and fractional weight thresholds
Key Management
Implement secure key storage for partial rotation:
Reserve Key Storage: Maintain encrypted storage for unexposed pre-rotated keys
Key Exposure Tracking: Track which keys have been exposed vs. remain in reserve
Key Generation: Use cryptographically strong random number generation for all keys
Error Handling
Implement comprehensive error detection:
Threshold Violations: Reject events that don't satisfy either threshold
Digest Mismatches: Reject events where exposed keys don't match committed digests
Sequence Errors: Properly escrow or reject out-of-order events
Duplicity Detection: Detect and flag conflicting rotation events at same sequence number
Performance Considerations
Custodial Agent (optional): Entity granted signing authority through partial rotation
Witnesses: Entities that verify and receipt the rotation event
Validators: Entities that verify the rotation satisfies both current and prior thresholds
Process Flow
Partial rotation follows a precise sequence of operations defined in Document 1:
Step 1: Syntax Preparation
The rotation event must include two critical structural elements:
Next Threshold Field (nt): All establishment events gain a new field specifying the minimum number of signatures required from the next pre-rotated key set. This field is a string representation of an integer or fractional weight threshold:
"nt": "3"
This represents a requirement for 3 signatures from the next key set, independent of how many keys are in that set.
Next Keys Field (n) Structure: The n field changes from a single XORed digest string to an ordered list of individual key digests. Each digest corresponds to one next public key in sequential order:
This ordered list structure serves multiple purposes:
Enables partial rotation verification
Preserves position information for fractionally-weighted thresholds
Allows validators to verify each multi-sig member's key digest appears in expected position
Step 2: Key Selection and Unblinding
The controller selects which subset of pre-rotated keys to expose in the current rotation. This involves:
Reference Prior Event: Identify the most recent prior establishment event containing the next key digest list
Select Keys: Choose which keys from that digest list to expose (unblind)
Verify Threshold: Ensure selected keys satisfy the prior next threshold (nt from prior event)
Prepare Current Keys: The selected keys become the current signing keys in the rotation event's k field
The prior next key list consists of the public keys that were previously committed to via their digests. Only the subset being rotated needs to be revealed.
Step 3: Dual Threshold Validation
A valid partial rotation requires satisfying two distinct thresholds as specified in Document 12:
Current Threshold Validation:
The rotation event's kt field specifies the current signing threshold
Attached signatures must satisfy this threshold
Signatures are verified against the public keys in the rotation event's k field
This establishes the new key state
Prior Next Threshold Validation:
The prior establishment event's nt field specifies the prior next threshold
The rotation must be signed by keys from the prior next key digest list
The number of signing keys must satisfy the prior next threshold
This proves authorization from the previously committed key set
This dual-threshold mechanism ensures:
The rotation is authorized by keys committed to in the previous event
The new key state is properly established with its own threshold
The cryptographic chain of authority remains unbroken
Step 4: Reserve Key Management
Keys not exposed in the current rotation remain in reserve:
Cryptographic Commitment Maintained: The digests of unexposed keys remain in the KEL
Future Availability: Reserved keys can be exposed in subsequent rotations
Security Enhancement: Unexposed keys cannot be compromised if they remain unknown
Flexible Strategy: Controllers can expose reserved keys as needed
Step 5: Event Anchoring
The rotation event is anchored in the KEL:
Backward Chaining: The event includes a digest of the prior event
Forward Chaining: The event commits to new next keys (potentially partial)
Witness Receipting: Witnesses verify and receipt the event
State Update: The key state advances to reflect the new current keys and thresholds
Technical Requirements
Cryptographic Requirements
Partial rotation imposes specific cryptographic constraints:
Digest Consistency: All key digests must use consistent cryptographic algorithms. The derivation code prepended to each digest specifies the algorithm used. Validators must verify digest derivation codes match expected algorithms.
Signature Verification: Each signature must be verified against its corresponding public key using the algorithm specified by the key's derivation code. The signature attachment must include an index indicating which key from the current or prior key list was used.
Threshold Satisfaction: Both current and prior thresholds must be satisfied. For fractionally-weighted thresholds, the sum of weights from signing keys must meet or exceed the threshold value.
Ordered List Integrity: The next key digest list order must be preserved. Position in the list determines which key corresponds to which signer in multi-sig scenarios.
Timing Considerations
Partial rotation has specific timing requirements:
Sequential Processing: Rotation events must be processed in strict sequence number order. Out-of-order events must be escrowed until prior events are received and validated.
Witness Coordination: For indirect mode operations, witnesses must coordinate to achieve agreement on the rotation event before it becomes stable. The KAACE algorithm governs this coordination.
Key Exposure Timing: Reserved keys should only be exposed when needed. Premature exposure increases attack surface without providing operational benefit.
Recovery Window: Controllers should maintain sufficient reserved keys to enable recovery from key compromise scenarios without requiring complete identifier abandonment.
Error Handling
Partial rotation implementations must handle several error conditions:
Threshold Violation: If either current or prior threshold is not satisfied, the rotation event is invalid and must be rejected. This prevents unauthorized rotations.
Digest Mismatch: If an exposed public key does not match its committed digest from the prior event, the rotation is invalid. This prevents key substitution attacks.
Sequence Number Errors: If the rotation event's sequence number does not follow the prior event, it must be escrowed or rejected depending on whether it's out-of-order or duplicitous.
Signature Verification Failures: Any signature that fails cryptographic verification invalidates the rotation. All signatures must verify successfully.
Duplicity Detection: If multiple conflicting rotation events exist for the same sequence number, duplicity is detected and the controller is marked as duplicitous.
Usage Patterns
Reserve Rotation Pattern
Reserve rotation is a primary use case where controllers maintain backup keypairs that remain unexposed. As documented in Document 8:
Strategic Key Management:
Pre-rotated key pairs are designated in an establishment event
Keys are held in reserve rather than immediately exposed
Keys remain unexposed at the next establishment event
Provides enhanced security through selective key exposure
Security Benefits:
Defense in Depth: Multiple layers of pre-rotated keys provide fallback options
Reduced Attack Surface: Unexposed keys cannot be targeted
Flexible Recovery: Reserved keys enable recovery from compromise
Long-term Planning: Controllers can plan multiple future rotations
Implementation Strategy:
Generate multiple pre-rotated key pairs
Commit to all keys via digests in next key list
Expose only minimum necessary keys in each rotation