summaryrefslogtreecommitdiff
path: root/2e/feaf99ad979c8f61703cd8d1835e327d780414
blob: db4c5afa73fb7edad4a4ccc46b2f8688c4d12d9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192]
	helo=mx.sourceforge.net)
	by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76)
	(envelope-from <kalle@rosenbaum.se>) id 1YWqcB-00068p-09
	for bitcoin-development@lists.sourceforge.net;
	Sat, 14 Mar 2015 18:16:47 +0000
X-ACL-Warn: 
Received: from mail-qc0-f175.google.com ([209.85.216.175])
	by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128)
	(Exim 4.76) id 1YWqc8-0006ef-Ol
	for bitcoin-development@lists.sourceforge.net;
	Sat, 14 Mar 2015 18:16:46 +0000
Received: by qcyi15 with SMTP id i15so13762810qcy.0
	for <bitcoin-development@lists.sourceforge.net>;
	Sat, 14 Mar 2015 11:16:39 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20130820;
	h=x-gm-message-state:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:cc:content-type;
	bh=Qy6Dz2Own43tLhQVaEo3zGE31xjDOZH6RST8klrZcnA=;
	b=baRLxZjrfBJu7kw+LoWCNFw9pay84GpAaiLUa0Rxmjz/6xNeCj8FYCXX1oqMEbmpp4
	vDMN0slwjdgroZqJklNVKVSFLOk2WTv1btBO009VkN6axcMIIOgzR0Yiatgni4WEm61a
	8IlInE5BWJ47/UXefgzyAVJc0EpfHYDH+niZ0U6RMrnr8fxEI6cbaa2QfvcYfvd/C8kc
	bpktQuW32X24HvG7dv8cJMMDklSYNa4mmSEhUlx++1SL0dKyGvC+jF6l/onW72GnxhM2
	89xXxj+ugJ2q3ujYgnkuH7DWMu79nyYX/rfsFkZ/bAGXXdEZgygxFPY+0ZiPs8yqAxvh
	NTug==
X-Gm-Message-State: ALoCoQl2kjQGjjPakwiD+88+zYxDvSW7tgAikIauTRiTl5Gryqsu7fpXX5hhFYREB76xbptW071e
MIME-Version: 1.0
X-Received: by 10.55.20.213 with SMTP id 82mr84978626qku.46.1426356999203;
	Sat, 14 Mar 2015 11:16:39 -0700 (PDT)
Received: by 10.96.145.9 with HTTP; Sat, 14 Mar 2015 11:16:39 -0700 (PDT)
In-Reply-To: <A2849710-1069-45A1-89C0-9D8E40C4A8D6@newcastle.ac.uk>
References: <CAPswA9zzVDxW8_WXg5833r2Z4pxZOppYtNLHMQ=Nw-H72cMz7w@mail.gmail.com>
	<A2849710-1069-45A1-89C0-9D8E40C4A8D6@newcastle.ac.uk>
Date: Sat, 14 Mar 2015 19:16:39 +0100
Message-ID: <CAPswA9wNS2J=4YhpqWN8SmzJuUF8mek8XLUYTE+twLX9vM4Jhg@mail.gmail.com>
From: Kalle Rosenbaum <kalle@rosenbaum.se>
To: "Patrick Mccorry (PGR)" <patrick.mccorry@newcastle.ac.uk>
Content-Type: multipart/alternative; boundary=001a11400b2a42c1f30511439e3b
X-Spam-Score: 1.0 (+)
X-Spam-Report: Spam Filtering performed by mx.sourceforge.net.
	See http://spamassassin.org/tag/ for more details.
	1.0 HTML_MESSAGE           BODY: HTML included in message
X-Headers-End: 1YWqc8-0006ef-Ol
Cc: Bitcoin Dev <bitcoin-development@lists.sourceforge.net>
Subject: Re: [Bitcoin-development] Proof of Payment
X-BeenThere: bitcoin-development@lists.sourceforge.net
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <bitcoin-development.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=bitcoin-development>
List-Post: <mailto:bitcoin-development@lists.sourceforge.net>
List-Help: <mailto:bitcoin-development-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=subscribe>
X-List-Received-Date: Sat, 14 Mar 2015 18:16:47 -0000

