Repository navigation
Conversation
The remote-content cache, the On This Computer tree, the exported log and the settings bundle were written with umask permissions, and the startup purge cleared /tmp while the Flatpak stages opened attachments in the runtime directory.
cache.db holds every cached message and attachment. It is now SQLCipher under a random key kept in the keyring, an existing cache is encrypted in place, and a missing, wrong or unreachable key asks the user instead of opening anything unencrypted. Settings can turn it off for a computer without a keyring.
Settings → Privacy → Encrypt stored mail makes cache.db a SQLCipher database under a random key kept in the keyring. The cache is converted at the next start in a window that shows its progress, a slow keyring shows a window too, and turning it on warns that earlier versions cannot open the encrypted cache. Co-Authored-By: James Reilly <5840441+hanthor@users.noreply.github.com>
|
Agentic reply: Your cache encryption is in the 1.48.0-beta.3 release, reworked and credited to you. It is off by default: Settings → Privacy → Encrypt Stored Mail turns it on and first warns that earlier versions cannot open the cache. The conversion and a slow keyring show a window with progress, and Quit leaves the cache as it was. The translations in the PR were not taken, and the template was regenerated. Your first commit is #600, which landed on its own. Please test it there and report anything that doesn't look right. It reaches the stable channel with the next stable release. The beta build is in the repo now. If you already have the beta installed, flatpak install --user --from https://hylki.hyprlab.co/flatpak/co.hyprlab.Hylki.Beta.flatpakrefRPM, Debian and AppImage betas: Beta channel. |
Builds on #600 (its first commit is that PR's).
cache.dbholds subjects, bodies, attachments, the Outbox and the search index in plain SQLite. This encrypts it at rest:rusqliteusesbundled-sqlcipher(SQLCipher 4.5.7, linking the runtime's libcrypto;Cargo.lockis unchanged and the manifest needs no edit). The key is 32 random bytes in the keyring (cache-key), passed as a raw key so opening costs no KDF; a new key is read back before anything is encrypted with it.cipher_memory_security = ON, reads once to catch a wrong key, and refuses a connection whose cipher settings differ from the pinned ones.quick_check, schema version, row counts, header), swapped in; any failure leaves the original byte for byte. Rows left in a WAL from a crash come across.Tests: wrong/missing/locked key fail closed with the file unchanged; migration from a plaintext cache with the real schema; no plaintext header or strings on disk; mismatched cipher refused; failed migration untouched; WAL rows survive; decrypt in place; reset. Checked live in a throwaway gnome-keyring under xvfb, and in a local Flatpak build. Not covered:
local_contacts.dbstays plaintext (0600).