Skip to content
LearnBitcoin

ResearchBitcoin Dev Archive lightning-dev list

Privacy issues with proof of payment

5 messages, Feb 21 to 24, 2018. Started by Corné Plooy.

Corné Plooy (2), ZmnSCPxj, Rusty Russell, Olaoluwa Osuntokun

Permalink First message in the Wayback Machine

Corné Plooy permalink original

Hi,

I am a bit concerned with the privacy implications of having either a signed invoice + pre-image, or possibly a more powerful proof-of-payment mechanism. In particular, I am concerned that it might provide cryptographic evidence to the buyer that a certain seller performed the transaction, and/or evidence to the seller that a certain buyer performed the transaction.

In many cases, providing this evidence would be a feature rather than a bug, allowing third-party dispute settlement (e.g. the legal system). However, in my opinion, the Lightning network should also (or especially) be suitable for more "sensitive" transactions. Even when transactions are not illegal, I believe people still have a need to keep some transaction information private. You don't want it to be possible that your transaction history is stored on some company/person's server for years, and then leaks out when that server gets hacked. Also, in my opinion, we should *not* create a two-tier system of "sensitive" and "nothing-to-hide" transactions: that would make the "sensitive" transactions automatically suspicious, partially negating the whole objective of being able to do sensitive transactions without experiencing negative consequences.

To some degree, node IDs can act as pseudonyms, without evidence that ties them to physical identities. However, I consider them to be relatively poor pseudonyms: unlike, for instance, Bitcoin addresses, creating a new node for every new transaction would have a serious scalability impact, and defeat the whole purpose of Lightning. I think a typical person would frequently perform transactions that are inherently tied to their physical identity, e.g. receiving salary. This could give the counterparty (the employer) a link between physical ID and node ID; it might be forced to share this e.g. with authorities, further increasing the odds of leak-out and/or abuse of data.

Maybe the solution is to have multiple nodes: one tied to your physical ID, and one or more virtual identities? You could then transfer funds between these nodes, and make sure no outsiders receive any proof-of-payment info about these transfers. It sounds like an expensive solution though, since you'd have to operate more channels to give each node good connectivity.

What are your ideas on this? Should proof of payment be optional? Should its strength (optionally) be reduced, so that it can only be used in front of some previously-agreed-on dispute resolution party (is that even possible)? Should the idea of proof of payment be abandoned altogether? Is bi-directional routing(*) useful in this?

CJP

(*) Payee first finds a route from a rendezvous node to himself, onion-encrypts that route, passes it to payer (together with rendezvous node ID), and payer adds to that route the onion route from payer to rendezvous point. This way, payer knows the rendezvous node ID, but not the payee node ID. Payee knows the rendezvous node ID, but doesn't know payer node ID either. Rendezvous node only knows that it's forwarding a transaction, not from-where-to-where, or the purpose of the transaction.

ZmnSCPxj in reply to Corné Plooy permalink original

Good morning Corne,

My understanding, it would be possible to remove proof-of-payment selectively by hiding the payment in fees.

Basically, to anonymously donate money to a node without leaving proof of who you are, you simply route from yourself to the payee node, then back to yourself. You pay yourself the minimum HTLC forwarding amount, and leave a hefty fee to the payee node.

The payee cannot prove that you paid to it; as far as it is concerned it was just a payment forwarding.

The payer cannot prove that it paid the payee, since anyone on the route other than the payee could have been the source of the payment. This assumes that the payer does not control the entire route, at least.

Regards, ZmnSCPxj

Rusty Russell in reply to Corné Plooy permalink original

Hi Corné!

        Indeed, the privacy focus has generally been the payer, rather
than the recipient of funds.
        So there are several things we can do to address this, the main
obvious one the ability to provide a "pre-cooked" onion.  This would
allow either a payment to an anonymous destination directly or via a
middleman who has that pre-cooked onion.
        I'm pretty sure we can't do this *now*: the shared secrets
required for decoding error replies allow you to to decrypt the entire
onion, AFAICT.  At a minimum, we need errors from the final destination
so we can reflect them.  I believe a simple tweak to use the SHA256() of
the secrets for shared secret used to encrypt the error replies would
allow this: you would provide those error secrets along with the onion.
Quoted text (5 lines)
> What are your ideas on this? Should proof of payment be optional? Should
> its strength (optionally) be reduced, so that it can only be used in
> front of some previously-agreed-on dispute resolution party (is that
> even possible)? Should the idea of proof of payment be abandoned
> altogether? Is bi-directional routing(*) useful in this?

