# OnionWire threat model (v1) OnionWire is a two-party chat over Tor onion services. There is no chat server. Identity is an ed25519 pubkey; the onion is a locator only (`F4` rotates the locator, nothing else). Wire format: [PROTOCOL.md](PROTOCOL.md). Wallet: [WALLET.md](WALLET.md). In-house review notes: [SECURITY_AUDIT.md](SECURITY_AUDIT.md) — **not** a public third-party audit. Do not cite that file as “audited.” ## Tor relays are not a chat server Each install hosts its own v3 onion and dials friends’ onions through in-process Arti. Relays move cells; they never see plaintext, never store messages, and never hold a roster. Compromising a relay is not compromising OnionWire’s message store. The store is the sqlite file on the endpoint. ## Location updates are not a missing-person finder A signed `loc` frame (`onion`, `ts`, `sig`) rewrites a friend’s locator **only if** that friend is already in the roster, the signature verifies against the pinned pubkey, and `ts` is newer. There is no directory, DHT, or introduction server. If you rotated while they were offline, they cannot find you until they F3-paste your new invite. OnionWire will not hunt for a missing person. ## Rotating the onion does not revoke a friend `F4` changes the locator only. The identity key is unchanged. Anyone who already has your pubkey can still prove they are talking to you, and a later invite paste with the same `k` updates their row. To become a new person, `/wipe-all` (new identity key). There is no in-band unfriend/revoke in v1. ## Rotating the prekey is a hard cut, and it is wider than F4 `F8` rotates the long-lived signed prekey **and the ML-KEM-768 install key**. The identity key and the onion are unchanged, but the prekey is our Noise static **and** the seed of the bootstrap ratchet epoch, and the KEM key is what peers encapsulate to, so once either moves nothing is reachable any more: a friend's dial uses the prekey and `kem=` they pinned from your invite, and their stored epoch is derived from the old prekey. There is no push path for either key — they only travel inside a signed invite — so every friend, online or offline, has to F3-paste the new invite before chat works in either direction again. F8 therefore also drops the local ratchet state for every friend, exactly as a peer's own prekey change does. Rotating the prekey shrinks the forward-secrecy window of the long-lived static; it is not a revocation (the old invite holder still learns nothing new, but they also cannot talk to you). ## Post-quantum transport does not make messaging post-quantum Every Noise session to a v2 friend carries an ML-KEM-768 secret. The initiator sends a `version = 2` prelude with `ct = Encapsulate(friend.kem_pk)` before Noise msg 1, and both sides mix `(ct, ss_kem)` into the Noise prologue (`"onionwire-v2" || 0x00 || ct || 0x00 || ss_kem`). A recorded handshake therefore exposes an X25519 DH and an ML-KEM-768 encapsulation; a future cryptographically relevant quantum adversary has to break ML-KEM-768 as well as X25519 to recover the Noise transport keys. That removes the harvest-now-decrypt-later exposure of the **one-shot transport**. What this does **not** buy: - **The chat ratchet stays classical.** Chat messages are `rat ` frames (Double Ratchet, `docs/PROTOCOL.md`). The **bootstrap epoch is derived only from the two long-lived X25519 prekeys** (HKDF over their DH, with the identity pubkeys mixed in), so an adversary who records a `rat ` chain and later obtains both prekeys can reconstruct epoch 0 even though the Noise session that carried it was hybrid. Later epoch chains use fresh X25519 DH steps, which are equally quantum-vulnerable. PQ ratchet steps are a separate follow-up, not part of this transport work. - **Identity and invite signatures are ed25519**, still classical. The KEM key is authenticated by a v1-style ed25519 invite signature; an adversary who can forge it can also swap `kem=`. Hybrid transport protects confidentiality, not the long-term authentication root. - **Legacy friends get nothing.** A friend added from an `onionwire:v1` invite has no `kem_pk`; sessions to them are the old classical `onionwire-v1` prologue, and the UI labels that friend as lacking PQ protection. The choice is derived from the roster row, never from the wire: a `kem_pk` friend rejects a prelude-less session with `prelude required` before any application frame, so an active attacker cannot downgrade it. - **Mixed-version fleets break.** A v1-only build cannot open a session with a v2 friend; that is accepted rather than adding a fallback path. ## Your store is encrypted The sqlite store is SQLCipher (`rusqlite` feature `bundled-sqlcipher-vendored-openssl`). A 32-byte key is derived from the store passphrase with Argon2id — m = 65_536 KiB (64 MiB), t = 3, p = 1, out = 32 — over a per-install 16-byte salt in `store_salt`, and handed to SQLCipher as a **raw** key (`PRAGMA key = "x'…'"`) — no second KDF pass over it. The identity backup and the message-key wrap in `store_meta` use the same profile. Parameters are versioned with the data: a backup blob names its profile in the header and `store_meta.kdf_profile` names the store's, and an unknown profile id is a clear error, never a silent fallback. Data written with the earlier 19_456 KiB / t=2 / p=1 profile still opens: a legacy store is rekeyed and its message key re-wrapped with the current profile on the first successful unlock, and a legacy backup file opens as-is (re-exporting it writes the current profile). The key is the first statement after open, so the file header, schema, identity secret key, friend public keys, locators, profiles, payment rows and the per-friend ratchet session blobs (`ratchet_sessions`) are all ciphertext on disk. There is no `identity_sk`-on-disk problem to work around because `identity_sk` is inside the encrypted file. A wrong or empty passphrase fails closed before any write; an encrypted store whose `store_salt` is missing refuses to open instead of guessing. v0.2.1 installs have a plaintext db. The first open with the right passphrase upgrades it in place (`ATTACH … KEY` + `sqlcipher_export` after a WAL checkpoint), and swaps the file in only after the new file opens, passes `integrity_check` and unwraps `store_meta`. A wrong passphrase leaves the plaintext file untouched. The `store_salt` file is not secret (a salt never is). Chat bodies carry a second, row-bound layer: ChaCha20-Poly1305 (`nonce || ciphertext` in `messages.plaintext`) with AAD `owmsg1 || friend_id_le64 || dir || 0x00 || row_id_le64`, plus a random 32-byte data key wrapped with Argon2id from the same passphrase (`store_meta`). Whole-db encryption does not stop someone who can write the file from moving one row's ciphertext into another row; the AAD does, and it stays. Unlock is fail-closed: wrong or empty passphrase does not open chat. Empty-AAD v0.2 blobs are rewrapped once on unlock; `list_messages` never falls back to empty AAD. At-rest encryption is not a defense against a live compromise: while OnionWire runs, the passphrase, the db key and decrypted bodies are in process memory, and SQLCipher's page cache holds decrypted pages. It also does not stop an attacker who has your passphrase. `/wipe` deletes chat and payments history (overwrite message bodies, `VACUUM`, WAL checkpoint); roster and identity stay. It is not a forensic erase — SSD wear-leveling can keep copies. `/wipe-all` deletes the data dir (new identity); same disk caveat. ## Fail closed Peer onion down → a **chat** send is queued locally and retried (see “Local outbox (chat retry queue)”); file transfer and payment frames still fail immediately. Fingerprint mismatch vs the pinned key → hard fail, no send, never queued. Arti HS experimental: if it cannot publish, OnionWire stops; it does not fall back to C-tor. ## Local outbox (chat retry queue) is local, and it re-dials on a schedule A chat send to an unreachable onion is written to an `outbox` row next to its `messages` row and retried in the background. There is no server-side queue: a queued message is never handed to a third party, and it dies with the device. Two consequences are real and are accepted: - **Device seizure.** A pending (never-delivered) message sits in the same SQLCipher store as the rest of the history, under the same per-row AEAD and the same passphrase-derived key — no weaker, but also no shorter-lived. Seizure *with* the passphrase reveals messages that were never actually sent, including ones the sender may have moved on from; seizure without it reveals nothing in this store. `/wipe` clears outbox rows with the rest of chat history; `/wipe-all` removes them with the data dir. Neither is a forensic erase. - **Retry cadence is a local traffic-analysis surface.** A queued send re-dials the peer's onion on a backoff schedule while the app runs. An observer of your Tor client (or the network in front of it) sees a repeating connection attempt to one onion on a predictable cadence — it does not learn the plaintext or the recipient identity, but it can infer that you have an undelivered message for someone, and roughly when you composed it. The backoff is per-row, capped at one attempt per 30 min per message, and stops after 8 attempts or on a terminal failure. The queue is bounded in scope: chat only. File transfer and `rcp` frames are one-shot, so a failed payment claim does not sit in the store being retried forever. ## Reachability: there is no sealed mailbox, and no mutual-online indicator **No sealed mailbox.** OnionWire does not implement a server-side message store, a sealed mailbox, or any store-and-forward drop. There is no address a peer can write a message to when you are offline, and nothing that holds a message on your behalf after your device is gone. A mailbox of that kind needs a persistent process that accepts and later replays ciphertext for an absent recipient — exactly the hosted store-and-forward server this threat model rules out (“Tor relays are not a chat server”, “Out of v1”). A sealed box whose key never leaves the user's device is still a server holding the traffic pattern and the ciphertext, and it is still a third party that can be compelled, logged, or silently serve a stale box. That is the design decision, and it is not planned as a follow-up. **The chat outbox is local-device retry only.** A message to an unreachable peer is written to the local `outbox` row and re-dialed from this device. It dies with the device: no relay, no friend, no other install ever holds it. Nothing in the outbox is a delivery guarantee. **No mutual-online indicator.** OnionWire has no presence, no "peer is online" dot, and no shared online state. Every send is a one-shot Noise IK session to the peer's onion and is closed after one application frame; the peer's availability is only learned from whether *this* dial succeeded. A roster row we have not reached is marked `stale` (from the last connect attempt, `last_connect_ok`) and the footer states the consequence instead of implying presence: `peer unreachable, queued (n/8, retry …)` while an outbox row is outstanding. "They are offline right now" and "they have never been online since my last attempt" are indistinguishable to OnionWire, and the UI does not pretend otherwise. **What this costs, stated plainly.** Two devices that are never online at the same time cannot talk, and there is no queue that changes that — the sender's own device is the only queue. Anyone who needs offline delivery must run their own always-on OnionWire install (their own identity, their own onion) to hold the messages, which is a hosted server *they* own and operate, not a service OnionWire provides. ## Chat is ratcheted on top of the one-shot Noise session The Noise IK session is still the transport: handshake, **one** application frame, close, one circuit per message. Chat stacks a Double Ratchet *inside* that frame (`rat `, [PROTOCOL.md](PROTOCOL.md)), with per-friend state persisted in the encrypted store (`ratchet_sessions`). The ratchet changes what a stolen chat line is worth; it does not re-open any lock: no relay, no server-side queue, one frame per Noise session, and the ratchet state never leaves the device. **Gains.** - *Per-chain forward secrecy.* Every message key is `HMAC-SHA256(chain_key, 0x01)` over a chain key that is replaced by `HMAC-SHA256(chain_key, 0x02)` after each message, so state recovered after a chain has moved on does not decrypt the messages already sent on it — outside the skipped-key window below. - *Post-compromise security after a DH ratchet step.* An attacker holding a snapshot of one side's state cannot read the conversation past the next DH ratchet step: that step feeds a fresh X25519 output — and, from the first rotation, a fresh ML-KEM-768 secret — into the root, and the snapshot stops producing chain keys. The window is not zero — it lasts until the next step — but no attacker can prevent it closing. - *Quantum-resistant chains from the first rotation.* Every ratchet step mixes a fresh ML-KEM-768 secret into `KDF_RK` alongside the X25519 output (`dh_out || ss_kem`, info `onionwire-ratchet-v2-kdfrk`). A harvest-now adversary who records a hybrid chain and later breaks X25519 still needs the ML-KEM-768 secret to walk that chain, which breaking X25519 does not give. Ratchet keypairs are generated as `{x25519, ml-kem}` with the KEM seed derived from the X25519 secret, so the KEM half adds no state to protect. - *The ratchet header is not on the wire.* `dh_pub`, `N`, `PN` and, on hybrid chains, `kem_pub`/`kem_ct` ride inside the Noise ciphertext (authenticated as AEAD associated data), so message counts and ratchet-key changes are not observable, and a tampered header fails closed. A missing KEM section on a step is a hard `hybrid step required` rejection, never a classical fallback. **Honest limits.** - *Skipped-key window.* Up to `MAX_SKIP` (2000) message keys of one chain, or up to `MAX_SKIPPED_KEYS` (2000) entries across a friend, stay decryptable to whoever holds the state until they are used (deleted on use) or evicted oldest-first. A snapshot also carries the current sending and receiving chain keys, which read the current chain until it advances. This is the price of out-of-order delivery, and it is per friend. - *Epoch 0 is classical — this is the remaining harvest-now window.* The bootstrap root and both initial ratchet secrets are HKDF outputs of the X25519 DH between the two long-lived signed prekeys, and the identity pubkeys that separate them are public. A per-session KEM secret cannot be folded into epoch 0: each chat message is its own one-shot Noise session, so `ss_kem` differs per dial and per peer, and a root bound to it would make the two peers (or even message 1 and message 2) derive different chains. Epoch 0 is therefore derived with the classical `KDF_RK`, and the ML-KEM secret enters at the **first rotation** — two round trips in, at the latest. What that leaves exposed, precisely: - The epoch-0 *chain keys* are not post-quantum. A future X25519 break reconstructs the prekey DH, hence the epoch-0 root and every message key on that chain. This covers everything sent before the first hybrid step, including any frame that was encoded on epoch 0 and left in the outbox. - It does **not** by itself open a recorded v2 transcript, because a v2 friend wraps every `rat ` frame in the hybrid Noise session (ML-KEM-768 prelude). The epoch-0 chain keys are a second layer; breaking X25519 alone still leaves that outer layer closed. The exposure becomes real the moment the rat frame itself is accessible — a state snapshot taken at epoch 0, an old client that logged it, or a peer running the classical transport. - For a **classical (v1) friend** there is no PQ layer anywhere: transport and every ratchet step are X25519-only, so the whole conversation is harvest-now-decrypt-later exposed. Hybrid ratchet steps require `kem_pk` on the roster row, which a legacy invite does not carry. - From the first hybrid step on, a state snapshot plus a future X25519 break is not enough: the chain also needs the ML-KEM-768 secret, and the next rotation replaces it. We do **not** claim full post-quantum forward secrecy, because epoch 0 is outside that guarantee. The bootstrap epoch is still the reason state is dropped when a peer's prekey changes, and an attacker holding both prekey statics can reconstruct epoch 0 directly (no break needed). A recorded message is not opened by the prekeys alone while the one-shot Noise session an ML-KEM friend used remains intact. - *No deniability and no non-repudiation claim.* Chat frames are not signed and both parties derive the same chain keys, so nothing here would let a third party decide which of the two authored a chat line. Identity is proven per Noise session (the 96-byte proof), not per message. - *No one-time prekeys.* The bootstrap epoch uses the long-lived signed prekey only, so there is no per-session prekey consumption. A peer prekey change drops the state locally and the next chat frame re-bootstraps; there is no in-band reset and no key confirmation. The same is true of your **own** prekey: `F8` rotates it, drops every stored state, and each friend has to re-paste your invite, because a new prekey is never pushed. - *A compromised endpoint is out of scope.* The ratchet state lives in the same SQLCipher file as the chat log, under the same passphrase. Anyone who opens the store holds the roots, both chain keys, the skipped keys and the plaintext history. `/wipe` clears chat, payments and outbox rows but **keeps** the ratchet state (roster and identity stay), so chat resumes on the same epoch; `/wipe-all` removes the data dir with it. - *Length is bucketed; timing is not.* One Noise session per message, and chat plaintext is padded inside the ratchet ciphertext to a fixed ladder (256 B to 32 KiB — `docs/PROTOCOL.md`, “Length buckets”), so an observer sees only the bucket and not the body length. That is all it hides: message timing, retry cadence, the one-shot-per-message circuits, and the timing of the handshake are unchanged, and no cover traffic or jitter is generated. The frame header is not padded: a classical `rat ` frame is 350 bytes at its smallest, while a hybrid step's 2312-byte ML-KEM header makes its smallest frame 2622 bytes on the wire. That is a size class, not a message count, and it does not leak the body length inside the bucket. Non-chat frames (`loc `, `prf `, `inv `, `rcp `, `tip `, `fil `) are not padded and still reveal their own sizes. - *The ratchet does not re-open the "no server-side outbox" lock.* The state is device-local, one row per friend in the encrypted store, and nothing about it is transmitted. The local retry queue's two accepted consequences (device seizure, retry cadence) are unchanged. ## Profile is friend-visible, not a directory A signed `prf` frame is shown to people who already have a session with you. Apply only for existing friends. There is still no name lookup, DHT, or public profile server. Anyone who already has a Noise session can see the profile you send them; that is not confidentiality against that friend. ## Payments are opt-in; spend is a local authority Chat does not need a wallet. Payment frames (`inv`, `rcp`, `tip`) are signed claims over Noise: a signature proves which friend sent the claim, not that money moved. `verified=1` only after a conjunctive match — one `get_transfers` row with the same non-empty `txid`, `amount`, and `address`. RPC down, error, or no exact row → stay `verified=0`. Subaddress reuse is the user’s wallet policy. **Default: no spend.** No seed and no spend key on the device. Receive can use the profile `xmr_addr`, or a view-only wallet (`create_address` / `get_transfers` only). `/tip` is off (`ONIONWIRE_WALLET_NO_SPEND`, or a watch-only wallet detected over RPC via `query_key spend_key` → `-29`). **Spend is opt-in**, at wallet create or restore, not a hidden default. A seed-backed spend-capable wallet makes OnionWire a **local spend authority** for that file: anyone with the wallet passphrase or the wallet-RPC credentials can move the balance, and `/tip` is a supported way for a chat peer to get paid. Those credentials are sealed with the store data key (SQLCipher plus a per-row AEAD), and so is the **wallet-file passphrase**: it is kept in the same sealed row, because `monero-wallet-rpc` holds a wallet only for the life of one process and reopening the file needs it. That is a deliberate decision with a real consequence — **whoever can unlock the store can spend**: the store passphrase (or its Keystore wrapper) is now sufficient, and there is no second secret standing between a seized unlocked device and the wallet's balance. Nothing else changes: `/tip` still refuses on a view-only wallet before any dial, the spend-authority warning is still unavoidable at create/restore, the passphrase is never logged, never in an error string and never on a process argv, and `/wipe` keeps the wallet file and its passphrase exactly as it kept the file before. The spend-authority warning is unavoidable at that create/restore step. Loopback binding is not an authorization boundary. Back up the seed; do not leave a spend-capable wallet on a device you do not trust; a separate hot wallet with a small balance is the sane spend shape, not savings. The app talks to `monero-wallet-rpc` over **loopback HTTP Digest** only (`--rpc-login` required; open RPC refused). That process may be one the user already runs, or one the app spawns. Wallet RPC is never dialed over clearnet or over `.onion` — a remote wallet RPC would move spend authority off the box through a channel the messenger’s `--password` gate does not cover. **The seed-offset passphrase is a second spend secret, and it is not stored.** An import may be given Monero's optional `seed_offset`: a phrase mixed into the 25 words at restore time, so the same words with a different offset open a different wallet (plausible deniability). It is typed once, travels only in the JSON-RPC body (never argv, never logged, never an error string), is never sealed and never persisted — storing it would defeat the point. It is also not a second gate on an already-imported wallet: whoever can unlock the store can still spend the opened file, because the wallet file's own passphrase *is* sealed (previous paragraph). A wrong offset is silent — the RPC succeeds and the wallet is simply a different one — so the app cannot warn about it, and after such an import a later seed backup is the *derived* mnemonic, which opens the wallet without the offset. ### Chain source is the user’s choice Scan, receipt verification, and spend need a Monero daemon. The user picks one; the app does not pick a public remote node for them. 1. **Spawn a local `monerod`** (pruned is the on-device target). Chain traffic stays on the device. The user accepts disk (tens of GB for a pruned mainnet node), first-sync time, and — on Android — process kills: the daemon is not always running. A pruned node is not an archive. Seed restore of deep history can degrade; once the wallet has scanned, its own cache is the history. Unsynced or not running is an honest “not ready” / unverified state, not a fake success. 2. **An in-process daemon** (Cuprate, behind the `cuprate-daemon` feature, on in the Linux TUI/release binary; a `--no-default-features` build does not include it). P2P, consensus and RandomX run in the OnionWire process; nothing is spawned and nothing leaves the device except the chain P2P traffic itself. What that changes: there is **no daemon operator** to trust — your own process is the daemon, so the "operator sees your addresses" question does not exist. The spend key, the chain, and the messenger are then all on one device. What it does not change: the **device is now the trust root for chain data**. Chain state is only as trustworthy as the binary running it, and a compromised device corrupts the chain view along with everything else. Honest limits, stated here rather than in a footnote: - Cuprate is **pre-production**. Its own user book says *"do NOT use cuprated for any serious purposes"*, and its `monerod` RPC parity is incomplete (Cuprate issue #278). This is why the source is an opt-in build feature and a stored user choice, never a default. - Mainnet is **unvalidated**. The TUI can store a mainnet choice (`F6` 1/2); every in-process surface still says `testnet only — mainnet is unvalidated`. Cross-compiled is not device-proven. - Cuprate's own `arti` feature is off (its Tor stack is `arti-client` 0.44, which cannot unify with this crate's 0.49), so the in-process daemon's P2P traffic is **clearnet**: your ISP sees that this device talks to Monero peers. No Tor is on the chain path — Tor is the messenger's transport here, not the chain's. - Inbound P2P is off and the restricted RPC listener is disabled; the unrestricted RPC binds loopback only, and it is the address the wallet child dials. `--trusted-daemon` is still never passed. - The chain database is a separate embedded store (fjall) under the chain data directory, not the SQLCipher store the messenger writes — different file, different exposure: it is not encrypted by that store's key. 3. **A daemon address they supply.** The wallet child points `--daemon-address` at that host. Trust follows the address: - **Loopback** — same privacy as (1); the user owns `monerod`. - **`.onion`** — chain traffic over Tor through a localhost SOCKS5 listener the app provides for the wallet child (not the messenger’s Arti `connect()`, and not a C-tor fallback for chat). That listener is the bundled `arti` **binary** run as a child (`arti proxy -p `) — a second, separate Tor client with its own state and cache dirs, because `arti-client` 0.49 exposes no SOCKS listener API. It is TCP loopback only (`arti proxy -p` binds `127.0.0.1`/`::1`; arti 2.6.0 / `tor-config` 0.46 have no Unix-socket listen target — arti#1965), and the port is usable by any local process at the user's privilege level: it is an app-private port, not an access-controlled one. The app gates the spawn on the unlocked store and waits ≤20s for the listener to accept before starting the wallet child, so a dead proxy fails visibly instead of hanging. The SOCKS child stops with the wallet child. Tor hides the transport. The daemon operator still sees the wallet’s addresses during sync. The host is the trust boundary. - **Clearnet** — only if the user typed it. Not a default, not implied. The ISP sees Monero-node traffic; the daemon operator sees addresses. Show that trust shift before using the address. Remote daemons are untrusted (`--trusted-daemon` off). Setup, view-only vs spend, and RPC credentials: [WALLET.md](WALLET.md). ## The recovery phrase and the private keys are displayable on demand Both clients can show the **open** wallet's recovery phrase (`query_key mnemonic`) and its private view and spend keys (`query_key view_key` / `spend_key`), from an explicit user action. That is new exposure the threat model did not previously enumerate: the phone screen — and the Linux TUI window — is now one of the places a spending secret can be read from. - The values come from the wallet file the child has **open**. There is no path that reads another saved wallet's secret without opening it first, and none that reads a wallet file directly: the RPC is the only source. - They are never logged, never written to the store or any other file, and never placed in an error string; the records that carry them (`WalletKeys`) redact themselves under `Debug`. They exist in process memory only while a screen shows them. - They are shown only from an explicit user action, never on a refresh path. - What this does **not** stop: a shoulder-surfer, a screen recorder, a screenshot, or a malicious app with screen-capture permission. Whoever reads the screen gets the keys; a view-only wallet leaks only the view key (`spend_key` is `None`), but a spend-capable one leaks everything the file can spend. - The spend-authority warning above still applies and is now easier to reach: the seed that makes a wallet spend-capable can be photographed off the device. Treat any screen that shows a seed or a private key the way you treat the wallet file itself. ## Backup file is the identity `/backup` writes the identity and Noise static secrets. Treat the file like `onionwire.db`. Restore overwrites self keys and does **not** rewrite the friends table. ## Rate limit is availability, not anonymity Incoming rendezvous accepts are token-bucket limited (30/60s, burst 10). Excess is dropped without handshake. That is a DoS/availability control. It does not hide that you run an onion, and it is not a traffic-analysis defense. The constants are unchanged. Clients absorb the cost: file senders pace and retry chunks to fit this budget. The accept loop does not distinguish a friend from a flood. ## Network (UDP / clearnet) The application does not open UDP sockets and does not resolve friends via system DNS. Peer dials are Arti `connect((onion, 80))` only. Wallet **RPC** (HTTP Digest to `monero-wallet-rpc`) is loopback TCP only (numeric `127.0.0.1` / `::1` preferred; `localhost` still does `getaddrinfo`). That socket is the app talking to the wallet process, not to the chain. **Chain** traffic is the wallet child’s connection to a Monero daemon. It is off unless the user opted into a wallet and chose a chain source: spawned local `monerod` (loopback), or a daemon address they entered. A `.onion` daemon is reached through a localhost SOCKS5 proxy used only by that wallet child: the bundled `arti` binary run as `arti proxy -p `, whose `--proxy` target is `127.0.0.1` and whose `.onion` name travels inside the SOCKS request (Monero's SOCKS5 client sends the domain-name form, so no local DNS runs on it). The messenger's in-process Arti client is never handed to the wallet child. A clearnet daemon address is an explicit user choice — a clearnet socket they asked for — not the messenger path and not a hidden default. Do not add STUN/ICE/WebRTC, a DHT, SOCKS/C-tor fallback for **peer dials**, or “direct TCP when the onion is slow.” Those are the Tox-over-Tor leak class. A SOCKS listener used only by the wallet child to reach a user-chosen `.onion` daemon is not that class. ## Peer text is untrusted display data Chat bodies and `fil ` names come from a Noise peer, not from the local user. They are display data, not terminal commands. A friend (or anyone who stole that session) can put ESC/CSI/OSC, C1 controls, or bidi overrides in a payload. OnionWire strips those at ingest (so sqlite history is clean) and again at TUI render (so rows written before this rule stay inert). Filenames that contain the same characters are rejected, not rewritten. This is a UI-redressing / terminal-injection boundary, not a confidentiality control: the peer already knows the plaintext they sent. ## Out of v1 Prosody, XMPP, s2s, MAM, carbons, a **sealed mailbox**, a **server-side** outbox / store-and-forward relay, multi-device, DHT / name server, A/V. The local retry queue of the previous section is not an outbox in the XMPP sense: it never leaves the device, and it is not a mailbox either — see “Reachability”.