--001a11400b2a42c1f30511439e3b
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Den 14 mar 2015 00:59 skrev "Patrick Mccorry (PGR)" <
patrick.mccorry@newcastle.ac.uk>:
>
> That all seems more complicated than it needs to be - the service you are
paying knows that it had received a payment from some public key Q
(regardless of script type, as all scripts require a public key).

The service knows it had received a payment from Q1, Q2,...,Qn. A tx may
have multiple inputs and each input may have several public keys.

>
> So I want to rent a movie, they send me a challenge and I respond with a
zero knowledge proof to demonstrate that I am the owner of Q, and as they
know that Q made a payment - then there is a proof of payment - as this is
provided by the time stamped transaction on the blockchain - in this sense
you are bootstrapping trust from the blockchain.
>

Ok. Without knowing much about zero knowledge proof, i guess you'd need a
challenge/response for each of the keys Q1,..,Qn. If we settle on only a
single key, what key from what input should we use? One input may be a
multisig (2 of 3) input. Is it ok to settle on only one of the multisig
keys? Probably not. I'd say that we need 2 of 3 signatures (just as in a
bitcoin transaction), and not necessarily the same two that made the
payment.

> For all of your scenarios, a simple challenge-response scheme would work.
Adding an op_return makes the payment transaction worse as it is now
distinguishable on the blockchain - you want use information that is
already available on that transaction.

I'm not sure I follow. Do you mean that it's a problem that the PoP itself
reveals what transaction I'm proving? Well, maybe it is a problem under
some circumstances. The least you can do to protect yourself from revealing
information to third party is to communicate over secure channels. Could
you please elaborate on this?

Anyway, if both the client and the server knows what transaction to prove
(ad-sign example) you are right that the tx info is kind of redundant. But
if we don't send the tx hints from server to client, the client user must
manually select the transaction to prove which makes the user experience
worse.

Thank you very much for your comments,

/Kalle

