Documentation Index
Fetch the complete documentation index at: https://docs.prudra.dev/llms.txt
Use this file to discover all available pages before exploring further.
Key rotation
Prudra automatically rotates the key encryption key (KEK) every 90 days. Rotation re-encrypts all wallet private key ciphertexts with the new KEK. This happens in the background — there is no service interruption.What rotation means for envelope encryption
The KEK encrypts the wallet private keys (which are the data encryption keys, or DEKs). When the KEK rotates:- A new KEK version is created in KMS hardware
- Each
encryptedPrivateKeyciphertext in theOrganisationWalletKeytable is decrypted with the old KEK - The plaintext is immediately re-encrypted with the new KEK
- The new ciphertext replaces the old one
keyVersionis updated to reference the new KEK version- The old KEK version is retired
Why old data still decrypts after rotation
The re-encryption job processes all records before the old KEK is retired. During the re-encryption window, both KEK versions are valid. After re-encryption completes, all records reference the new KEK and the old KEK is deactivated. If a signing operation occurs during re-encryption, Prudra checkskeyVersion on the OrganisationWalletKey record to determine which KEK version to use for decryption.
The keyVersion field
keyVersion is an opaque string — it does not directly reference KMS internals. It’s updated whenever the re-encryption job processes a record. You don’t need to store or act on this field; it’s informational.
Rotation schedule
| Key type | Rotation schedule |
|---|---|
| KEK (Key Encryption Key) | Every 90 days, automatic |
| Signing keys (fee payer) | Every 30 days, automatic |
Impact on operations
During KEK rotation:- Payments: Not affected. Signature verification uses the wallet’s public key, not the private key.
- Transfers and withdrawals: A brief delay may occur if a signing operation coincides with re-encryption. Prudra retries signing operations automatically.
- Balance queries: Not affected (no signing required).
Related
- How managed wallets work — envelope encryption model
- Key custody and recovery — the full custody model, audit logs, recovery
- Supported chains and tokens — chain configuration

