Skip to content

docs(security): document the remote channel's end-to-end encryption - #862

Merged
huichen merged 1 commit into
mainfrom
docs/security-e2ee
Sep 26, 2026
Merged

huichen merged 1 commit into
mainfrom
docs/security-e2ee

Conversation

@huichen

@huichen huichen commented Sep 26, 2026

Copy link
Copy Markdown
Collaborator

What

SECURITY.md (and the Chinese pair) described the Remote transport — TLS, JWTs,
which platforms see the traffic — but said nothing about the encryption between
the two paired endpoints, while docs/wiki/*/Remote.md and
docs/internals/desktop/CONNECTION.md both claim it. A reader of the security
policy could reasonably conclude the relay sees plaintext. It does not.

SECURITY: state the remote channel encryption

New bullet, sourced from desktop/src-tauri/src/remote/secure.rs,
packages/remote-crypto/src/lib.rs and docs/internals/desktop/REMOTE_E2EE.md:

  • the endpoints authenticate with a Noise handshake — XXpsk0 while pairing,
    IK on reconnect — and encrypt every application record (commands and replies,
    file chunks, session events, presence and catalog records, the disconnect
    notice) with ChaCha20-Poly1305 under keys from that handshake;
  • the relay therefore carries ciphertext and cannot forge an accepted message,
    but still sees NATS subjects, traffic metadata and message timing/size;
  • the one raw path is the pairing request/reply envelope — the Noise message
    inside it is encrypted, the envelope and refusal reasons (invitation_expired)
    are not;
  • and the limits that remain: a compromised endpoint, a stolen unlocked device,
    or a leaked unused invitation are out of scope.

Wiki: replace a caveat that the code does not support

The same sentence in docs/wiki/{en,zh}/Remote.md claimed the desktop's
"availability announcement before a channel is established is not encrypted".
That path does not exist: presence is published through secure::publish, and
when no channel key exists the heartbeat drops the payload (Ok(false),
publisher.rs) instead of sending it in the clear — every Client::publish call
site outside the pairing reply is sealed. The unverified caveat is replaced with
the verified one (the pairing envelope).

README

  • drop 3,800+ models from the tagline, the section nav and the feature table —
    the number drifts with every catalog refresh and says nothing a reader needs;
  • Model Flexibility now leads with bring your own key (built-in catalog
    providers, plus any OpenAI- or Anthropic-compatible endpoint via models.json)
    alongside signing in to the FutureOS provider for provisioned keys and a
    model list;
  • Multi-Interface now notes that the desktop backend also runs headless on
    a server
    (futureos-headless, no window or WebView, usable over SSH) and
    that the phone↔desktop channel is end-to-end encrypted.

Verification

  • python scripts/docs/check-docs.py --strict-pending → exit 0 (205 docs,
    0 pending bilingual pairs, links and script paths OK)
  • python scripts/tests/test-check-docs.py → Ran 27 tests … OK
  • every claim above was re-read from the sources named in the commit message;
    the encryption list comes from REMOTE_E2EE.md's boundary statement plus the
    publish/seal call sites, not from the wiki prose

…n the README

SECURITY said nothing about the phone<->desktop channel even though the code
encrypts it, so a reader could reasonably conclude the relay sees plaintext.
State what actually happens: the endpoints authenticate with a Noise handshake
(XXpsk0 while pairing, IK afterwards) and encrypt every application record --
commands and replies, file chunks, session events, presence and catalog
records, the disconnect notice -- so the relay carries ciphertext and cannot
forge an accepted message; it still sees subjects and traffic metadata. Name
the one raw path (the pairing request/reply envelope) and the limits that
remain (compromised endpoint, stolen unlocked device, leaked unused invitation).

The wiki page carried the opposite kind of error: it claimed the desktop's
availability announcement is unencrypted before a channel exists. No such
publish path exists -- presence is sealed, and the heartbeat drops the payload
when there is no key rather than sending it in the clear. Replace that with the
verified caveat.

README: drop the model count (it drifts and says little), lead Model
Flexibility with BYOK plus the hosted provider, and mention in Multi-Interface
that the desktop backend runs headless on a server and that the phone channel
is encrypted.
@huichen
huichen enabled auto-merge (squash) September 26, 2026 01:10
@huichen
huichen merged commit ac68db2 into main Sep 26, 2026
12 checks passed
@huichen
huichen deleted the docs/security-e2ee branch September 26, 2026 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant