Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Z4wU3-0001VZ-TA for bitcoin-development@lists.sourceforge.net; Tue, 16 Jun 2015 19:25:19 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of gmail.com designates 209.85.213.46 as permitted sender) client-ip=209.85.213.46; envelope-from=pieter.wuille@gmail.com; helo=mail-yh0-f46.google.com; Received: from mail-yh0-f46.google.com ([209.85.213.46]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1Z4wU1-0007Sq-Tm for bitcoin-development@lists.sourceforge.net; Tue, 16 Jun 2015 19:25:19 +0000 Received: by yhan67 with SMTP id n67so18468602yha.3 for ; Tue, 16 Jun 2015 12:25:12 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.13.217.147 with SMTP id b141mr2309296ywe.173.1434482712457; Tue, 16 Jun 2015 12:25:12 -0700 (PDT) Received: by 10.37.93.67 with HTTP; Tue, 16 Jun 2015 12:25:12 -0700 (PDT) Received: by 10.37.93.67 with HTTP; Tue, 16 Jun 2015 12:25:12 -0700 (PDT) In-Reply-To: References: Date: Tue, 16 Jun 2015 21:25:12 +0200 Message-ID: From: Pieter Wuille To: Kalle Rosenbaum Content-Type: multipart/alternative; boundary=001a114fd9aa8339c10518a78842 X-Spam-Score: -0.6 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (pieter.wuille[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 1.0 HTML_MESSAGE BODY: HTML included in message -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Headers-End: 1Z4wU1-0007Sq-Tm Cc: Bitcoin Dev Subject: Re: [Bitcoin-development] BIP for Proof of Payment X-BeenThere: bitcoin-development@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jun 2015 19:25:20 -0000 --001a114fd9aa8339c10518a78842 Content-Type: text/plain; charset=UTF-8 You can't avoid sharing the token, and you can't avoid sharing the private keys used for signing either. If they are single use, you don't lose anything by sharing them. Also you are not creating a real transaction. Why does the OP_RETURN limitation matter? On Jun 16, 2015 9:22 PM, "Kalle Rosenbaum" wrote: > Thank you for your comments Pieter! Please find my answers below. > > 2015-06-16 16:31 GMT+02:00 Pieter Wuille : > > On Mon, Jun 15, 2015 at 1:59 PM, Kalle Rosenbaum > wrote: > >> > >> 2015-06-15 12:00 GMT+02:00 Pieter Wuille : > >> I'm not sure if we will be able to support PoP with CoinJoin. Maybe > >> someone with more insight into CoinJoin have some input? > > > > > > Not really. The problem is that you assume a transaction corresponds to a > > single payment. This is true for simple wallet use cases, but not > compatible > > with CoinJoin, or with systems that for example would want to combine > > multiple payments in a single transaction. > > > > Yes, you are right. It's not compatible with CoinJoin and the likes. > > > > > 48 bits seems low to me, but it does indeed solve the problem. Why not > 128 > > or 256 bits? > > The nonce is limited because of the OP_RETURN output being limited to > 40 bytes of data: 2 bytes version, 32 bytes txid, 6 bytes nonce. > > > > >> > Why does anyone care who paid? This is like walking into a coffeshop, > >> > noticing I don't have money with me, let me friend pay for me, and > then > >> > have > >> > the shop insist that I can't drink it because I'm not the buyer. > >> > >> If you pay as you use the service (ie pay for coffee upfront), there's > >> no need for PoP. Please see the Motivation section. But you are right > >> that you must have the wallet(s) that paid at hand when you issue a > >> PoP. > >> > >> > > >> > Track payments, don't try to assign identities to payers. > >> > >> Please elaborate, I don't understand what you mean here. > > > > > > I think that is a mistake. You should not assume that the wallet who held > > the coins is the payer/buyer. That's what I said earlier; you're > implicitly > > creating an identity (the one who holds these keys) based on the > > transaction. This seems fundamentally wrong to me, and not necessary. The > > receiver should not care who paid or how, he should care what was payed > for. > > You are saying that it's a problem that the wallet used to pay, must > also be used to issue the PoP? That may very well be a problem in some > cases. People using PoP should of course be aware of it's limitations > and act accordingly, i.e. don't pay for concert tickets for a friend > and expect your friend to be able to enter the arena with her wallet. > As Tom Harding noted, it is possible to transfer keys to your friend's > wallet, but that might not be desirable if those keys are also used > for other payments. Also that would weaken the security of an HD > wallet, since a chain code along with a private key would reveal all > keys in that tree. Another solution is that your friend forwards the > PoP request to your wallet, through twitter or SMS, and you send the > PoP for her. Maybe that forwarding mechanism can be built into wallets > and automated so that the wallet automatically suggests to sign the > PoP for your friend. This is probably something to investigate > further, but not within the scope of this BIP. > > Of course the simplest solution would be to send money to your friend > first so that she can pay for the ticket from her own wallet, but > that's not always feasible. > > > > > The easiest solution to this IMHO would be an extension to the payment > > protocol that gives you (or your wallet) a token in return for paying, > and > > that knowledge of that token is used to gain access to the services you > > provide. > > > > That token would then be reusable. Someone stealing it would be able > to use it as much as she wants. That is what I want to avoid with PoP. > The BIP proposal briefly mentions something like this in the > rationale. I also had a discussion about this with Mike Hearn on this > list on Mars 13 that I think covers most pros and cons of the > different approaches. > > While your suggestion does indeed separate the transaction from the > proof of payment, it also assumes that the token is held in the wallet > that pays. Otherwise you would need to keep it in another safe place, > remember it's reusable. Where would that be? How would you transfer > that token to your friend? > > Thank you again for your comments. I appreciate it. > > Best regards, > Kalle > > > -- > > Pieter > > > --001a114fd9aa8339c10518a78842 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

You can't avoid sharing the token, and you can't avo= id sharing the private keys used for signing either. If they are single use= , you don't lose anything by sharing them.

Also you are not creating a real transaction. Why does the O= P_RETURN limitation matter?

On Jun 16, 2015 9:22 PM, "Kalle Rosenbaum&q= uot; <kalle@rosenbaum.se> w= rote:
Thank you for = your comments Pieter! Please find my answers below.

2015-06-16 16:31 GMT+02:00 Pieter Wuille <pieter.wuille@gmail.com>:
> On Mon, Jun 15, 2015 at 1:59 PM, Kalle Rosenbaum <kalle@rosenbaum.se> wrote:
>>
>> 2015-06-15 12:00 GMT+02:00 Pieter Wuille <pieter.wuille@gmail.com>:
>> I'm not sure if we will be able to support PoP with CoinJoin. = Maybe
>> someone with more insight into CoinJoin have some input?
>
>
> Not really. The problem is that you assume a transaction corresponds t= o a
> single payment. This is true for simple wallet use cases, but not comp= atible
> with CoinJoin, or with systems that for example would want to combine<= br> > multiple payments in a single transaction.
>

Yes, you are right. It's not compatible with CoinJoin and the likes.
>
> 48 bits seems low to me, but it does indeed solve the problem. Why not= 128
> or 256 bits?

The nonce is limited because of the OP_RETURN output being limited to
40 bytes of data: 2 bytes version, 32 bytes txid, 6 bytes nonce.

>
>> > Why does anyone care who paid? This is like walking into a co= ffeshop,
>> > noticing I don't have money with me, let me friend pay fo= r me, and then
>> > have
>> > the shop insist that I can't drink it because I'm not= the buyer.
>>
>> If you pay as you use the service (ie pay for coffee upfront), the= re's
>> no need for PoP. Please see the Motivation section. But you are ri= ght
>> that you must have the wallet(s) that paid at hand when you issue = a
>> PoP.
>>
>> >
>> > Track payments, don't try to assign identities to payers.=
>>
>> Please elaborate, I don't understand what you mean here.
>
>
> I think that is a mistake. You should not assume that the wallet who h= eld
> the coins is the payer/buyer. That's what I said earlier; you'= re implicitly
> creating an identity (the one who holds these keys) based on the
> transaction. This seems fundamentally wrong to me, and not necessary. = The
> receiver should not care who paid or how, he should care what was paye= d for.

You are saying that it's a problem that the wallet used to pay, must also be used to issue the PoP? That may very well be a problem in some
cases. People using PoP should of course be aware of it's limitations and act accordingly, i.e. don't pay for concert tickets for a friend and expect your friend to be able to enter the arena with her wallet.
As Tom Harding noted, it is possible to transfer keys to your friend's<= br> wallet, but that might not be desirable if those keys are also used
for other payments. Also that would weaken the security of an HD
wallet, since a chain code along with a private key would reveal all
keys in that tree. Another solution is that your friend forwards the
PoP request to your wallet, through twitter or SMS, and you send the
PoP for her. Maybe that forwarding mechanism can be built into wallets
and automated so that the wallet automatically suggests to sign the
PoP for your friend. This is probably something to investigate
further, but not within the scope of this BIP.

Of course the simplest solution would be to send money to your friend
first so that she can pay for the ticket from her own wallet, but
that's not always feasible.

>
> The easiest solution to this IMHO would be an extension to the payment=
> protocol that gives you (or your wallet) a token in return for paying,= and
> that knowledge of that token is used to gain access to the services yo= u
> provide.
>

That token would then be reusable. Someone stealing it would be able
to use it as much as she wants. That is what I want to avoid with PoP.
The BIP proposal briefly mentions something like this in the
rationale. I also had a discussion about this with Mike Hearn on this
list on Mars 13 that I think covers most pros and cons of the
different approaches.

While your suggestion does indeed separate the transaction from the
proof of payment, it also assumes that the token is held in the wallet
that pays. Otherwise you would need to keep it in another safe place,
remember it's reusable. Where would that be? How would you transfer
that token to your friend?

Thank you again for your comments. I appreciate it.

Best regards,
Kalle

> --
> Pieter
>
--001a114fd9aa8339c10518a78842--