Sovereign Privacy &
Zero-Trust Architecture.
Nuncio is engineered from the ground up to protect your digital identity. From column-level AES-256-GCM payload ciphers to WORM cryptographic audit hash chains and controlled AI gateways—your data remains sovereign on your hardware.
The Six Pillars of Nuncio Security
Every layer of the Nuncio stack is hardened against physical, network, and application-level attack vectors.
1. Column-Level AES-256-GCM Payload Cipher
Every email body text payload, HTML string, and subject header is encrypted before database persistence using column-level AES-256-GCM via Nuncio's PayloadCipher module. Zero unencrypted email text is ever written to disk.
- Galois/Counter Mode (GCM) providing authenticated encryption with associated data (AEAD)
- Cryptographically secure random 96-bit initialization vectors (IV) generated per column write
- Key derivation via PBKDF2 with 600,000 iterations or OS key vault seed
- Prevents raw SQLite database inspection even if hard drive is stolen or unencrypted
2. Large Binary Attachment Stream Encryption (age X25519)
Large binary attachments are encrypted using modern age X25519 stream ciphers. Binary data is streamed through 64KB chunk-authenticated payload buffers directly to disk.
- X25519 Elliptic-Curve Cryptography combined with ChaCha20-Poly1305 payload encryption
- Chunked stream processing requiring only 64KB RAM ceiling regardless of file size
- Cryptographic MAC tag validation on every 64KB block during attachment download
- Isolated file directory storage with 0600 file system permissions
3. Memory Hygiene (ZeroizeOnDrop & mlock)
Sensitive cryptographic key material, IMAP passwords, OAuth refresh tokens, and master passphrases are allocated inside secret memory pages locked against operating system swap files.
- ZeroizeOnDrop wrapper ensuring secret memory byte buffers are explicitly overwritten with zeroes on drop
- Operating system page locking (mlock on Linux/macOS, VirtualLock on Windows) preventing swap-to-disk
- Zero raw string leakages in crash dumps, log traces, or memory inspection tools
- Compiler memory fence instructions protecting key material against dead-store elimination optimizations
4. OS Keyring Enclave Integration
Nuncio never stores plaintext passwords, OAuth 2.0 refresh tokens, or private age keys inside configuration files or SQLite WAL databases. All secrets reside inside native OS credential vaults.
- Windows Credential Manager integration via Windows Data Protection API (DPAPI)
- macOS Keychain Access enclave with Secure Enclave hardware backing
- Linux Secret Service (DBus SecretService / KWallet) integration
- Hardware Security Key support (PKCS#11 / YubiKey PIV) for enterprise deployment
5. WORM Cryptographic Audit Hash-Chain Ledger
Every automated NSQL rule match, webhook dispatch, account mutation, data export, and AI MCP tool call is recorded in an immutable Write Once Read Many (WORM) audit ledger sealed with HMAC-SHA256 block linking.
- Cryptographic block linking formula: H_n = HMAC-SHA256(K, seq || ts || actor || action || data_hash || H_n-1)
- SQLite immutability triggers (prevent_worm_audit_update, prevent_worm_audit_delete) aborting modifications
- Automated chain verification via 'nuncio store verify-audit-chain' and 'nuncio_audit_verify' MCP tool
- Guarantees a tamper-evident, non-repudiable operational audit record across all UIs
6. HTML Email Sandboxing & Beacon Neutralization
HTML emails contain third-party tracking pixels, malicious JavaScript scripts, and CSS exfiltration vectors. Nuncio renders HTML emails inside strict security sandboxes.
- Tauri v2 <iframe sandbox="allow-same-origin"> with CSP default-src 'none' disabling JS execution
- Automatic stripping of 1x1 tracking beacons, web bugs, and invisible remote image triggers
- Proxy remote image loader neutralizing referrer leaks and client IP address disclosures
- Custom nuncio-mail:// URI scheme validation preventing arbitrary local file reads
McpAgentPolicy: Sane AI Security Enclave
Never grant uncontrolled direct credentials or API access to raw email providers.
When connecting local LLMs, Claude Desktop, Antigravity, or Cursor to your email via Nuncio's Model Context Protocol (MCP) server, your credentials and accounts remain 100% isolated. Local LLMs interact strictly with Nuncio's security gateway governed by McpAgentPolicy rules:
Configure explicit capability flags (read_mail, send_mail, manage_filters). Unauthorized AI tool calls are blocked with 403 Forbidden errors.
Restrict AI access to specific accounts or folders (e.g. allow access only to Work-Inbox while blocking Personal-VIP).
Before text reaches the LLM context window, sanitize_content() automatically scrub US Social Security Numbers ([REDACTED-SSN]) and Credit Cards.
Threat Model & Defensive Engineering Matrix
How Nuncio immunizes your email system against modern vulnerability classes.
| Attack Vector | Threat Scenario | Nuncio Engineering Defense |
|---|---|---|
| Remote Code Execution (RCE) via HTML Email | Malicious HTML emails executing JavaScript, WebAssembly, or browser exploits. | Strict <iframe sandbox> with CSP default-src 'none' completely disabling JS execution. |
| Uncontrolled AI Agent Data Exfiltration | AI agents reading sensitive personal inbox emails or sending unauthorized messages. | McpAgentPolicy enforcing RBAC capability flags, folder boundaries, and SSN/credit card redaction. |
| Server-Side Request Forgery (SSRF) via Webhooks | NSQL webhook actions reaching internal 127.0.0.1 or cloud metadata IP endpoints. | Pre-flight DNS IP blacklisting (blocking 127.0.0.1, 169.254.169.254, private subnets) and max_redirects(0). |
| ReDoS Catastrophic Backtracking | Malicious regular expression patterns causing infinite CPU backtracking loops. | DFA regex evaluation engine with a hard 50ms execution timeout per condition. |
| Database Corruption & Hardware Crash | Sudden power outage or disk failure corrupting local email database files. | PRAGMA quick_check(10) on startup with automatic CorruptedBackupManager and SqliteRecoveryEngine salvage. |
| Credential Exfiltration from Disk | Attacker or malware scanning local config files for plaintext passwords. | Zero secrets stored in files or SQLite; stored exclusively in OS Credential Enclave (Keychain/DPAPI). |
Verify your WORM audit ledger integrity at any time from the terminal or CLI:
# Verify cryptographic hash chain across all filter execution records
nuncio store verify-audit-chain
# List recent WORM audit ledger records via CLI
nuncio audit list --limit 50 --json
# Output sample:
# { "status": "VERIFIED_VALID", "chained_records": 1428, "algorithm": "HMAC-SHA256" }