HexxlaDB supports optional AES-256-XTS encryption at the page layer for data at rest protection.Documentation Index
Fetch the complete documentation index at: https://hexxladb.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
- Algorithm: AES-256-XTS
- Scope: Per-page encryption
- Key derivation: HKDF-SHA256 / Argon2id
- Configuration: Via
Optionsat database open
Enabling encryption
With passphrase
With raw key
Key derivation
From passphrase:- Argon2id key derivation with configurable parameters
- HKDF-SHA256 to derive encryption key
- Salt is stored in the database header
Encryption scope
- Primary database: All pages encrypted
- WAL: Encrypted with same key
- Changelog: Not encrypted (separate file)
Key mismatch detection
Wrong key or passphrase fails deterministically at open withErrEncryptionKeyMismatch once the database has an encryption verifier.
Key rotation
UseRotateEncryption for offline key rotation or re-encryption:
RotateEncryptionWithOptions to stream rows in batches with progress callbacks:
Security considerations
Passphrase storage
- Never hardcode passphrases in source code
- Use environment variables or secrets managers
- Rotate keys periodically per your security policy
Key management
- Generate strong, random passphrases (at least 32 characters)
- Store backup keys securely
- Document key rotation procedures
Performance
- Encryption adds minimal overhead (~5-10%)
- Per-page encryption enables parallel I/O
- WAL encryption is synchronous but fast
Incident response
Encryption key mismatch
Signal:Open returns ErrEncryptionKeyMismatch
Response:
- Confirm key derivation path (env/secrets manager)
- Never guess keys in production
- Recovery: restore from backup taken with correct key material, or offline
RotateEncryptionafter establishing a readable copy
Limitations
- Changelog file is not encrypted (separate concern)
- Encryption is at-rest only; data is decrypted in memory
- Keys are not managed by the database — application responsibility