Device keys
ECDH P-256. On the Mac the private key stays in the system vault; in the browser it is a non-exportable key.
Encryption
AES-256-GCM with a random 96-bit nonce. Each message is bound to its pairing, sender and key.
Key exchange
Data keys are wrapped with HKDF-SHA-256 in an authenticated scheme (HPKE Auth style): only the paired device can open them.
Pairing by QR code
The QR carries a one-time 32-byte secret that never reaches a server. It is valid for 10 minutes.
Pairing by code
In the browser you type a 20-character code (100 random bits). The server keeps only a SHA-256 of it.
No replays
When a side restarts, a new data key starts a higher epoch. Old epochs and repeated messages are dropped.
A blind relay
It sees public keys, sizes and timing, never content. Offline messages wait encrypted for up to 24 hours. Logs never hold messages or tokens.
Revocation
Remove a device on the Mac and its pairing is revoked: new access is refused at once, and an open connection ends within 15 minutes.