hopr_crypto_sphinx

Module routing

Source
Expand description

Implementation of the SPHINX header format

Structs§

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).

Functions§

forward_header
Applies the forward transformation to the header. If the packet is destined for this node, returns the additional data for the final destination (FinalNode), otherwise it returns the transformed header, the next authentication tag, the public key of the next node, and the additional data for the relayer (RelayNode).
header_length
Returns the size of the packet header given the information about the number of hops and additional relayer info.