Expand description
Implementation of the SPHINX header format
Structsยง
- Header
Prefix ๐ - Sphinx header byte prefix
- Routing
Info - Carries routing information for the mixnet packet.
Enumsยง
- Forwarded
Header - 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ยง
- Sphinx
Header Spec - 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).