# Security Sesori is designed around the idea that your source code, prompts, and AI responses should stay under your control. This page describes how we keep the data path private and what the relay can and cannot see. ## End-to-end encryption All application data between your phone and the Bridge is encrypted with **XChaCha20-Poly1305**. The relay sees only opaque binary frames for application data and cannot decrypt them. The X25519 public keys used for the initial key exchange are delivered through the relay unauthenticated, so the design treats the relay as a trusted routing and key-delivery endpoint. A compromised relay could replace both public keys and mount a man-in-the-middle attack; we do not harden against a malicious relay. ### Compression The app asks the Bridge to compress its responses, such as transcript pages and session lists. A Bridge that supports this compresses them with deflate **before** they are encrypted, so the relay still sees only opaque frames in the same format; an older Bridge ignores the request and replies uncompressed. Live events, key exchange and rekey messages, app requests, the connection health check, attachment downloads, and shutdown rejections are never compressed. Compressing before encrypting means a frame's length can reveal a little about how compressible its content is. A CRIME/BREACH-style attack would need a secret and attacker-controlled text within 32 KB of each other in the same response, an observer of frame lengths, and many adaptive re-fetches of that same response, which the attacker cannot trigger. Only the relay and network observers see lengths, and live events already expose finer-grained lengths of live content. Sesori's own credentials, the room key and auth tokens, never travel in compressed responses, but any secret that appears in transcript content, such as a pasted token or tool output, does. We accept this risk rather than mitigate it. The app does not cap how large a response may inflate: a frame is inflated only after it passes authentication, so only a peer that already holds the room key could send one. ## Ephemeral key exchange Each phone-to-Bridge connection uses an **X25519 Diffie-Hellman** key exchange. The derived secret protects delivery of a per-session room key, and the ephemeral keys are discarded afterward. The room key itself is persisted on the phone so reconnects can resume without renegotiating, but a `rekey_required` signal can force a fresh exchange at any time. ## Local protection By default, the Bridge protects its localhost connection to the AI assistant with a locally generated random 256-bit password. In the default loopback configuration, that password is injected into local HTTP requests and is not sent over the network. You can change this behavior: - `--opencode-password ` replaces the generated password with your own. - `--opencode-no-password` disables authentication entirely (allowed only on loopback in managed mode). It works only with OpenCode v1: every OpenCode v2 server requires a password. With v2 the flag is ignored when the bridge uses the shared OpenCode 2 service, which brings its own password; with a private v2 server the bridge cannot authenticate and the plugin fails to start. If you configure a non-loopback `--opencode-host`, the password crosses the network as Basic auth headers, and `--opencode-no-password` is rejected in managed mode because it would expose an unauthenticated server. ## What the relay sees The relay is a stateless WebSocket router. It sees: - Connection metadata required to route frames (auth tokens, public keys, device identifiers). - Opaque binary frames whose contents it cannot decrypt. It does **not** see: - Your source code. - Your prompts or AI responses. - Session contents, diffs, or commits. - The room key or derived secrets. ## What Sesori stores Sesori retains the minimum account-level data needed to make the service work while your account is active: your sign-in identity, a small amount of routing metadata, and push notification tokens. We do not store your code, prompts, or AI responses, except any text you paste into feedback you choose to send. If you send private feedback from the app, the Sesori auth server stores it with your account: the issues you ticked, any text you wrote, where the sheet was opened, your platform, and the app version. Nothing is stored unless you choose to send it. Feedback text goes only to Sesori, never to an app store. It is deleted along with your account's other data when you ask us to delete your account ([hello@sesori.com](mailto:hello@sesori.com)). ## Push notifications If you enable push notifications, our backend builds a notification payload that may contain a short preview of the event (for example, a question summary or the latest assistant message). That payload is sent to Apple or Google push services, so it leaves the end-to-end encrypted channel between your phone and the Bridge. The full code, prompts, and responses stay on your machine; only the preview needed for the notification travels through the push provider. ## Account deletion You can delete your account from the Sesori mobile app. Because we do not store message history, deletion removes account and routing metadata only. Feedback you sent is deleted manually on request. You can also email [hello@sesori.com](mailto:hello@sesori.com) for assistance or to request that deletion. ## Reporting issues If you discover a security issue, please email [hello@sesori.com](mailto:hello@sesori.com) before opening a public issue. We will respond as quickly as we can and coordinate a responsible disclosure. ## Work laptop note If you want to use Sesori on a work laptop, check with your security team first. Some organizations restrict outbound relay connections, even though the relay cannot read your data.