onionwire/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Sirius DevOps e7b37ccb40
All checks were successful
ci / test (pull_request) Successful in 3m35s
feat(store): encrypt the whole sqlite store with SQLCipher
The db held the ed25519 identity secret, friend pubkeys, locators, profiles
and payment rows in the clear; only chat bodies were encrypted. Switch
rusqlite to `bundled-sqlcipher-vendored-openssl` and open every store with
`PRAGMA key = "x'<64 hex>'"` as the first statement after open, using the
existing Argon2id output as a raw key (no second KDF pass).

The per-install KDF salt moves out of the db into `store_salt` (0600) — a key
cannot be derived from a salt that lives inside the file it opens. The
per-message ChaCha20-Poly1305 + row-AAD layer is unchanged: whole-db
encryption does not defend against ciphertext swapped between rows, the AAD
does.

v0.2.1 installs are plaintext. The first open with the right passphrase
upgrades in place (WAL checkpoint, ATTACH ... KEY, sqlcipher_export) and only
swaps the file after the new one opens, passes integrity_check and unwraps
store_meta. A wrong passphrase leaves the plaintext file untouched; a
missing `store_salt` next to an encrypted db refuses to open rather than
guessing.

SQLCipher's internal "hmac check failed" ERROR on a rejected key is
suppressed (cipher_log_level = NONE) so a typo'd passphrase is not an error
dump.

docs/THREAT_MODEL.md: the store is now encrypted at rest; sqlcipher leaves
the "Out of v1" list.
2026-09-12 13:55:07 -04:00
..
backup.rs [verified] fix(store): bind chat AEAD to row AAD 2026-09-10 19:41:00 -04:00
dispatch.rs [verified] feat(tui): fail-closed /file transfer (1 MiB) 2026-09-10 23:32:06 -04:00
file.rs Merge branch 'main' into wt/t_fc02d8b6 2026-09-12 04:11:00 +00:00
frame.rs Add Noise IK encrypted stream over Arti. 2026-09-10 02:07:40 -04:00
hs.rs [verified] fix(hs): redact onion in publish logs; cache 0700 2026-09-10 20:30:18 -04:00
lib.rs [verified] sanitize peer chat/control/bidi before store and TUI render 2026-09-11 23:42:48 -04:00
loc.rs fix(protocol): domain-separate loc/prf/inv/rcp signatures 2026-09-11 23:42:41 -04:00
main.rs fix(cli): hide store passphrase like a password prompt 2026-09-10 21:10:50 -04:00
node.rs Merge branch 'main' into wt/t_fc02d8b6 2026-09-12 04:11:00 +00:00
pay.rs fix(protocol): domain-separate loc/prf/inv/rcp signatures 2026-09-11 23:42:41 -04:00
profile.rs fix(protocol): domain-separate loc/prf/inv/rcp signatures 2026-09-11 23:42:41 -04:00
qr.rs [verified] fix(qr): bind invite sig fields; cap decode 2026-09-10 19:52:44 -04:00
ratelimit.rs feat: incoming rate limit, identity backup, v0.2.0 2026-09-10 14:50:01 -04:00
sanitize.rs [verified] sanitize peer chat/control/bidi before store and TUI render 2026-09-11 23:42:48 -04:00
session.rs Add Noise IK encrypted stream over Arti. 2026-09-10 02:07:40 -04:00
store.rs feat(store): encrypt the whole sqlite store with SQLCipher 2026-09-12 13:55:07 -04:00
tui.rs feat(tui): ASCII chrome, invite wrap, alert truncate, remaining copy 2026-09-12 00:54:16 -04:00
wallet.rs Merge F5 wallet digest RPC onto audit bundle 2026-09-10 20:36:10 -04:00