Package fr.acinq.lightning.crypto.sphinx

Types

DecryptedFailurePacket
Link copied to clipboard
common
data class DecryptedFailurePacket(originNode: PublicKey, failureMessage: FailureMessage)

A properly decrypted failure from a node in the route.

DecryptedPacket
Link copied to clipboard
common
data class DecryptedPacket(payload: ByteVector, nextPacket: OnionRoutingPacket, sharedSecret: ByteVector32)

Decrypting an onion packet yields a payload for the current node and the encrypted packet for the next node.

FailurePacket
Link copied to clipboard
common
object FailurePacket

An onion-encrypted failure packet from an intermediate node: +----------------+----------------------------------+-----------------+----------------------+-----+ | HMAC(32 bytes) | failure message length (2 bytes) | failure message | pad length (2 bytes) | pad | +----------------+----------------------------------+-----------------+----------------------+-----+ with failure message length + pad length = 256

PacketAndSecrets
Link copied to clipboard
common
data class PacketAndSecrets(packet: OnionRoutingPacket, sharedSecrets: SharedSecrets)
SharedSecrets
Link copied to clipboard
common
data class SharedSecrets(perHopSecrets: List<Pair<ByteVector32, PublicKey>>)
Sphinx
Link copied to clipboard
common
object Sphinx

see https://github.com/lightningnetwork/lightning-rfc/blob/master/04-onion-routing.md