@@ -60,6 +60,15 @@ to allow contacts to pay them back:
60
60
- [ ` u8 ` :` domain_len ` ]
61
61
- [ ` domain_len*byte ` :` domain ` ]
62
62
63
+ The ` invreq_payer_bip_353_signature ` field lets payers provide a signature of
64
+ the ` invoice_request ` using one of the signing keys of the offer associated
65
+ with their BIP 353 name, thus proving ownership of this BIP 353 name.
66
+
67
+ 1 . type: 2000001735 (` invreq_payer_bip_353_signature ` )
68
+ 2 . data:
69
+ - [ ` point ` :` offer_signing_key ` ]
70
+ - [ ` bip340sig ` :` signature ` ]
71
+
63
72
#### Requirements
64
73
65
74
The writer of ` invoice_request ` :
@@ -80,6 +89,12 @@ The writer of `invoice_request`:
80
89
- If it includes ` invreq_payer_bip_353_name ` :
81
90
- MUST set ` name ` to the post-₿, pre-@ part of the BIP 353 HRN.
82
91
- MUST set ` domain ` to the post-@ part of the BIP 353 HRN.
92
+ - MUST include ` invreq_payer_bip_353_signature ` using the private key of
93
+ its ` offer_issuer_id ` or, if its offer doesn't include ` offer_issuer_id ` ,
94
+ the private key of the ` blinded_node_id ` of one of its ` offer_paths ` .
95
+ The signed data should be computed as detailed in [ Bolt 12] [ bolt12-sig ] ,
96
+ with "lightning" || "invoice_request" || "invreq_payer_bip_353_signature"
97
+ as signature tag.
83
98
- If it includes ` invreq_payer_offer ` :
84
99
- MUST encode ` payer_offer ` as a TLV stream of its individual records.
85
100
- If the encoded offer is more than 300 bytes long:
@@ -91,6 +106,9 @@ The writer of `invoice_request`:
91
106
92
107
The reader of ` invoice_request ` :
93
108
109
+ - If ` invreq_bip_353_name ` is provided:
110
+ - MUST ignore the ` invoice_request ` if ` invreq_payer_bip_353_signature ` is
111
+ missing or invalid.
94
112
- MUST send back an ` invoice ` including the ` invoice_request ` contact fields
95
113
provided by the sender, as specified in Bolt 12.
96
114
- After the invoice has been paid, if ` invreq_contact_secret ` was included:
@@ -104,6 +122,8 @@ The reader of `invoice_request`:
104
122
- MUST use the received ` payer_offer ` whenever paying that contact.
105
123
- If ` payer_bip_353_name ` was included:
106
124
- SHOULD use it to fetch a ` payer_offer ` if none was included.
125
+ - MUST verify that the received offer matches the ` offer_signing_key `
126
+ provided in ` invreq_payer_bip_353_signature ` .
107
127
- SHOULD use it to refresh the ` payer_offer ` if it expires.
108
128
- MAY use it to refresh the ` payer_offer ` periodically.
109
129
- MAY manually associate the received ` contact_secret ` with an existing
@@ -125,6 +145,11 @@ large, which would constrain the payment paths that can be used by the payer.
125
145
We thus recommend only including offers that are smaller than 300 bytes in
126
146
` invreq_payer_offer ` , or a small BIP 353 HRN.
127
147
148
+ When a BIP 353 HRN is included, the node receiving ` invoice_request ` does not
149
+ know whether it really belongs to the sender. This is why the sender must also
150
+ include a signature that proves that they control one of the private keys of
151
+ the offer stored in the BIP 353 record.
152
+
128
153
When payments are coming from known contacts, there is less risk that the
129
154
` payer_note ` that is optionally included contains spam. It is thus recommended
130
155
to display it, while we generally don't recommend displaying ` payer_note ` s
@@ -259,3 +284,5 @@ section.
259
284
260
285
- lightning-kmp: < https://github.com/ACINQ/lightning-kmp/pull/719 >
261
286
- phoenix wallet: < https://github.com/ACINQ/phoenix/pull/645 >
287
+
288
+ [ bolt12-sig ] : https://github.com/lightning/bolts/blob/master/12-offer-encoding.md#signature-calculation
0 commit comments