Expand description
Implements the Proof of Relay.
Structsยง
- Proof
OfRelay Output - 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.
- Proof
OfRelay String - 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.
- Proof
OfRelay Values - Type that contains the challenge for the first ticket sent to the first relayer.
- Surb
Receiver Info - Wraps the
ProofOfRelayValueswith some additional information about the sender of the packet, that is supposed to be passed along with the SURB.
Constantsยง
- HASH_
KEY_ ๐ACK_ KEY - HASH_
KEY_ ๐OWN_ KEY
Functionsยง
- derive_
ack_ key_ share - Used in Proof of Relay to derive the half-key of for the acknowledgement (S1)
The function samples a secp256k1 field element using the given
secretviasample_field_element. - derive_
own_ ๐key_ share - Used in Proof of Relay to derive own half-key (S0)
The function samples a secp256k1 field element using the given
secretviasample_field_element. - generate_
proof_ of_ relay - Helper function which generates proof of relay for the given path.
- 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.