FailurePacket
- Source:
- Sphinx.scala
Value members
Concrete methods
Create a failure packet that will be returned to the sender. Each intermediate hop will add a layer of encryption and forward to the previous hop. Note that malicious intermediate hops may drop the packet or alter it (which breaks the mac).
Create a failure packet that will be returned to the sender. Each intermediate hop will add a layer of encryption and forward to the previous hop. Note that malicious intermediate hops may drop the packet or alter it (which breaks the mac).
- Value parameters:
- failure
failure message.
- sharedSecret
destination node's shared secret that was computed when the original onion for the HTLC was created or forwarded: see OnionPacket.create() and OnionPacket.wrap().
- Returns:
a failure packet that can be sent to the destination node.
- Source:
- Sphinx.scala
Decrypt a failure packet. Node shared secrets are applied until the packet's MAC becomes valid, which means that it was sent by the corresponding node. Note that malicious nodes in the route may have altered the packet, triggering a decryption failure.
Decrypt a failure packet. Node shared secrets are applied until the packet's MAC becomes valid, which means that it was sent by the corresponding node. Note that malicious nodes in the route may have altered the packet, triggering a decryption failure.
- Value parameters:
- packet
failure packet.
- sharedSecrets
nodes shared secrets.
- Returns:
Success(secret, failure message) if the origin of the packet could be identified and the packet decrypted, Failure otherwise.
- Source:
- Sphinx.scala
Wrap the given packet in an additional layer of onion encryption for the previous hop.
Wrap the given packet in an additional layer of onion encryption for the previous hop.
- Value parameters:
- packet
failure packet.
- sharedSecret
destination node's shared secret.
- Returns:
an encrypted failure packet that can be sent to the destination node.
- Source:
- Sphinx.scala