RouteBlinding

object RouteBlinding

Types

BlindedNode
Link copied to clipboard
common
data class BlindedNode(blindedPublicKey: PublicKey, encryptedPayload: ByteVector)
BlindedRoute
Link copied to clipboard
common
data class BlindedRoute(introductionNodeId: PublicKey, blindingKey: PublicKey, blindedNodes: List<RouteBlinding.BlindedNode>)
IntroductionNode
Link copied to clipboard
common
data class IntroductionNode(publicKey: PublicKey, blindedPublicKey: PublicKey, blindingEphemeralKey: PublicKey, encryptedPayload: ByteVector)

Functions

create
Link copied to clipboard
common
fun create(sessionKey: PrivateKey, publicKeys: List<PublicKey>, payloads: List<ByteVector>): RouteBlinding.BlindedRoute

Blind the provided route and encrypt intermediate nodes' payloads.

decryptPayload
Link copied to clipboard
common
fun decryptPayload(privateKey: PrivateKey, blindingEphemeralKey: PublicKey, encryptedPayload: ByteVector): Pair<ByteVector, PublicKey>

Decrypt the encrypted payload (usually found in the onion) that contains instructions to locate the next node.

derivePrivateKey
Link copied to clipboard
common
fun derivePrivateKey(privateKey: PrivateKey, blindingEphemeralKey: PublicKey): PrivateKey

Compute the blinded private key that must be used to decrypt an incoming blinded onion.