]> git.bitcoin.ninja Git - rust-lightning/commit
InvoiceRequest metadata and payer id derivation
authorJeffrey Czyz <jkczyz@gmail.com>
Mon, 30 Jan 2023 20:56:42 +0000 (14:56 -0600)
committerJeffrey Czyz <jkczyz@gmail.com>
Thu, 20 Apr 2023 02:31:06 +0000 (21:31 -0500)
commit3880e69237d7f6a33db1912176de5a745ea99b41
treec077c6e2fc5db5d88258bf850a362767bfd48379
parente15044b8899863654f2659611b8f45703b656b32
InvoiceRequest metadata and payer id derivation

Add support for deriving a transient payer id for each InvoiceRequest
from an ExpandedKey and a nonce. This facilitates payer privacy by not
tying any InvoiceRequest to any other nor to the payer's node id.

Additionally, support stateless Invoice verification by setting payer
metadata using an HMAC over the nonce and the remaining TLV records,
which will be later verified when receiving an Invoice response.
lightning/src/offers/invoice_request.rs
lightning/src/offers/offer.rs
lightning/src/offers/payer.rs
lightning/src/offers/refund.rs
lightning/src/offers/signer.rs