跳至主要內容
高級

Route Blinding 路徑盲化

了解路徑盲化如何隱藏閃電網路支付的接收方身份,保護接收方的節點位置和通道資訊。

15 分鐘

什麼是 Route Blinding?

Route Blinding(路徑盲化,也稱為 Blinded Paths)是一種隱私保護技術, 允許接收方隱藏自己在網路中的位置。發送方可以將支付路由到接收方, 但無法知道接收方的真實節點 ID 或其直接連接的通道。

為什麼重要: 傳統的閃電網路發票會暴露接收方的節點公鑰。這讓任何人都可以追蹤誰在收款, 監控節點活動,甚至進行針對性攻擊。Route Blinding 解決了這個隱私問題。

隱私問題

Traditional Invoice Privacy Leakage:

BOLT 11 invoice contents:
lnbc100u1p...
  amount: 100,000 sats
  destination: 03abc123...def (receiver pubkey)
  expiry: 3600 seconds
  route hints:
    pubkey: 02xyz...
    scid: 123x456x0
    fee: 1 sat
    cltv: 40

Problems:
1. Destination pubkey exposes receiver identity
2. Route hints expose receiver's direct connections
3. Can track specific node's payment activity
4. Can analyze receiver's channel structure

Attack scenarios:
• Competitors monitoring merchant payments
• Tracking user spending habits
• Targeted attacks on high-value nodes

Blinded Path 原理

Blinded Path Structure:

Receiver Bob creates blinded path:

Real path:
  Node E --> Node F --> Node G --> Bob
  (entry)                          (receiver)

After blinding:

Blinded Path:
  introduction_node: E (public entry point)
  blinding_point: B = b*G
  blinded_hops:
    blinded_node_id: E' = HMAC(E, B)
      encrypted_data: [to F, encrypted]
    blinded_node_id: F' = HMAC(F, B')
      encrypted_data: [to G, encrypted]
    blinded_node_id: G' = HMAC(G, B'')
      encrypted_data: [to Bob, encrypted]
    blinded_node_id: Bob' = HMAC(Bob, B''')
      encrypted_data: [final payload]

Sender only knows:
• Entry node E's real ID
• A series of meaningless blinded_node_ids
• Cannot deduce identities of F, G, Bob

密碼學機制

Blinding Cryptography:

1. Receiver chooses random blinding secret: b
   Calculates blinding point: B = b*G

2. For each node N_i, calculate:

   Shared secret:
   ss_i = SHA256(b * N_i)  // ECDH with node pubkey

   Blinded node ID:
   N_i' = N_i + SHA256("blinded_node_id", ss_i)*G

   Encryption key:
   key_i = SHA256("encrypted_data", ss_i)

   Next hop blinding point:
   B_{i+1} = SHA256("blinding", ss_i) * B

3. When each node receives payment:
   • Use own private key and B to calculate ss
   • Decrypt encrypted_data
   • Calculate next hop's B'
   • Forward to next blinded_node_id

Key points:
• Each node can only decrypt its own data
• Cannot deduce other nodes' identities
• Sender knows nothing about path details

支付流程

Payment Using Blinded Path:

1. Bob creates Offer/Invoice with blinded path
   Offer:
     amount: 100,000 sats
     paths:
       - introduction_node: 02abc...
         blinding_point: 03xyz...
         blinded_hops: [...]

2. Alice calculates route
   Alice -> ... -> entry node E -> [blinded path] -> Bob

   Alice builds onion:
   • Normal hops: path from Alice to E
   • Blinded hops: use blinded_hops directly

3. E receives payment
   • Recognizes this is blinded path
   • Decrypts using blinding_point
   • Finds next hop is F (from encrypted_data)
   • Calculates new blinding_point
   • Forwards

4. F, G process similarly

5. Bob receives payment
   • Decrypts final payload
   • Verifies and accepts payment

BOLT 12 整合

Route Blinding 是 BOLT 12 Offers 的核心組件:

BOLT 11(傳統)

  • • 公開接收方節點 ID
  • • 路由提示暴露通道
  • • 單次使用發票
  • • 接收方必須在線生成

BOLT 12 + Blinding

  • • 隱藏接收方身份
  • • 通道資訊加密
  • • 可重複使用 Offers
  • • 支援回覆路徑

Reply Path(回覆路徑)

Reply Path Use Cases:

BOLT 12 Offers flow:
1. Bob publishes Offer (with blinded reply path)
2. Alice requests invoice using Onion Message
3. Bob returns invoice through reply path
4. Alice pays invoice

Reply Path structure:

alice_offer_request:
  offer_id: ...
  amount: 100000
  reply_path:
    introduction_node: node near Alice
    blinding_point: ...
    blinded_hops: [... -> Alice]

Benefits:
• Alice can protect her privacy when sending requests
• Bob can reply without knowing who Alice is
• Bidirectional privacy protection

安全考量

入口節點洩露

入口節點的身份是公開的。攻擊者可能推斷接收方與入口節點有關係。 解決方案:使用多個不同的入口節點。

路徑長度分析

Blinded path 的跳數可能洩露資訊。解決方案:添加虛擬跳來混淆路徑長度。

時序攻擊

如果攻擊者控制入口節點,可能通過時序分析推斷接收方。 解決方案:使用不可信的中間節點。

Onion Messages

Route Blinding 依賴 Onion Messages(BOLT 提案)來傳遞無支付的訊息:

Onion Messages vs HTLC:

HTLC (traditional):
• Used for payments
• Requires locking funds
• Has time limits
• Requires channel

Onion Messages:
• Used for communication
• No funds locked
• No time limits
• No direct channel needed

Use cases:
• BOLT 12 invoice requests
• BOLT 12 invoice replies
• Future: payment proofs, chat, etc.

Message type: 513 (onion_message)
Feature bits: 38/39 (option_onion_messages)

實現狀態

Core Lightning 已支援

CLN 完整支援 Route Blinding 和 BOLT 12,是該功能的主要推動者。

LDK 已支援

Lightning Dev Kit 支援 Route Blinding 和 Onion Messages。

LND 開發中

LND 正在開發 BOLT 12 和 Route Blinding 支援。

Eclair 已支援

Eclair 支援 Route Blinding,用於 Phoenix 錢包的隱私功能。

相關資源

下一步: 了解 Eltoo 如何改進通道狀態更新機制。

已複製連結
已複製到剪貼簿