Expand description
Optional data encryption, negotiated independently on each relay leg. The authenticated setup response selects a format before application I/O.
one shared key K per relay leg
Endpoint ---- nonce = 00000000 | counter:u64be ----> Relay
Endpoint <--- nonce = 00000001 | counter:u64be ----- Relay
4 bytes 8 bytes
Setup: install K and a fixed prefix; no data-key derivation or extra RTT.
Per frame: increment the local counter, then one AES-GCM operation.
Wire: checksum:u32 | length:u32 | ciphertext | tag[16] (unchanged).Counters start at zero independently. Prefixes keep their nonce spaces disjoint under K. The other relay leg has its own fresh key and counters.
Structs§
- Data
Codec - Negotiated key material for exactly one endpoint-to-relay connection. Debug output intentionally never includes the secret.
Constants§
- DATA_
PROTOCOL_ V2 - Version with disjoint directional nonce prefixes and checked 64-bit counters.