Reserve rotation is a key management pattern in KERI that enables pre-rotated keypairs designated in an establishment event to be held in reserve (unexposed) rather than revealed at the immediately subsequent establishment event, providing enhanced security through selective key exposure while maintaining cryptographic commitments to future rotation keys.
Related Concepts
No related concepts available
Comprehensive Explanation
reserve-rotation
Process Definition
Reserve rotation is a specialized application of partial rotation within the KERI protocol that enables controllers to maintain cryptographically committed keypairs in an unexposed state across multiple establishment events. This process allows a controller to designate pre-rotated keys in one establishment event while strategically choosing not to expose (unblind) those keys during the next rotation operation.
What It Accomplishes
Reserve rotation accomplishes several critical security and operational objectives:
Defense in Depth: By maintaining unexposed backup keys that are cryptographically committed but not revealed, controllers create multiple layers of security. If current operational keys are compromised, reserve keys remain protected and available for recovery.
Reduced Attack Surface: Keys that are never exposed to operational systems cannot be compromised through those systems. Reserve rotation minimizes the number of keys exposed at any given time while maintaining the ability to rotate to reserved keys when needed.
Flexible Key Management Strategy: Controllers can plan multi-stage key rotation strategies where different key sets serve different purposes (operational, backup, emergency recovery) without exposing all keys simultaneously.
Forward Security: Even if current keys are compromised, the reserved keys remain secure because they have never been exposed to potential attackers monitoring the KEL.
When It's Used
Implementation Notes
Key Storage Architecture
Implementing reserve rotation requires careful consideration of key storage architecture:
Separation of Key Storage
Operational Keys: Store in systems optimized for availability and performance:
Enterprise key management systems (KMS)
Cloud-based HSMs with high availability
Agent keystores with appropriate access controls
Regular backup procedures with quick recovery
Reserve Keys: Store in systems optimized for security over availability:
Offline HSMs or air-gapped systems
Geographic distribution across multiple secure facilities
Infrequent access patterns with extensive audit logging
Key Generation Procedures
Generate reserve keys in the most secure environment possible:
Offline Generation: Generate keys on air-gapped systems never connected to networks
Entropy Sources: Use hardware random number generators or multiple entropy sources
Secure Transport: If keys must be moved, use encrypted channels with perfect forward secrecy
Verification: Verify key generation by computing and comparing digests independently
Threshold Design Considerations
Balancing Security and Usability
Higher Thresholds (e.g., 3-of-5):
Pros: Greater security, no single point of failure
Cons: More keys to manage, higher operational complexity
Use case: High-value identifiers, regulatory compliance scenarios
Lower Thresholds (e.g., 2-of-3):
Pros: Simpler operations, faster rotations
Cons: Lower security margin, less fault tolerance
Use case: Lower-risk identifiers, development/testing
Weighted Thresholds
KERI supports fractionally-weighted thresholds for complex scenarios:
{
"kt": ["1/2", "1/2", "1/2"], // Three keys, each with 1/2 weight
"k": ["key1", "key2", "key3"],
"nt": "1", // Threshold of 1 (requires sum of weights >= 1)
"n": ["digest1", "digest2", "digest3"]
}
This allows:
Different keys to have different "voting power"
Reserve rotation is particularly valuable in several scenarios:
High-Security Environments: Organizations requiring defense-in-depth security postures use reserve rotation to maintain emergency recovery keys in highly secure storage (such as HSMs or air-gapped systems) while operational keys reside in more accessible but potentially less secure environments.
Long-Term Key Planning: When establishing an AID, controllers may pre-commit to multiple future key sets but only expose them as needed over time, reducing the window of vulnerability for each key set.
Custodial Arrangements: In custodial rotation scenarios, reserve rotation enables the original controller to maintain ultimate control through unexposed rotation keys while delegating operational signing authority to a custodian.
Regulatory Compliance: Organizations subject to key management regulations may use reserve rotation to demonstrate proper key lifecycle management with documented backup and recovery procedures.
Key Participants
The reserve rotation process involves:
Controller: The entity with ultimate control authority over the AID, responsible for:
Generating and securely storing reserved keypairs
Deciding which pre-rotated keys to expose during each rotation
Maintaining the cryptographic commitments through digests
Executing rotation events when reserved keys need to be activated
Validators: Any entity verifying the KEL who must:
Validate that rotation events satisfy both current and prior thresholds
Verify that unblinded keys match their committed digests
Accept that some pre-rotated keys may remain blinded (in reserve)
Process Flow
Initial Setup: Inception with Reserve Keys
The reserve rotation strategy begins at inception:
Step 1: Key Generation
Controller generates multiple keypair sets:
Current operational keypairs (exposed in inception event)
First rotation keypairs (committed via digests)
Reserve keypairs (also committed via digests but intended to remain unexposed)
Step 2: Digest Commitment
Controller computes cryptographic digests of all pre-rotated public keys
These digests are included in the inception event's nxt (next keys) field
The digests create a cryptographic commitment without revealing the actual keys
Step 3: Threshold Configuration
Controller sets the nxt threshold (next threshold) that will govern the subsequent rotation
This threshold determines how many of the pre-rotated keys must sign the next rotation event
First Rotation: Partial Exposure
When the controller performs the first rotation after inception:
Step 4: Selective Key Exposure
Controller decides which pre-rotated keys to expose (unblind)
Some keys are revealed and become the new current keys
Other keys remain blinded (in reserve) - their digests remain in the KEL but the actual keys are not revealed
Step 5: Dual Threshold Validation
The rotation event must satisfy two distinct thresholds:
Prior Next Threshold: The rotation must be signed by enough of the unblinded pre-rotated keys to meet the threshold specified in the prior establishment event. This proves the controller has access to the keys they previously committed to.
Current Threshold: The rotation event itself specifies a new current threshold for the newly established key set. This threshold will govern non-establishment events until the next rotation.
Step 6: New Pre-Rotation Commitment
The rotation event includes a new nxt field with digests of the next set of pre-rotated keys
This may include:
Digests of entirely new keypairs
Digests of keys that were previously in reserve (re-committing to them)
Next keys: Digests of pre-rotated keys (some intended for reserve)
Reserve keys: Subset of next keys intended to remain unexposed
State After First Rotation:
Current keys: Subset of previously pre-rotated keys (now exposed)
Next keys: New digests (may include re-committed reserve keys)
Reserve keys: Keys from previous next set that were not exposed + new reserve keys
State After Reserve Activation:
Current keys: Previously reserved keys (now exposed and operational)
Next keys: New digests for future rotations
Reserve keys: New set of unexposed keys for future contingencies
Decision Points
Controllers face several critical decision points:
How many keys to hold in reserve? More reserve keys provide greater flexibility but increase key management complexity.
When to expose reserve keys? Balance between security (keeping keys unexposed) and operational needs (having keys available for use).
How to structure thresholds? Higher thresholds provide greater security but require more keys to be exposed and managed.
Whether to re-commit to unexposed reserve keys? Keys can remain in reserve across multiple rotations by re-including their digests in subsequent nxt fields.
Technical Requirements
Cryptographic Requirements
Digest Algorithm Consistency
All key digests within a single establishment event must use the same cryptographic hash algorithm. The derivation code prepended to each digest specifies the algorithm used (e.g., Blake3-256, SHA3-256). This ensures:
Consistent security properties across all pre-rotated keys