>
> Sent from my iPhone
>
> On 13 Mar 2015, at 19:58, Kalle Rosenbaum <kalle@rosenbaum.se> wrote:
>
>> Hi all,
>>
>> I've been thinking about how a person can prove that she has made a
payment. I came up with an idea I call Proof of Payment (PoP) and I would
highly appreciate your comments. Has something like this been discussed
somewhere before?
>>
>> Use cases
>>
>> There are several scenarios in which it would be useful to prove that
you have paid for something. For example:
>> A pre-paid hotel room where your PoP functions as a key to the door.
>> An online video rental service where you pay for a video and watch it on
any device.
>> An ad-sign where you pay in advance for e.g. 2-weeks exclusivity. During
this period you can upload new content to the sign whenever you like using
PoP.
>> A lottery where all participants pay to the same address, and the winner
of the T-shirt is selected among the transactions to that address. You
exchange the T-shirt for a PoP for the winning transaction.
>>
>> These use cases can be achieved without any personal information (no
accounts, no e-mails, etc) being involved.
>>
>> Desirable properties:
>> A PoP should be generated on demand.
>> It should only be usable once to avoid issues due to theft.
>> It should be able to create a PoP for any payment, regardless of script
type (P2SH, P2PKH, etc.).
>> Current methods of proving a payment, as I know of:
>> BIP0070, The PaymentRequest together with the transactions fulfilling
the payment makes some sort of proof. However, it does not meet 1 or 2 and
it obviously only meets 3 if the payment is made through BIP0070. Also,
there's no standard way to request/provide the proof.
>> Signing messages, chosen by the entity that the proof is provided to,
with the private keys used to sign the transaction. This could meet 1 and 2
but probably not 3. This is not standardized either.
>> Proof of Payment, the data structure
>>
>> A proof of payment for a transaction T, PoP(T), is used to prove that
one has ownership of the credentials needed to unlock all the inputs of T.
It has the exact same structure as a bitcoin transaction with the same
inputs as T and with a single OP_RETURN output:
>>
>> OP_RETURN PoP <txid> <nonce>
>>
>> | Field     | Size [B] | Description                        |
>> |-----------|----------|------------------------------------|
>> | PoP       | 3        | Literal identifying this as a PoP  |
>> | <txid>    | 32       | The transaction to Prove           |
>> | <nonce>   | 5        | Unsigned integer                   |
>>
>> The PoP is signed using the same signing process that is used for
bitcoin transactions. The purpose of the nonce is to make it harder to use
a stolen PoP. Once the PoP has reached the destination, that PoP is useless
since the destination will generate a new nonce for every PoP.
>>
>> Proof of Payment, the process
>> A proof of payment request is sent from the server to the wallet. The
request contains:
>> a random nonce
>> a destination where to send the PoP, for example a https URL
>> data hinting the wallet which transaction to create a proof for. For
example:
>> txid, if known by the server
>> PaymentRequest.PaymentDetails.merchant_data (in case of a BIP0070
payment)
>> amount
>> label, message or other information from a BIP0021 URL
>> The wallet identifies the transaction T, if possible. Otherwise asks the
user to select among the ones that fit the hints in 1.3.
>> The wallet checks that T is on the blockchain, meaning all the inputs
are spent.
>> The wallet creates an unsigned PoP (UPoP) for T, and asks the user to
sign it.
>> The user confirms
>> The UPoP(T) is signed by the wallet, creating PoP(T).
>> The PoP is sent to the destination in 1.2.
>> The server receiving the PoP validates it and responds with =E2=80=9Cval=
id=E2=80=9D or
=E2=80=9Cinvalid=E2=80=9D
>> The wallet displays the response in some way to the user.
>> Remarks:
>> The method of transferring the PoP request at step 1 is not very well
thought through, but I think we can extend BIP0021 to cater for this. For
example read a URI, representing a PoP request, using QR code or NFC. A
more advanced approach would be to extend BIP0070.
>> The nonce must be randomly generated by the server for every new PoP
request.
>> Validating a PoP
>>
>> The server needs to validate the PoP and reply with =E2=80=9Cvalid=E2=80=
=9D or
=E2=80=9Cinvalid=E2=80=9D. That process is outlined below:
>> Check the format of the PoP. It must pass normal transaction checks,
except for the inputs being already spent.
>> Check the output script. It must conform to the OP_RETURN output format
outlined above.
>> Check that the nonce is the same as the one you requested.
>> Check that the txid in the output is the transaction you actually want
proof for. If you don=E2=80=99t know what transaction you want proof for, c=
heck
that the transaction actually pays for the product/service you deliver (in
the video rental case, find the transaction among all payments for that
specific video).
>> Check that the inputs of the PoP are exactly the same as in transaction
T.
>> Check the signatures of all the inputs, as would be done on a normal
transaction.
>> If the signatures are valid, the PoP is valid.
>> Security issues
>> Someone can intercept the PoP-request and change the destination so that
the user sends the PoP to the bad actor.
>> Someone can intercept the PoP-request and change for example the txid to
trick the user to sign a PoP for another transaction than the intended.
This can of course be avoided by actually looking at the UPoP before
signing it. The bad actor could also set hints for a transaction that the
user didn=E2=80=99t make, resulting in a broken service.
>> Someone can steal a PoP and try to use the service hoping to get a
matching nonce. Probability per try: 1/(2^40). The server should have
mechanism for detecting a brute force attack of this kind, or at least slow
down the process by delaying the PoP request by some 100 ms or so.
>> Even if a wallet has no funds it might still be valuable as a generator
for PoPs. This makes it important to keep the security of the wallet after
it has been emptied.
>> The first two issues are the same as for traditional bitcoin payments.
They could be mitigated by using secure connections and possibly also
extending BIP0070 to support PoPs.
>>
>> Further work
>> Figure out how to make use of, and extend, BIP0070 for the purpose of
PoPs
>> Define an extension for BIP0021 to support PoP requests (something along
the lines of BIP0072)
>> Implement a proof-of-concept
>> Possibly propose BIPs for the different parts.
>> Looking forward to reading your comments
>> Regards,
>> Kalle Rosenbaum
>>
>>
---------------------------------------------------------------------------=
---
>> Dive into the World of Parallel Programming The Go Parallel Website,
sponsored
>> by Intel and developed in partnership with Slashdot Media, is your hub
for all
>> things parallel software development, from weekly thought leadership
blogs to
>> news, videos, case studies, tutorials and more. Take a look and join the
>> conversation now. http://goparallel.sourceforge.net/
>>
>> _______________________________________________
>> Bitcoin-development mailing list
>> Bitcoin-development@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/bitcoin-development

