Security model: what is encrypted and who sees what
Local-only private keys, ephemeral forward secrecy, TOFU peer pinning, and per-session host isolation.
End-to-end encrypted relay
Every peer pair negotiates ephemeral X25519 keys signed by long-term Ed25519 identities and encrypts frames with duplex AES-256-GCM.
The gateway inspects only the 28-byte routing header (source/destination nodeId and sequence numbers) to forward ciphertext fragments up to 1200 B and never possesses session decryption keys.
Self-certifying nodeId & TOFU pinning
Each nodeId is the first 8 lowercase hex characters (4 bytes) of sha256(ed25519PublicKey). Peers pin each other’s full 32-byte public keys locally in ~/.dsh/zen-remote-state.json (0600).
If a key changes unexpectedly — even on the gateway — peers block the connection as mismatch until trusted locally with dsh-zen-remote peer trust.
Per-session host isolation and private-network gate
Desktop Client and Peer nodes only see Host sessions where “Remote access” is explicitly enabled; unshared sessions are blocked at the Host relay according to the method allowlist.
When LAN direct mode binds 0.0.0.0, a private-network IP gate blocks any public direct request that does not arrive through a trusted reverse proxy with 403 public-direct-forbidden.