Expand description
Encrypted per-session history store.
§Wire format (per session file)
nonce(12B, OsRng) || AES-256-GCM(plaintext=serde_json(entries), aad=session_uuid.as_bytes())- Nonce: 12 fresh random bytes from
OsRngon every write. Never reused. - AAD: the 16-byte session UUID binds the ciphertext to its filename, preventing file-swap attacks.
- Key:
Zeroizing<[u8; 32]>derived by the caller (native: from signing key seed viaderive_key; browser: session-scoped Web Crypto key). - Writes: atomic —
{uuid}.enc.tmp→fs::rename→{uuid}.enc.
Structs§
- Conversation
Meta - Metadata for a single private conversation (stored in the manifest).
- FsBackend
- Filesystem backend.
- Memory
Backend - In-memory backend for tests and ephemeral sessions.
- Private
Store - Encrypted per-session history store.
Traits§
- Storage
Backend - Backend abstraction for raw byte reads and atomic writes.
Type Aliases§
- Storage
Key - 32-byte AES-256 key, zeroed on drop.