--001a11400b2a42c1f30511439e3b
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><p dir=3D"ltr">Den 14 mar 2015 00:59 skrev &quot;Patrick M=
ccorry (PGR)&quot; &lt;<a href=3D"mailto:patrick.mccorry@newcastle.ac.uk" t=
arget=3D"_blank">patrick.mccorry@newcastle.ac.uk</a>&gt;:<br>
&gt;<br>
&gt; That all seems more complicated than it needs to be - the service you =
are paying knows that it had received a payment from some public key Q (reg=
ardless of script type, as all scripts require a public key).</p>
<p dir=3D"ltr">The service knows it had received a payment from Q1, Q2,...,=
Qn. A tx may have multiple inputs and each input may have several public ke=
ys. </p>
<p dir=3D"ltr">&gt;<br>
&gt; So I want to rent a movie, they send me a challenge and I respond with=
 a zero knowledge proof to demonstrate that I am the owner of Q, and as the=
y know that Q made a payment - then there is a proof of payment - as this i=
s provided by the time stamped transaction on the blockchain - in this sens=
e you are bootstrapping trust from the blockchain.<br>
&gt;</p>
<p dir=3D"ltr">Ok. Without knowing much about zero knowledge proof, i guess=
 you&#39;d need a challenge/response for each of the keys Q1,..,Qn. If we s=
ettle on only a single key, what key from what input should we use? One inp=
ut may be a multisig (2 of 3) input. Is it ok to settle on only one of the =
multisig keys? Probably not. I&#39;d say that we need 2 of 3 signatures (ju=
st as in a bitcoin transaction), and not necessarily the same two that made=
 the payment. <br></p><p dir=3D"ltr"></p><p dir=3D"ltr">&gt; For all of you=
r scenarios, a simple challenge-response scheme would work. Adding an op_re=
turn makes the payment transaction worse as it is now distinguishable on th=
e blockchain - you want use information that is already available on that t=
ransaction. <br></p><p>I&#39;m not sure I follow. Do you mean that it&#39;s=
 a problem that the PoP itself reveals what transaction I&#39;m proving? We=
ll, maybe it is a problem under some circumstances. The least you can do to=
 protect yourself from revealing information to third party is to communica=
te over secure channels. Could you please elaborate on this?</p><p>Anyway, =
if both the client and the server knows what transaction to prove (ad-sign =
example) you are right that the tx info is kind of redundant. But if we don=
&#39;t send the tx hints from server to client, the client user must manual=
ly select the transaction to prove which makes the user experience worse. <=
br></p><p>Thank you very much for your comments,</p><p>/Kalle<br></p><p dir=
=3D"ltr">
&gt;<br>
&gt; Sent from my iPhone<br>
&gt;<br>
&gt; On 13 Mar 2015, at 19:58, Kalle Rosenbaum &lt;<a href=3D"mailto:kalle@=
rosenbaum.se" target=3D"_blank">kalle@rosenbaum.se</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; Hi all,<br>
&gt;&gt;<br>
&gt;&gt; I&#39;ve been thinking about how a person can prove that she has m=
ade a payment. I came up with an idea I call Proof of Payment (PoP) and I w=
ould highly appreciate your comments. Has something like this been discusse=
d somewhere before?<br>
&gt;&gt;<br>
&gt;&gt; Use cases<br>
&gt;&gt;<br>
&gt;&gt; There are several scenarios in which it would be useful to prove t=
hat you have paid for something. For example:<br>
&gt;&gt; A pre-paid hotel room where your PoP functions as a key to the doo=
r.<br>
&gt;&gt; An online video rental service where you pay for a video and watch=
 it on any device.<br>
&gt;&gt; An ad-sign where you pay in advance for e.g. 2-weeks exclusivity. =
During this period you can upload new content to the sign whenever you like=
 using PoP.<br>
