Skip to content

Commit 5e9ea22

Browse files
committed
BOLT 2, 4: rename blinding to path_key.
Sure, it's used to derive a secret for blinding, but it's also used to derive the key for encrypted_recipient_data. It's not used as a blinding factor *directly*. Signed-off-by: Rusty Russell <[email protected]>
1 parent bc1ce06 commit 5e9ea22

File tree

2 files changed

+56
-54
lines changed

2 files changed

+56
-54
lines changed

02-peer-protocol.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1975,9 +1975,9 @@ is destined, is described in [BOLT #4](04-onion-routing.md).
19751975

19761976
1. `tlv_stream`: `update_add_htlc_tlvs`
19771977
2. types:
1978-
1. type: 0 (`blinding_point`)
1978+
1. type: 0 (`blinded_path`)
19791979
2. data:
1980-
* [`point`:`blinding`]
1980+
* [`point`:`path_key`]
19811981

19821982
#### Requirements
19831983

@@ -2015,7 +2015,7 @@ A sending node:
20152015
- MUST set `id` to 0.
20162016
- MUST increase the value of `id` by 1 for each successive offer.
20172017
- if it is relaying a payment inside a blinded route:
2018-
- MUST set `blinding_point` (see [Route Blinding](04-onion-routing.md#route-blinding))
2018+
- MUST set `path_key` (see [Route Blinding](04-onion-routing.md#route-blinding))
20192019

20202020
`id` MUST NOT be reset to 0 after the update is complete (i.e. after `revoke_and_ack` has
20212021
been received). It MUST continue incrementing instead.
@@ -2040,7 +2040,9 @@ A receiving node:
20402040
- if other `id` violations occur:
20412041
- MAY send a `warning` and close the connection, or send an
20422042
`error` and fail the channel.
2043-
- MUST decrypt `onion_routing_packet` with `associated_data` set to `payment_hash`, and using `blinding` (if present) as described in [Onion Decryption](04-onion-routing.md#onion-decryption) to extract a `payload`.
2043+
- MUST decrypt `onion_routing_packet` as described in [Onion Decryption](04-onion-routing.md#onion-decryption) to extract a `payload`.
2044+
- MUST use `path_key` (if specified).
2045+
- MUST use `payment_hash` as `associated_data`.
20442046
- If decryption fails, the result is not a valid `payload` TLV, or it contains unknown even types:
20452047
- MUST respond with an error as detailed in [Failure Messages](04-onion-routing.md#failure-messages)
20462048
- Otherwise:
@@ -2128,14 +2130,14 @@ A node:
21282130
- MUST NOT send an `update_fulfill_htlc`, `update_fail_htlc`, or
21292131
`update_fail_malformed_htlc`.
21302132
- When failing an incoming HTLC:
2131-
- If `current_blinding_point` is set in the onion payload and it is not the
2133+
- If `current_path_key_point` is set in the onion payload and it is not the
21322134
final node:
21332135
- MUST send an `update_fail_htlc` error using the `invalid_onion_blinding`
21342136
failure code for any local or downstream errors.
21352137
- SHOULD use the `sha256_of_onion` of the onion it received.
21362138
- MAY use an all zero `sha256_of_onion`.
21372139
- SHOULD add a random delay before sending `update_fail_htlc`.
2138-
- If `blinding_point` is set in the incoming `update_add_htlc`:
2140+
- If `path_key_point` is set in the incoming `update_add_htlc`:
21392141
- MUST send an `update_fail_malformed_htlc` error using the
21402142
`invalid_onion_blinding` failure code for any local or downstream errors.
21412143
- SHOULD use the `sha256_of_onion` of the onion it received.

0 commit comments

Comments
 (0)