Extracted text and vectors are encrypted at rest with one per-database key
Every database that holds extracted text is opened through SQLCipher (app/core/db_conn.py exposes the sqlcipher3 driver as its own sqlite3 handle; sys.modules["sqlite3"] stays the standard library's), and the text and vector columns are additionally Fernet-encrypted (app/core/crypto.py). Both layers use the same key, looked up from the OS keyring first and a 0600 key file second. We accepted the cost (a native SQLCipher dependency, slower queries, key-migration code) because the extracted text is a plain-text copy of the user's sensitive documents.
Consequences
- New stores of file content go through
resolve_db_crypto(db_path); a plainsqlite3.connector an unencrypted cache file contradicts this ADR. - When SQLCipher fails to import, opening a store raises a clear error instead of falling back to the standard library
sqlite3(#711).