The proof-of-payment here is a red herring, I think. If we remove the destination awareness, the privacy issues seem greatly reduced.

Cheers, Rusty.

Corné Plooy in reply to Rusty Russell permalink original

Hi Rusty,

Quoted text (3 lines)
> The proof-of-payment here is a red herring, I think.  If we remove the
> destination awareness, the privacy issues seem greatly reduced.
>

Red herring = "something that misleads or distracts from a relevant or important issue"[1]? Do you mean the proof-of-payment is irrelevant for the privacy issue?

Trying to define proof-of-payment, in the typical use case of payment in
exchange of goods, I'd say that a proof of payment is a piece of data,
known to the payee, that allows the payee to prove that
    "[<amount> was paid to <payee>, and in exchange] <payee> agreed to
transfer ownership of <goods> to <payer>".
For services, it would be
    "[<amount> was paid to <payee>, and in exchange] <payee> agreed to
provide <services> to <payer>".

Requirements: 1. Proof-of-payment must be available to payer, who has the burden of proof. By default, ownership of goods is not transferred, and there is no obligation to provide services. Absence of proof should point to this default. It is in the interest of payer to deviate from this default; if he is capable of providing proof, he probably will. 2. The first part, "<amount> was paid to <payee>, and in exchange" is optional: what I think really matters is the second part. Only in the case that <payee> turns out to be incapable of delivering goods or services, a dispute resolution party might be interested in the first part, to find out what amount of monetary refund would be reasonable. 3. It is necessary that proof-of-payment proves agreement of <payee>: otherwise, Eve could write "Alice agreed to transfer ownership of <goods> to Eve" without consent of Alice. 4. It may not be necessary that proof-of-payment itself mentions identity of <payee>, but it is necessary that <payee> becomes known to the payer: "somebody agreed to transfer ownership of <goods> to <payer>" does not indicate an obligation of any specific party. Without knowing <payee>, it is impossible to verify 3. 5. It is necessary that proof-of-payment mentions the specific obligation (e.g. delivery of goods/services); otherwise, it doesn't prove anything useful. 6. It is necessary that proof-of-payment mentions <payer>: otherwise, multiple potential payer parties could claim goods/services using copies of a single proof-of-payment. Now that I think of it, it is way more tricky than this, and I'm not sure that any mention of <payer> solves anything. What you'd really want is that a single payment only results in a single obligation of <payee>. However, IDs tend to be copyable, just like proofs-of-payment. The best you can hope for is difficult-to-copy IDs (like government-issued IDs) or very inconvenient-to-copy (e.g. private keys of nodes that have significant funds). How do you distinguish multiple identical transactions to the same payer from the same payer making multiple false claims with the same proof-of-payment? Include the payment hash to make it unique? I'm not sure we're solving anything here.

The current invoice protocol[2] meets 1,2(optional part is included),3(*),4(*),5(**), and can possibly meet 6(**), although there is currently no defined protocol for payee to learn payer's identity.

There *are* some privacy issues with this kind of proof-of-payment: 3. requires payer to learn <payee>, and requires payee to provide cryptographic proof of his consent to the transaction. 6. requires payee to learn <payer>. Because of its questionable usefulness, I guess it's good there is no protocol defined for this. However, 6. remains an open issue that does limit usefulness of proofs-of-payment. Interestingly, while this knowledge provides *evidence* for payer's involvement in the transaction, there is no cryptographic *proof* of payer's involvement.

CJP

(*) the 'n' field is not required, but for routing and for verifying the signature, payer currently still needs to know payee's node ID. (**) optional: the 'd' and 'h' fields are free-format, and allow for this.

[1] https://en.wikipedia.org/wiki/Red_herring [2] https://github.com/lightningnetwork/lightning-rfc/blob/master/11-payment-encoding.md

Olaoluwa Osuntokun in reply to Corné Plooy permalink original
Quoted text (3 lines)
> I am a bit concerned with the privacy implications of having either a
signed
> invoice

<snip>

Quoted text (3 lines)
> In particular, I am concerned that it might provide cryptographic evidence
> to the buyer that a certain seller performed the transaction, and/or
> evidence to the seller that a certain buyer performed the transaction.

It's 100% opt-in. If either party doesn't wish to allow any sort of proof-of-payment, or service, or whatever, then they don't need to. In this case the sender would just obtain the payment parameters (skipping BOLT11 or w/e other follow ups in the feature), and make a "raw" payment. Without interaction from the sender, there are various classes of spontaneous payments available as well.

