hopr_crypto_packet

Module por

Source
Expand description

Implements the Proof of Relay.

Structs§

ProofOfRelayOutput
Derivable challenge which contains the key share of the relayer as well as the secret that was used to create it and the challenge for the next relayer.
ProofOfRelayString
Contains the Proof of Relay challenge for the next downstream node as well as the hint that is used to verify the challenge that is given to the relayer.
ProofOfRelayValues
Type that contains the challenge for the first ticket sent to the first relayer.

Constants§

POR_SECRET_LENGTH
Proof of Relay secret length is twice the size of secp256k1 public key

Functions§

pre_verify
Verifies that an incoming packet contains all values that are necessary to reconstruct the response to redeem the incentive for relaying the packet.
validate_por_half_keys
Checks if the given acknowledgement solves the given challenge.
validate_por_hint
Checks if the given acknowledgement solves the given challenge.
validate_por_response
Checks if the given response solves the given challenge.