Skip to main content

Crate hopr_crypto_packet

Crate hopr_crypto_packet 

Source
Expand description

ยงcore-packet

This crate contains the main packet processing functionality for the HOPR protocol. It implements the following important protocol building blocks:

  • HOPR specific instantiation of the SPHINX packet format
  • Proof of Relay

Finally, it also implements a utility function which is used to validate tickets (module validation).

The currently used implementation is selected using the HoprSphinxSuite type in the packet module.

The implementation can be easily extended for different elliptic curves (or even arithmetic multiplicative groups). In particular, as soon as there is a way to represent Ed448 PeerIDs, it would be straightforward to create e.g. X448Suite.

This crate implements RFC-0003.

Re-exportsยง

pub use sphinx::prelude::ProtocolKeyIdMapper;
pub use sphinx::prelude::ReplyOpener;

Modulesยง

errors
Lists all errors in this crate.
packet ๐Ÿ”’
Implements the overlay packet intermediary object.
por ๐Ÿ”’
Implements the Proof of Relay.
sphinx
This Rust crate contains an implementation of the Sphinx packet format for the HOPR protocol.
types ๐Ÿ”’
Contains various helper types.
validation ๐Ÿ”’
Implements ticket validation logic.

Structsยง

HoprSphinxHeaderSpec
Current Sphinx header specification for the HOPR protocol.

Constantsยง

PAYLOAD_SIZE_INT ๐Ÿ”’
Size of the maximum packet payload.

Type Aliasesยง

HoprKeyIdent
Type alias for 32-bit HOPR Offchain Public Key Identifier.
HoprReplyOpener
Type alias for identifiable ReplyOpener.
HoprSphinxSuite
Currently used public key cipher suite for Sphinx.
HoprSurb
Single Use Reply Block representation for HOPR protocol.