Commit Graph
5 Commits
Author SHA1 Message Date
rustdeskandClaude Opus 5.5 527cde8324 Treat a datagram too short for a hello as none
The server charges its hello budget for every hello, so a 5-byte header
spent it as well as a real one. A hello is at least an unsigned one with
no payload, 54 bytes; anything shorter is now neither counted nor opened.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PkpVy2ufxgEjKd3SjXPnJ8
2026-12-02 18:28:41 +08:00
rustdeskandClaude Opus 5.5 5c7efa7f59 Widen the udp_seal replay window to 1024 numbers
Pushes take their packet numbers from one counter for the whole server,
so on a server with a hundred thousand devices the 64 numbers below the
highest seen cover about ten milliseconds, and a push the network
delays by more is dropped as a replay. A 1024-bit ring covers about
150 ms at that rate, for 120 more bytes per window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PkpVy2ufxgEjKd3SjXPnJ8
2026-12-02 18:28:41 +08:00
rustdeskandClaude Opus 5.5 9778c6e60a Keep the client session while a signed hello replaces it
A client that re-signs its session dropped it first, so until the new
welcome came back pushes under the old key could not open and a
plaintext push was taken even from a server that seals every push.
ClientSeal::hello builds a hello without touching the session; the
welcome replaces it as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PkpVy2ufxgEjKd3SjXPnJ8
2026-12-02 18:28:41 +08:00
rustdeskandClaude Opus 5.5 633476cd1f Let a client seal switch device keys without losing its session
A device whose key pair changes at runtime re-registers its new public key;
its later hellos must be signed by the new secret key, or the server can
never tie a seal to the device again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PkpVy2ufxgEjKd3SjXPnJ8
2026-12-02 18:28:40 +08:00
rustdeskandClaude Opus 5.5 1a276514fa Add udp_seal: sealed datagrams between a client and its rendezvous server
One sealed datagram per message and no handshake: an RFC 9180 HPKE single
shot to the server's signing key converted to X25519, signed by the device
key the server has on record, answered by a welcome sealed under an exported
key and a fresh nonce (RFC 9458) that hands over a session key the server
re-derives from a process secret and the key id. Data carries the key id
and a packet number under per-direction subkeys, with a replay window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PkpVy2ufxgEjKd3SjXPnJ8
2026-12-02 18:28:40 +08:00