&gt;&gt; A lottery where all participants pay to the same address, and the =
winner of the T-shirt is selected among the transactions to that address. Y=
ou exchange the T-shirt for a PoP for the winning transaction.<br>
&gt;&gt;<br>
&gt;&gt; These use cases can be achieved without any personal information (=
no accounts, no e-mails, etc) being involved.<br>
&gt;&gt;<br>
&gt;&gt; Desirable properties:<br>
&gt;&gt; A PoP should be generated on demand.<br>
&gt;&gt; It should only be usable once to avoid issues due to theft.<br>
&gt;&gt; It should be able to create a PoP for any payment, regardless of s=
cript type (P2SH, P2PKH, etc.).<br>
&gt;&gt; Current methods of proving a payment, as I know of:<br>
&gt;&gt; BIP0070, The PaymentRequest together with the transactions fulfill=
ing the payment makes some sort of proof. However, it does not meet 1 or 2 =
and it obviously only meets 3 if the payment is made through BIP0070. Also,=
 there&#39;s no standard way to request/provide the proof.<br>
&gt;&gt; Signing messages, chosen by the entity that the proof is provided =
to, with the private keys used to sign the transaction. This could meet 1 a=
nd 2 but probably not 3. This is not standardized either.<br>
&gt;&gt; Proof of Payment, the data structure<br>
&gt;&gt;<br>
&gt;&gt; A proof of payment for a transaction T, PoP(T), is used to prove t=
hat one has ownership of the credentials needed to unlock all the inputs of=
 T. It has the exact same structure as a bitcoin transaction with the same =
inputs as T and with a single OP_RETURN output:<br>
&gt;&gt;<br>
&gt;&gt; OP_RETURN PoP &lt;txid&gt; &lt;nonce&gt;<br>
&gt;&gt; =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <br>
&gt;&gt; | Field =C2=A0 =C2=A0 | Size [B] | Description=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |<br>
&gt;&gt; |-----------|----------|------------------------------------|<br>
&gt;&gt; | PoP=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 3=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0 | Literal identifying this as a PoP=C2=A0 |<br>
&gt;&gt; | &lt;txid&gt; =C2=A0=C2=A0 | 32=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0 | The transaction to Prove=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0 |<br>
&gt;&gt; | &lt;nonce&gt;=C2=A0=C2=A0 | 5=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0 | Unsigned integer=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |<br>
&gt;&gt;<br>
&gt;&gt; The PoP is signed using the same signing process that is used for =
bitcoin transactions. The purpose of the nonce is to make it harder to use =
a stolen PoP. Once the PoP has reached the destination, that PoP is useless=
 since the destination will generate a new nonce for every PoP.<br>
&gt;&gt;<br>
&gt;&gt; Proof of Payment, the process<br>
&gt;&gt; A proof of payment request is sent from the server to the wallet. =
The request contains:<br>
&gt;&gt; a random nonce<br>
&gt;&gt; a destination where to send the PoP, for example a https URL<br>
&gt;&gt; data hinting the wallet which transaction to create a proof for. F=
or example:<br>
&gt;&gt; txid, if known by the server<br>
&gt;&gt; PaymentRequest.PaymentDetails.merchant_data (in case of a BIP0070 =
payment)<br>
&gt;&gt; amount<br>
&gt;&gt; label, message or other information from a BIP0021 URL<br>
&gt;&gt; The wallet identifies the transaction T, if possible. Otherwise as=
ks the user to select among the ones that fit the hints in 1.3.<br>
&gt;&gt; The wallet checks that T is on the blockchain, meaning all the inp=
uts are spent.<br>
&gt;&gt; The wallet creates an unsigned PoP (UPoP) for T, and asks the user=
 to sign it.<br>