Quoted text (1 line)
>From the PoV of the network (or participants in the payment path), it's

indistinguishable. Only the end points need to decide if their use case is one that both opt into for a proof of payment scheme.

-- Laolu

On Fri, Feb 23, 2018 at 4:08 AM Corné Plooy via Lightning-dev < lightning-dev at lists.linuxfoundation.org> wrote:

Quoted text (84 lines)
> Hi Rusty,
> > The proof-of-payment here is a red herring, I think.  If we remove the
> > destination awareness, the privacy issues seem greatly reduced.
> >
> Red herring = "something that misleads or distracts from a relevant or
> important issue"[1]? Do you mean the proof-of-payment is irrelevant for
> the privacy issue?
>
> Trying to define proof-of-payment, in the typical use case of payment in
> exchange of goods, I'd say that a proof of payment is a piece of data,
> known to the payee, that allows the payee to prove that
>     "[<amount> was paid to <payee>, and in exchange] <payee> agreed to
> transfer ownership of <goods> to <payer>".
> For services, it would be
>     "[<amount> was paid to <payee>, and in exchange] <payee> agreed to
> provide <services> to <payer>".
>
> Requirements:
> 1. Proof-of-payment must be available to payer, who has the burden of
> proof. By default, ownership of goods is not transferred, and there is
> no obligation to provide services. Absence of proof should point to this
> default. It is in the interest of payer to deviate from this default; if
> he is capable of providing proof, he probably will.
> 2. The first part, "<amount> was paid to <payee>, and in exchange" is
> optional: what I think really matters is the second part. Only in the
> case that <payee> turns out to be incapable of delivering goods or
> services, a dispute resolution party might be interested in the first
> part, to find out what amount of monetary refund would be reasonable.
> 3. It is necessary that proof-of-payment proves agreement of <payee>:
> otherwise, Eve could write "Alice agreed to transfer ownership of
> <goods> to Eve" without consent of Alice.
> 4. It may not be necessary that proof-of-payment itself mentions
> identity of <payee>, but it is necessary that <payee> becomes known to
> the payer: "somebody agreed to transfer ownership of <goods> to <payer>"
> does not indicate an obligation of any specific party. Without knowing
> <payee>, it is impossible to verify 3.
> 5. It is necessary that proof-of-payment mentions the specific
> obligation (e.g. delivery of goods/services); otherwise, it doesn't
> prove anything useful.
> 6. It is necessary that proof-of-payment mentions <payer>: otherwise,
> multiple potential payer parties could claim goods/services using copies
> of a single proof-of-payment. Now that I think of it, it is way more
> tricky than this, and I'm not sure that any mention of <payer> solves
> anything. What you'd really want is that a single payment only results
> in a single obligation of <payee>. However, IDs tend to be copyable,
> just like proofs-of-payment. The best you can hope for is
> difficult-to-copy IDs (like government-issued IDs) or very
> inconvenient-to-copy (e.g. private keys of nodes that have significant
> funds). How do you distinguish multiple identical transactions to the
> same payer from the same payer making multiple false claims with the
> same proof-of-payment? Include the payment hash to make it unique? I'm
> not sure we're solving anything here.
>
> The current invoice protocol[2] meets 1,2(optional part is
> included),3(*),4(*),5(**), and can possibly meet 6(**), although there
> is currently no defined protocol for payee to learn payer's identity.
>
> There *are* some privacy issues with this kind of proof-of-payment:
> 3. requires payer to learn <payee>, and requires payee to provide
> cryptographic proof of his consent to the transaction.
> 6. requires payee to learn <payer>. Because of its questionable
> usefulness, I guess it's good there is no protocol defined for this.
> However, 6. remains an open issue that does limit usefulness of
> proofs-of-payment. Interestingly, while this knowledge provides
> *evidence* for payer's involvement in the transaction, there is no
> cryptographic *proof* of payer's involvement.
>
> CJP
>
> (*) the 'n' field is not required, but for routing and for verifying the
> signature, payer currently still needs to know payee's node ID.
> (**) optional: the 'd' and 'h' fields are free-format, and allow for this.
>
> [1] https://en.wikipedia.org/wiki/Red_herring
> [2]
>
> https://github.com/lightningnetwork/lightning-rfc/blob/master/11-payment-encoding.md
>
>
> _______________________________________________
> Lightning-dev mailing list
> Lightning-dev at lists.linuxfoundation.org
> https://www.learnbitcoin.com/archive/lists/lightning-dev
>