Expand description
Nested encryption for the restreamer (A2 / A3).
Three layers, outside-in:
- WireGuard (transport; see
wgmodule) - Outer AEAD on C2’s key — stripped by C2, reveals the opaque envelope
- Inner Noise_NK session node↔HQ on the relayed recipient key — stripped only by core
Handshake and transport are separate steps (multiplex DATA frames in production). C2 never holds the HQ recipient private key.
Structs§
- HqRecipient
Secret - HQ-side private material (core only). Never constructed on C2.
- Nested
Seal - Result of a nested seal for tests / one-shot helpers.
- Noise
Initiator - Node-side Noise initiator (knows HQ static public key).
- Noise
Responder - HQ-side Noise responder (holds recipient private key).
- Noise
Transport - Post-handshake Noise transport.
- Public
KeyBytes - 32-byte public key as handed to a node (upstream keys from C2).
- Restreamer
Keys - Key material C2 holds and relays.
Enums§
Constants§
- NOISE_
PATTERN - Noise pattern: node (initiator) knows HQ’s static public key (relayed by C2).
Functions§
- c2_
cannot_ complete_ as_ hq - C2 cannot complete a Noise_NK responder handshake as HQ: wrong static key.
- c2_
cannot_ open_ inner - Legacy name kept for call sites: C2 cannot decrypt inner transport ciphertext without the HQ Noise session (attempt with a fresh wrong-key responder fails).
- c2_
strip_ outer - C2 strips the outer layer; returns opaque inner bytes (Noise ciphertext or handshake).
- core_
open_ inner - Decrypt with an established HQ transport (production path after handshake).
- node_
seal_ outer - Node seals already-inner bytes (handshake or transport, tagged) for C2’s outer layer.
- noise_
session_ seal - Run Noise_NK handshake, encrypt
plaintext, wrap with C2 outer layer.