Get desktop application:
View/edit binary Protocol Buffers messages
Messages required for the initial lock-step handshake between RRD and RID.
(message has no fields)
Handshake messages from RID to RRD.
(message has no fields)
Initial message from RID responding to RRD's authentication challenge and containing RID's authentication challenge, encrypted by RID's encryption scheme with RIDAK. When receiving this message: 1. If the challenge `response` from RID does not match the challenge sent by RRD, close the connection with a protocol error (WS: `4000`) and abort these steps.
16 byte repeated authentication challenge from RRD.
16 byte random authentication challenge for RRD.
32 byte ephemeral public key (`ETK.public`).
Handshake messages from RRD to RID.
(message has no fields)
Final message from RRD responding to RID's authentication challenge, encrypted by RRD's encryption scheme with RRDAK. When receiving this message: 1. If the challenge `response` from RRD does not match the challenge sent by RID, close the connection with a protocol error (WS: `4000`) and abort these steps.
16 byte repeated authentication challenge from RRD.
Initial message from RRD containing its authentication challenge, encrypted by RRD's encryption scheme with RRDAK.
16 byte random authentication challenge for RID.
32 byte ephemeral public key (`ETK.public`).
Nominates the path. The upper-layer protocol defines whether RID or RRD may nominate and is encrypted by the respective encryption scheme with RIDTK or RRDTK. When receiving this message: 1. If the sender was not eligible to `Nominate`, close the connection with a protocol error (WS: `4000`) and abort these steps. 2. Close all other pending or established connection paths (WS: `1000`).¹ ¹: Closing other paths is only triggered by the receiver as it may otherwise lead to a race between nomination and close detection.
(message has no fields)
Contains the data necessary to initialise a 1:1 connection between two devices. When creating this message, run the following sub-steps simultaneously and wait for them to finish: 1. If the device is able to create a TCP server socket: 1. Bind to _any_ IP address with a random port number. Silently ignore failures. 2. If successful, let `addresses` be the list of available IP addresses on network interfaces the server has been bound to. 3. Drop any loopback and duplicate IP addresses from `addresses`. 4. Drop link-local IPv6 addresses associated to interfaces that only provide link-local IPv6 addresses. 5. Sort `addresses` in the following way, highest priority first: 1. IP addresses on unmetered, fast networks 2. IP addresses on unmetered, slow networks 3. IP addresses on metered, fast networks 4. Any other addresses 6. Complete the subroutine and provide `addresses` and other necessary data in the `direct_tcp_server` field. 2. Connect to a WebSocket relay server: 1. Generate a random 32 byte hex-encoded rendezvous path. 2. Connect to the WebSocket relay server URL as provided by the context with the generated hex-encoded rendezvous path. 3. Once connected, complete the subroutine and provide the necessary data in the `relayed_web_socket` field. When receiving this message: 1. If `version` is unsupported, abort these steps. 2. If any `path_id` is not unique, abort these steps. 3. If the device is able to create a TCP client connection: 1. Let `addresses` be the IP addresses of `direct_tcp_server`. 2. Filter `addresses` by discarding IPs with unsupported families (e.g. if the device has no IPv6 address, drop any IPv6 addresses). 3. For each IP address in `addresses`: 1. Connect to the given IP address in the background. 2. Wait 100ms. 4. Connect to the provided relayed WebSocket server in the background. 5. On each successful direct or relayed connection made in the background, forward an event to the upper-layer protocol in order for it to select one of the paths for nomination.
Used in:
32 byte ephemeral secret Authentication Key (AK).
Direct path to a TCP server created by the initiator
Used in:
Random 16 bit port. Values greater than 65535 are invalid.
List of associated IP addresses. Each IP address creates its own path.
An IP address
Used in:
Unique Path ID (PID) of the path
Network cost
IPv4 or IPv6 address
Network cost of an interface
Used in:
,It is unknown whether the interface is metered or unmetered
The interface is unmetered
The interface is metered
Relayed WebSocket path
Used in:
Unique Path ID (PID) of the path
Network cost
Full URL to the WebSocket server with a random 32 byte hex-encoded rendezvous path. Must begin with `wss://``.
Used in:
Initial version.