2026-09-11 13:15:51 -04:00
# OnionWire security notes
2026-09-10 18:54:40 -04:00
2026-09-11 13:15:51 -04:00
**This is not a public third-party audit.** It is an in-house review of
commit `2b42864` plus a status check against the current tree. Do not cite it
2026-09-20 00:31:07 -04:00
as “audited.” OnionWire has not had a public external security assessment.
2026-09-10 18:54:40 -04:00
2026-09-11 13:15:51 -04:00
Protocol: [PROTOCOL.md ](PROTOCOL.md ). Claims: [THREAT_MODEL.md ](THREAT_MODEL.md ).
2026-09-10 18:54:40 -04:00
2026-09-11 13:15:51 -04:00
Original pass: rust-dev, no live hidden service / live wallet. Ignored tests
(`rotate_hs` , `tor_hs` , `two_node` ) were not run.
2026-09-10 18:54:40 -04:00
2026-09-11 13:15:51 -04:00
## Finding status (vs current tree)
2026-09-10 18:54:40 -04:00
2026-09-11 13:15:51 -04:00
| Id | Original | Now |
2026-09-10 18:54:40 -04:00
|---|---|---|
2026-09-11 13:15:51 -04:00
| F1 receipt `verified` on OR-match | High — txid **or ** addr+amount | **Fixed. ** `transfers_match` requires txid ∧ amount ∧ address, all non-empty. |
| F2 chat AEAD empty AAD | Medium — row swap | **Fixed. ** AAD `owmsg1 \|\| friend_id_le64 \|\| dir \|\| 0x00 \|\| row_id_le64` . |
| F3 invite concat signature | Medium — field shift | **Fixed on encode. ** Domain tag `onionwire-invite-v1` + `0x00` separators. Decode still **accepts ** legacy concat so old invites work. |
| F4 Monero address shape-only | Medium | **Fixed. ** Base58 + Keccak checksum + network prefixes. |
| F5 wallet RPC no auth | Medium | **Fixed. ** HTTP Digest required; open RPC refused; 1 MiB read cap; `.onion` RPC URLs refused. |
| F6 `/wipe` skipped payments | Low | **Fixed. ** `/wipe` also `DELETE FROM payments` + WAL checkpoint. Still not forensic. |
| F7 HS logs unredacted onion | Low | **Fixed. ** stderr uses a redacted label. `dangerously_trust_everyone` remains on Arti storage only. |
| F8 threat model vs F1– F3 | Low | **Fixed ** in [THREAT_MODEL.md ](THREAT_MODEL.md ) when the code landed. |
## Still true / not a “finding we forgot”
docs: describe the SQLCipher store, not the pre-#43 design
The v0.2 banner and the "Seized laptop" section still claimed only chat
bodies were encrypted, that `self.identity_sk` and the roster were
plaintext, and that "sqlcipher is out of v1". That has been false since
#43.
- README banner: whole store is encrypted at rest with SQLCipher, with the
row-bound AEAD layer kept on top.
- "Seized laptop": whole-file SQLCipher (Argon2id key over the 16-byte
`store_salt`, raw `PRAGMA key`), identity/friends/locators inside the
encrypted file, fail-closed unlock and `store_salt`-missing refusal, and
the in-place v0.2.1 upgrade. Kept the honest caveats: no defense against
a live compromise or a known passphrase, `/wipe` is not a forensic erase
(SSD wear-levelling), and THREAT_MODEL.md stays the reference.
- "Not in v1": drop `sqlcipher` (shipped in #43).
- docs/SECURITY_AUDIT.md "Still true" bullet repeated the same plaintext
claim; restated it as the residual risk that actually remains.
No code change. Evidence: cargo test --test store (21 passed, incl.
whole_store_file_is_encrypted_at_rest) and cargo test --lib -- store::
(6 passed, incl. the plaintext->SQLCipher upgrade and the wrong-passphrase
no-op).
Card: t_f2fc5190
2026-09-12 16:00:12 -04:00
- At rest the whole store is SQLCipher (Argon2id key over a 16-byte `store_salt` ), so the identity secret key, roster (pubkeys + locators) and chat bodies are ciphertext on disk; chat bodies add a row-bound AEAD layer on top. That is not a defense against a live compromise or an attacker who has the passphrase — see [THREAT_MODEL.md ](THREAT_MODEL.md ).
2026-09-11 13:15:51 -04:00
- Arti onion services are experimental. Fail closed; no C-tor fallback.
2026-09-20 00:31:07 -04:00
- No public third-party audit. This file is not one.
2026-09-11 13:15:51 -04:00
- Invite decode still accepts the legacy concat signature (compatibility).
- Rate limit is availability, not traffic-analysis defense.
- One-shot sessions: no channel binding across file chunks beyond “same Noise peer.”
2026-09-20 00:31:07 -04:00
- The in-process Cuprate chain daemon is opt-in and **unvalidated on mainnet ** .
2026-09-11 13:15:51 -04:00
## Verified correct (original pass, still the protocol)
Noise is `Noise_IK_25519_ChaChaPoly_BLAKE2s` , prologue `onionwire-v1` , 96-byte
identity proofs, loc/prf/inv/rcp signed under the session identity, unknown
`[a-z]{3} ` prefixes dropped, frames length-checked before allocate. See
[PROTOCOL.md ](PROTOCOL.md ).