Expand description
Key management operations for encrypted pages archives.
Provides CLI operations to manage key slots in an encrypted archive:
list: Show all key slotsadd: Add a new password or recovery key slotrevoke: Remove a key slotrotate: Full key rotation (regenerate DEK, re-encrypt payload)
§Security Model
The archive uses envelope encryption with multiple key slots (like LUKS):
- A random Data Encryption Key (DEK) encrypts the payload
- Each key slot wraps the DEK with a Key Encryption Key (KEK)
- KEK is derived from password (Argon2id) or recovery secret (HKDF-SHA256)
- Add/revoke only modifies config.json; payload unchanged
- Rotate re-encrypts entire payload with new DEK
Structs§
- KeyList
Result - Result of listing key slots
- KeySlot
Info - Information about a single key slot
- Revoke
Result - Result of revoking a key slot
- Rotate
Result - Result of key rotation
Enums§
- AddKey
Result - Result of adding a key slot
Functions§
- key_
add_ password - Add a new password-based key slot
- key_
add_ recovery - Add a new recovery secret key slot
- key_
list - List all key slots in an archive
- key_
revoke - Revoke a key slot
- key_
rotate - Full key rotation - regenerate DEK and re-encrypt payload