Expand description
Hidden volume implementation for plausible deniability.
§Architecture
The hidden volume system provides two encrypted storage areas within a single vault file:
- Outer volume: Standard encrypted storage, unlocked with the primary password
- Hidden volume: Secondary encrypted storage, cryptographically indistinguishable from random data
§File Layout
┌─────────────────────┐ 0
│ Outer Header │ 512 bytes - salt, encrypted data key, argon2 params
├─────────────────────┤ 512
│ Hidden Header │ 512 bytes - fully encrypted (looks random)
├─────────────────────┤ 1024 (DATA_START_OFFSET)
│ Outer Data Area │ Variable size - redb database for outer volume
├─────────────────────┤
│ Hidden Data Area │ Variable size - encrypted length + encrypted records + random padding
└─────────────────────┘§Security Properties
- Hidden header KDF salt is derived from password (not stored)
- Hidden data length is encrypted (no plaintext size prefix)
- Hidden header is encrypted and indistinguishable from random bytes
- Wrong password for hidden volume produces same error as “no hidden volume”
- Both volumes use independent Argon2id key derivation
- Unlock attempts both decryptions to prevent timing attacks
Structs§
- Hidden
Storage - Encrypted storage with optional hidden volume.
Enums§
- Volume
Type - Type of encrypted volume.