onionwire/docs
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
..
PROTOCOL.md Merge branch 'main' into wt/t_fc02d8b6 2026-09-12 04:11:00 +00:00
README.md docs: add PROTOCOL.md and retire the stale audit writeup 2026-09-11 13:15:51 -04:00
SECURITY_AUDIT.md docs: add PROTOCOL.md and retire the stale audit writeup 2026-09-11 13:15:51 -04:00
THREAT_MODEL.md feat(store): encrypt the whole sqlite store with SQLCipher 2026-09-12 13:55:07 -04:00
TUI.md feat(tui): ASCII chrome, invite wrap, alert truncate, remaining copy 2026-09-12 00:54:16 -04:00

OnionWire docs

Read these in order if you are evaluating the protocol without the Rust:

  1. PROTOCOL.md — wire format, handshake, invite, frames. This is the document a second implementation would use.
  2. THREAT_MODEL.md — what v1 claims, and what it refuses to claim.
  3. SECURITY_AUDIT.md — in-house review notes and which findings are still open. Not a public third-party audit.

Operator / product docs stay in the root README. Android build notes: android/README.md. SDK: crates/onionwire-sdk/README.md.