Skip to main content
FOR TECHNICAL READERS & SECURITY AUDITORS

Under the Hood: Security & Architecture

You don't need to know any of this to use BudgetNautilus every day—it all happens automatically behind the scenes. For engineers, security researchers, and privacy enthusiasts, here is the exact technical architecture protecting your vault.

01 • SQLCIPHER 256-BIT DATABASE VAULT

Page-Level AES-256 Encryption via Rust

All accounts, budgets, bills, and transactions reside inside budget.db, accessed exclusively from Rust (rusqlite with bundled-sqlcipher and hooks). The React frontend never executes SQL directly. Every multi-row mutation runs atomically inside a single SQLite transaction.

02 • ARGON2ID + XCHACHA20-POLY1305 ENVELOPE

Dual-Wrapped Data Encryption Key (DEK)

A random 256-bit Data Encryption Key (DEK) keys SQLCipher via PRAGMA key = "x'<hex>'". The DEK is wrapped using XChaCha20-Poly1305 by an Argon2id-derived key from your Master Password, and a second copy is wrapped by your one-time Recovery Key in vault.json. Escalating brute-force delays trigger in Rust after 5 failed unlock attempts.

03 • ZEROIZING RAM & 64-BIT INTEGER CENTS

Memory Hygiene & Exact Financial Math

Master passwords, DEKs, and BYOK API keys are held inside Rust Zeroizing buffers and wiped immediately when lock_database (⌘L) runs. All monetary values are stored and calculated as 64-bit integer cents (i64)—never IEEE 754 floats.

04 • WEBVIEW CSP & READ-ONLY SQL SANDBOX

Air-Gapped Webview & SQLite Authorizer Hook

The frontend webview enforces connect-src 'none'. When optional BYOK AI is enabled, “Ask AI” executes generated SELECT queries on a dedicated SQLITE_OPEN_READ_ONLY connection with a rusqlite authorizer hook that blocks ai_credentials, settings, and import_tombstones, with a 3-second timeout and LIMIT 500.

05 • CRYPTOGRAPHIC BACKUP HYGIENE (.VMBACKUP)

SHA-256 Verified Archives with Automatic Credential Stripping

Before BudgetNautilus zips any .vmbackup snapshot, it purges the ai_credentials table inside the snapshot copy so API keys never leak into backup archives. Restoring a local backup validates manifest.json and SHA-256 digests, takes a pre-restore snapshot, preserves active ai_credentials in Zeroizing memory, and atomically swaps vault.json and budget.db.

Looking for the list of supported BYOK AI models?
View Supported AI Models (/models) →