Noise Protocol XX
Relayly runs the Noise Protocol Framework, specifically the XX pattern, directly between two paired devices. The relay server is not a party to this handshake; it forwards the handshake messages the same way it forwards everything else, as an opaque binary envelope it cannot read.
Why Noise Protocol?
The Noise Protocol is used in production by WireGuard, Signal, WhatsApp, and Lightning Network. It provides:
- Formal security proofs: unlike ad-hoc TLS configurations
- Small codebase: trivial to audit
- No certificate authorities: identity is based on static key pairs, not PKI
XX Pattern
The XX pattern provides mutual authentication, so both devices authenticate each other’s static public keys before sending any application data. Relayly’s exact cipher suite is Noise_XX_25519_ChaChaPoly_BLAKE2s:
| Property | Detail |
|---|---|
| Handshake | 3 messages |
| Key Exchange | X25519 (Curve25519 Diffie-Hellman) |
| Cipher | ChaChaPoly (ChaCha20 + Poly1305) |
| Hash | BLAKE2s |
| Authentication | Mutual (both devices) |
| Forward Secrecy | Yes (ephemeral session keys) |
Public Key Locking
Two independent layers guard the pairing:
- Client-side pinning, the real boundary. Each device pins the peer’s static key the first time a handshake with it completes, and hard-fails on any later handshake presenting a different key. This check happens entirely between the two devices.
- Server-side announced-key locking, defense in depth. The server separately records the first static key each device announces to it and rejects a later announcement that differs, even if the relay server itself were compromised.
This is the Trustless Architecture guarantee: your devices verify each other directly, the server is never a party to the cryptographic handshake.