Skip to main content

Module nym

Module nym 

Source
Expand description

Nym mixnet transition bearer framing and deterministic loopback carrier.

Encapsulates QFrames into Sphinx-compatible datagram envelopes. Bounded, zero-heap in hot path. Labelled transition carrier (not Native Independent). Authoritative QdnfError variants mapped (Closed, NoRoute, WouldBlock, Capacity).

Structs§

NymSimulatedBearer
Deterministic, zero-heap in-memory simulated Nym mixnet bearer. Used for pure integration testing of the QSession handshake over Nym.

Constants§

NYM_ENVELOPE_VERSION
Current envelope protocol version.
NYM_HEADER_LEN
Header length: magic(4) + version(1) + payload_len(2) + sender_len(1) + sender(32) = 40 bytes.
NYM_MAGIC
4-byte magic for Nym mixnet envelopes.
NYM_SPHINX_MTU
Sphinx maximum payload size for standard Nym packets (1,024 bytes).

Functions§

decapsulate_nym
Decapsulate a Nym Sphinx payload envelope into a QFrame and sender locator.
encapsulate_nym
Encapsulate a QFrame into a Nym Sphinx payload envelope.