Skip to content

Commit c76f7f8

Browse files
committed
Require using deterministic secret derivation
For simplicity's sake, we require using the deterministic derivation scheme whenever creating a `contact_secret`. This removes most edge cases and simplifies cross-compatibility, providing a better UX.
1 parent 2347f2c commit c76f7f8

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

blip-0042.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,12 @@ deal with each of them, along with a recommended UX.
170170

171171
When Alice wants to pay Bob, her wallet should offer an option to add him to
172172
her contacts list (using a checkbox or a dedicated button). If she chooses
173-
that option, she generates a random `contact_secret`. For all future payments
174-
made to Bob where she wants to reveal that she's the payer, Alice will include
175-
this same `contact_secret`. Wallets should always offer the option to pay a
176-
contact privately, in which case the `contact_secret` and payer information
177-
will not be included in the `invoice_request`.
173+
that option, she generates a `contact_secret` (see details about generation
174+
in the [deterministic derivation section](#deterministic-derivation)). For
175+
all future payments made to Bob where she wants to reveal that she's the
176+
payer, Alice will include this `contact_secret`. Wallets should always offer
177+
the option to pay a contact privately, in which case the `contact_secret`
178+
and payer information will not be included in the `invoice_request`.
178179

179180
Once Bob has received a payment that includes a `contact_secret`, his wallet
180181
should display an option to add the payer to its own contacts list (e.g. via
@@ -191,9 +192,9 @@ payments.
191192
However, if Bob adds Alice to his contacts list without using the payment he
192193
received from her, or if he adds her to his contacts list on another wallet
193194
than the one used to receive Alice's payment, Bob will generate a different
194-
random `contact_secret`. For all payments made to Alice where he wants to
195-
reveal that he's the payer, he will use that new `contact_secret`. When Alice
196-
receives those payments, she won't be able to automatically identify that it's
195+
`contact_secret`. For all payments made to Alice where he wants to reveal that
196+
he's the payer, he will use that new `contact_secret`. When Alice receives
197+
those payments, she won't be able to automatically identify that it's
197198
coming from Bob based on the `contact_secret` alone, because it is different
198199
from the one she generated. But if Alice knows that a specific payment came
199200
from Bob (because he verifiably told her so), her wallet should allow her to
@@ -224,8 +225,8 @@ haven't, they have no reason to create a new contact based on this payment.
224225

225226
### Deterministic derivation
226227

227-
When creating a new contact, we recommend using the following deterministic
228-
derivation for the `contact_secret` field:
228+
When creating a new contact, we use the following deterministic derivation
229+
for the `contact_secret` field:
229230

230231
- For a given Bolt 12 offer, we define its `offer_node_id` as:
231232
- If the offer contains `offer_issuer_id`:

0 commit comments

Comments
 (0)