Skip to main content

Module routing

Module routing 

Source
Expand description

Implementation of the SPHINX header format

Structsยง

HeaderPrefix ๐Ÿ”’
Sphinx header byte prefix
RoutingInfo
Carries routing information for the mixnet packet.

Enumsยง

ForwardedHeader
Enum carry information about the packet based on whether it is destined for the current node (FinalNode) or if the packet is supposed to be only relayed (RelayNode).

Constantsยง

HASH_KEY_PRG ๐Ÿ”’
HASH_KEY_TAG ๐Ÿ”’
SPHINX_HEADER_VERSION ๐Ÿ”’
Current version of the header

Traitsยง

SphinxHeaderSpec
Contains the necessary size and type specifications for the Sphinx packet header.

Functionsยง

forward_header
Applies the forward transformation to the header. If the packet is destined for this node, it returns the additional data for the final destination (ForwardedHeader::Final). Otherwise, it returns the transformed header, the next authentication tag, the public key of the next node, and the additional data for the relayer (ForwardedHeader::Relayed).