X25519 · CPace · ChaCha20-Poly1305 · Zero Accounts
PCUnit Security Architecture
Our exact cryptographic primitives, relay threat model, and what stays strictly on your devices — documented plainly.
1. End-to-End Cryptography (libsodium)
- Authenticated pairing: Uses password-authenticated key exchange (CPace over ristretto255) and X25519. Your 6-digit PIN is never broadcast or transmitted in plaintext.
- Authenticated encryption (AEAD): Every wire channel — input (UDP 24852), clipboard (TCP 24853), file transfer (TCP 24854), display (TCP 24858), and audio — is sealed with ChaCha20-Poly1305 IETF (12-byte nonce + 16-byte tag).
- Per-channel domain subkeys (BLAKE2b): Each paired relationship derives isolated domain subkeys per feature channel. Any tampered or unauthenticated frame is dropped immediately.
- Identity-change warnings: If a known computer reappears with a different long-term cryptographic key, PCUnit blocks reconnection and presents a Cancel-default warning dialog.
2. Credential Storage & Explicit Consent
- Keychain / Credential Manager: Long-term pairing secrets are stored in macOS Keychain, Windows Credential Manager, iOS Keychain, and Android Keystore.
- Screen sharing OFF by default: Pairing never implicitly grants phone screen control. You opt in per device, and an always-visible Stop control sits in the menu bar / tray whenever remote control is active.
- No transitive clipboard/file relay: Pairing is strictly pairwise; clipboard payloads received from peer A are never re-broadcast to peer B.
3. Relay Transparency & Self-Hosting
When two machines are on different networks without Tailscale, PCUnit can bridge them via server.pcunit.net. Here is our exact trust boundary:
- What the relay CANNOT see: Keystrokes, screen frames, audio, clipboard payloads, filenames, device names, or pairing keys — all double-wrapped in DTLS + PCUnit AEAD.
- What the relay CAN see (connection metadata): Public IP addresses, connection timestamps, opaque 32-byte derived rendezvous identifiers, and TURN bandwidth volume.
- Disable or Self-Host Free: You can disable the relay completely (enabled=false under [relay]) or self-host your own PCUnitRelay (stateless Go binary + Caddy + coturn) in one Docker command.
# Self-host PCUnitRelay on your own Ubuntu VPS / internal server
./deploy/deploy-remote.sh root@your-vps --domain relay.yourdomain.com --email [email protected] --yes4. Vulnerability Disclosure
If you discover a security vulnerability in PCUnit, please report it responsibly to [email protected].