&gt;&gt; The user confirms<br>
&gt;&gt; The UPoP(T) is signed by the wallet, creating PoP(T).<br>
&gt;&gt; The PoP is sent to the destination in 1.2.<br>
&gt;&gt; The server receiving the PoP validates it and responds with =E2=80=
=9Cvalid=E2=80=9D or =E2=80=9Cinvalid=E2=80=9D<br>
&gt;&gt; The wallet displays the response in some way to the user.<br>
&gt;&gt; Remarks: <br>
&gt;&gt; The method of transferring the PoP request at step 1 is not very w=
ell thought through, but I think we can extend BIP0021 to cater for this. F=
or example read a URI, representing a PoP request, using QR code or NFC. A =
more advanced approach would be to extend BIP0070.<br>
&gt;&gt; The nonce must be randomly generated by the server for every new P=
oP request.<br>
&gt;&gt; Validating a PoP<br>
&gt;&gt;<br>
&gt;&gt; The server needs to validate the PoP and reply with =E2=80=9Cvalid=
=E2=80=9D or =E2=80=9Cinvalid=E2=80=9D. That process is outlined below:<br>
&gt;&gt; Check the format of the PoP. It must pass normal transaction check=
s, except for the inputs being already spent.<br>
&gt;&gt; Check the output script. It must conform to the OP_RETURN output f=
ormat outlined above.<br>
&gt;&gt; Check that the nonce is the same as the one you requested.<br>
&gt;&gt; Check that the txid in the output is the transaction you actually =
want proof for. If you don=E2=80=99t know what transaction you want proof f=
or, check that the transaction actually pays for the product/service you de=
liver (in the video rental case, find the transaction among all payments fo=
r that specific video).<br>
&gt;&gt; Check that the inputs of the PoP are exactly the same as in transa=
ction T.<br>
&gt;&gt; Check the signatures of all the inputs, as would be done on a norm=
al transaction.<br>
&gt;&gt; If the signatures are valid, the PoP is valid.<br>
&gt;&gt; Security issues<br>
&gt;&gt; Someone can intercept the PoP-request and change the destination s=
o that the user sends the PoP to the bad actor.<br>
&gt;&gt; Someone can intercept the PoP-request and change for example the t=
xid to trick the user to sign a PoP for another transaction than the intend=
ed. This can of course be avoided by actually looking at the UPoP before si=
gning it. The bad actor could also set hints for a transaction that the use=
r didn=E2=80=99t make, resulting in a broken service.<br>
&gt;&gt; Someone can steal a PoP and try to use the service hoping to get a=
 matching nonce. Probability per try: 1/(2^40). The server should have mech=
anism for detecting a brute force attack of this kind, or at least slow dow=
n the process by delaying the PoP request by some 100 ms or so.<br>
&gt;&gt; Even if a wallet has no funds it might still be valuable as a gene=
rator for PoPs. This makes it important to keep the security of the wallet =
after it has been emptied.<br>
&gt;&gt; The first two issues are the same as for traditional bitcoin payme=
nts. They could be mitigated by using secure connections and possibly also =
extending BIP0070 to support PoPs.<br>
&gt;&gt;<br>
&gt;&gt; Further work<br>
&gt;&gt; Figure out how to make use of, and extend, BIP0070 for the purpose=
 of PoPs<br>
&gt;&gt; Define an extension for BIP0021 to support PoP requests (something=
 along the lines of BIP0072)<br>
&gt;&gt; Implement a proof-of-concept<br>
&gt;&gt; Possibly propose BIPs for the different parts.<br>
&gt;&gt; Looking forward to reading your comments<br>
&gt;&gt; Regards,<br>
&gt;&gt; Kalle Rosenbaum<br>
&gt;&gt;<br>
&gt;&gt; ------------------------------------------------------------------=
------------<br>
&gt;&gt; Dive into the World of Parallel Programming The Go Parallel Websit=
e, sponsored<br>
&gt;&gt; by Intel and developed in partnership with Slashdot Media, is your=
 hub for all<br>
&gt;&gt; things parallel software development, from weekly thought leadersh=
ip blogs to<br>
&gt;&gt; news, videos, case studies, tutorials and more. Take a look and jo=
in the <br>
&gt;&gt; conversation now. <a href=3D"http://goparallel.sourceforge.net/" t=
arget=3D"_blank">http://goparallel.sourceforge.net/</a><br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Bitcoin-development mailing list<br>
&gt;&gt; <a href=3D"mailto:Bitcoin-development@lists.sourceforge.net" targe=
t=3D"_blank">Bitcoin-development@lists.sourceforge.net</a><br>
&gt;&gt; <a href=3D"https://lists.sourceforge.net/lists/listinfo/bitcoin-de=
velopment" target=3D"_blank">https://lists.sourceforge.net/lists/listinfo/b=
itcoin-development</a><br>
</p>
</div>

--001a11400b2a42c1f30511439e3b--