RouteBlinding

Route blinding is a lightweight technique to provide recipient anonymity by blinding an arbitrary amount of hops at the end of an onion path. It can be used for payments or onion messages.

Source:
Sphinx.scala
class Object
trait Matchable
class Any

Type members

Classlikes

case class BlindedNode(blindedPublicKey: PublicKey, encryptedPayload: ByteVector)
Value parameters:
blindedPublicKey

blinded public key, which hides the real public key.

encryptedPayload

encrypted payload that can be decrypted with the receiving node's private key and the blinding ephemeral key.

Source:
Sphinx.scala
case class BlindedRoute(introductionNodeId: PublicKey, blindingKey: PublicKey, blindedNodes: Seq[BlindedNode])
Value parameters:
blindedNodes

blinded nodes (including the introduction node).

blindingKey

blinding tweak that can be used by the introduction node to derive the private key that matches the blinded public key.

introductionNodeId

the first node, not blinded so that the sender can locate it.

Source:
Sphinx.scala
case class IntroductionNode(publicKey: PublicKey, blindedPublicKey: PublicKey, blindingEphemeralKey: PublicKey, encryptedPayload: ByteVector)
Value parameters:
blindedPublicKey

blinded public key, which hides the real public key.

blindingEphemeralKey

blinding tweak that can be used by the receiving node to derive the private key that matches the blinded public key.

encryptedPayload

encrypted payload that can be decrypted with the introduction node's private key and the blinding ephemeral key.

publicKey

introduction node's public key (which cannot be blinded since the sender need to find a route to it).

Source:
Sphinx.scala

Value members

Concrete methods

def create(sessionKey: PrivateKey, publicKeys: Seq[PublicKey], payloads: Seq[ByteVector]): BlindedRoute

Blind the provided route and encrypt intermediate nodes' payloads.

Blind the provided route and encrypt intermediate nodes' payloads.

Value parameters:
payloads

payloads that should be encrypted for each node on the route.

publicKeys

public keys of each node on the route, starting from the introduction point.

sessionKey

this node's session key.

Returns:

a blinded route.

Source:
Sphinx.scala
def decryptPayload(privateKey: PrivateKey, blindingEphemeralKey: PublicKey, encryptedPayload: ByteVector): Try[(ByteVector, PublicKey)]

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

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

Value parameters:
blindingEphemeralKey

unblinding ephemeral key.

encryptedPayload

encrypted payload for this node.

privateKey

this node's private key.

Returns:

a tuple (decrypted payload, unblinding ephemeral key for the next node)

Source:
Sphinx.scala
def derivePrivateKey(privateKey: PrivateKey, blindingEphemeralKey: PublicKey): PrivateKey

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

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

Value parameters:
blindingEphemeralKey

unblinding ephemeral key.

privateKey

this node's private key.

Returns:

this node's blinded private key.

Source:
Sphinx.scala