Traversal

How the encryption works

For people who want the details. Last updated [DATE].

Traversal and Traversal Host connect your own devices directly. Everything they send each other (the picture, sound, pointer, keys and clipboard) is encrypted with keys that only those two devices have. There is no account and no server of ours in between.

Finding your Mac

On your local network, Traversal finds Macs running Traversal Host with Bonjour, using the service type _lightpath._tcp. The Bonjour record carries the Mac's name, a short fingerprint of its public key, the protocol version and a short token made by hashing the Mac's hardware ID (never the ID itself). None of these are secret keys. You can also connect by address, for example over Tailscale.

Keys

Pairing and connecting

Every connection starts with a handshake over TCP:

  1. The device sends a fresh one-time Curve25519 key, a random value, its long-term public key and its name.
  2. The Mac answers with the same from its side, and says whether it needs a PIN.
  3. Both sides combine four Curve25519 key agreements (one-time with one-time, one-time with long-term, long-term with one-time, and long-term with long-term). The first time a device pairs, the 6-digit PIN shown on the Mac is mixed in too.
  4. From that, HKDF with SHA-256 makes four separate 256-bit keys, one for each direction of the control channel and of the media stream. A SHA-256 hash of the whole handshake is used as the salt, so any change to the handshake gives different keys.
  5. Each side then proves it has the same keys by sending an encrypted confirmation. A wrong PIN fails here.

After pairing, the Mac remembers the device's public key and the device remembers the Mac's. Later connections skip the PIN. If a Mac ever presents a different key, the device refuses to connect and asks you to forget the Mac and pair again, so another computer can't pretend to be yours.

A new device can only pair from the same local network as the Mac or from a Tailscale address. From anywhere else, only devices that are already paired can connect.

Only one PIN guess is checked per connection attempt. After too many wrong guesses the Mac refuses attempts for a while and makes a new PIN.

The stream

What this does not cover

Found a security problem? Please email hushuhashaeboss@gmail.com with "Security" in the subject.