Skip to content

Encryption API

At-rest encryption manager using X25519 ECDH + HKDF-SHA256 + AES-256-GCM.

EncryptionManager

EncryptionManager

EncryptionManager(mailbox_dir: Path)

Manages per-mailbox encryption using X25519 ECDH + AES-256-GCM.

Source code in src/titlani/encryption/manager.py
def __init__(self, mailbox_dir: Path) -> None:
    self.mailbox_dir = mailbox_dir
    self._private_keys: dict[str, X25519PrivateKey] = {}
    self._public_keys: dict[str, X25519PublicKey] = {}