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
|
Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194]
helo=mx.sourceforge.net)
by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76)
(envelope-from <alexy.kot.all@gmail.com>) id 1WQfcg-00014Q-IG
for bitcoin-development@lists.sourceforge.net;
Thu, 20 Mar 2014 16:15:14 +0000
Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of gmail.com
designates 209.85.128.172 as permitted sender)
client-ip=209.85.128.172; envelope-from=alexy.kot.all@gmail.com;
helo=mail-ve0-f172.google.com;
Received: from mail-ve0-f172.google.com ([209.85.128.172])
by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128)
(Exim 4.76) id 1WQfcf-0005xA-1G
for bitcoin-development@lists.sourceforge.net;
Thu, 20 Mar 2014 16:15:14 +0000
Received: by mail-ve0-f172.google.com with SMTP id jx11so1204137veb.3
for <bitcoin-development@lists.sourceforge.net>;
Thu, 20 Mar 2014 09:15:07 -0700 (PDT)
X-Received: by 10.52.163.236 with SMTP id yl12mr3888709vdb.39.1395332107282;
Thu, 20 Mar 2014 09:15:07 -0700 (PDT)
MIME-Version: 1.0
Sender: alexy.kot.all@gmail.com
Received: by 10.59.0.38 with HTTP; Thu, 20 Mar 2014 09:14:27 -0700 (PDT)
In-Reply-To: <lge7lv$3mf$1@ger.gmane.org>
References: <lc5hmg$1jh$1@ger.gmane.org> <leuunm$tjk$1@ger.gmane.org>
<CANEZrP3nQfvDArKTRgje0Cus4G2JD_zpxSjA3fXfxM2TNAP80Q@mail.gmail.com>
<CALDj+BafD+6KTNcYDBEu5gNPzYozSkiC-JCxrY-PzXL2DYBRsw@mail.gmail.com>
<lge7lv$3mf$1@ger.gmane.org>
From: Alex Kotenko <alexykot@gmail.com>
Date: Thu, 20 Mar 2014 16:14:27 +0000
X-Google-Sender-Auth: 73EpT1gwg-lbl6ChwCgtWUm0rbY
Message-ID: <CALDj+BZRsXnU5w=1B+01PDfMPY-7zqU3GP_52vr9wknEdTJ59Q@mail.gmail.com>
To: Andreas Schildbach <andreas@schildbach.de>
Content-Type: multipart/alternative; boundary=001a11c2c93299635604f50c127b
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
(alexy.kot.all[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: 1WQfcf-0005xA-1G
Cc: Bitcoin Dev <bitcoin-development@lists.sourceforge.net>
Subject: Re: [Bitcoin-development] Payment Protocol for Face-to-face Payments
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: Thu, 20 Mar 2014 16:15:14 -0000
--001a11c2c93299635604f50c127b
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
2014-03-20 8:08 GMT+00:00 Andreas Schildbach <andreas@schildbach.de>:
> On 03/20/2014 03:22 AM, Alex Kotenko wrote:
> > Right now, before BIP70, I'm sending BIP21 URI via NFC or QR code, and =
I
> > need to still be able to use it for backwards compatibility. But at the
> > same time I want to be able to support BIP70. And also I want to avoid
> > using external servers, the concept of my POS is that everything is
> > happening between just payer's phone and payee's POS device. This means
> > that BIP72 HTTP(S) link inside Bitcoin URI is not suitable for me.
>
> We could use Bluetooth in the "r" parameter, not unlike we use Bluetooth
> in the payment_url. However, since multiple devices could access your
> machine at the same time, we need some for of adressibility of different
> payment requests. Something like
> "bt:<btmac>-
> =E2=80=8B=E2=80=8B
> <random_id_of_payment_request>".
=E2=80=8BI guess this would be best option=E2=80=8B. I'm also worried about=
potential QR
code capacity, since as I imagine we can encounter device that has your
Wallet installed and bluetooth enabled, but no NFC available, so we will
have to operate via onscreen QR codes + bluetooth.
Hmm, if we're inventing an URI for bluetooth, I'd rather follow existing
URI's patterns. BT is strictly point-to-point connection, so BT MAC should
be considered as server address, and payment request ID can be considered
as request path. Probably "bt:<bt-mac>/=E2=80=8B<random_id_of_payment_reque=
st>"
would be more usual and easily understandable.
Really I don't think my PoS will now support multiple simultaneous
payments, but it's good to have this thing in place for the time I will
need it.
I wonder how complex it would be to implement HTTP-over-Bluetooth. Not like
I'm willing to do that now, but HTTP is well known and proven to be quite
good for tasks like this, so in theory it would be handy to have such
capacities in here.
> > You're also offering an option to include Base43 encoded PR body right
> > inside the Bitcoin URI, but in a way that is not backwards compatible
> > with BIP21.
>
> Well, do we need to be compatible? If the dev community decides Base43
> PR QR's (or whatever other self-contained format) is the way to go, we
> just implement, roll it out and use it.
>
My PoS needs to be compatible with BIP21, as when I'm presenting QR code or
sending NFC message - I have no way to tell what wallet/phone is =E2=80=8B=
=E2=80=8Bon the
accepting side, so I have to be compatible to existing widely supported
technologies.
> I understand your intention behind base43 encoding and noncompatible URI
> > - you want to make most possible use of QR codes. But I wonder - did yo=
u
> > compare this base43 to base64 encoded request in a binary QR code
> > format? How much do we actually win in total bytes capacity at a price
> > of noncompatibility and increased complexity?
>
> Alphanumeric QR codes have an alphabet of 45 chars, of which I am using
> 43. I skipped Space and '%' because they're not allowed in URIs. When I
> invented the Base43 format back in 2011, wanted it to be URI compatible
> so we can use the Android intent dispatcher.
>
> If we let go of the URI requirement, we can use binary QR codes as well.
> This means users will always have to manually start their Bitcoin app
> first. (Also, there is an implementation issue with the ZXing scanner
> I'm using, it returns Strings rather than a byte array so it will choke
> on \0 characters.)
>
> > And also maybe we can extend BIP72 to include encoded payment request i=
n
> > the URL directly in a backwards compatible way?
>
> I took this into consideration. It would be space inefficient.
>
> The Base58-encoded address from BIP21 forces the QR code into binary
> mode. Still you can't encode the payment request extension (probably an
> URL parameter) as binary because it needs to stay compatible to the URI
> standard (RFC 3986). You could use one of the Base64 variants for the PR
> in this case, but still it would be inefficient.
=E2=80=8BWell, yes, it would be less efficient than base43. But did you cal=
culate
how much less? =E2=80=8BIt's a compatible and already widely used way and l=
oosing
compatibility needs to have serious reasons, so would be great to know
exact figures here.
I can find out base64 size, but I don't have a working base43
implementation (since the only existing is in Java, and I don't speak it).
Can you give me a sample uncompressed PR file of moderate size and a base43
encoded version of it? And I'll convert it into base64 and compare.
---------------------------------------------------------------------------=
---
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and thei=
r
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/13534_NeoTech
> _______________________________________________
> Bitcoin-development mailing list
> Bitcoin-development@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bitcoin-development
>
--001a11c2c93299635604f50c127b
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:'cou=
rier new',monospace;color:rgb(0,51,0)"><span style=3D"font-family:arial=
;color:rgb(34,34,34)">2014-03-20 8:08 GMT+00:00 Andreas Schildbach </span><=
span dir=3D"ltr" style=3D"font-family:arial;color:rgb(34,34,34)"><<a hre=
f=3D"mailto:andreas@schildbach.de" target=3D"_blank">andreas@schildbach.de<=
/a>></span><span style=3D"font-family:arial;color:rgb(34,34,34)">:</span=
><br>
</div><div class=3D"gmail_extra"><div class=3D"gmail_quote"><blockquote cla=
ss=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left-width:1px;=
border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex=
"><div>
On 03/20/2014 03:22 AM, Alex Kotenko wrote:<br>
> Right now, before BIP70, I'm sending BIP21 URI via NFC or QR code,=
and I<br>
> need to still be able to use it for backwards compatibility. But at th=
e<br>
> same time I want to be able to support BIP70. And also I want to avoid=
<br>
> using external servers, the concept of my POS is that everything is<br=
>
> happening between just payer's phone and payee's POS device. T=
his means<br>
> that BIP72 HTTP(S) link inside Bitcoin URI is not suitable for me.<br>
<br>
</div>We could use Bluetooth in the "r" parameter, not unlike we =
use Bluetooth<br>
in the payment_url. However, since multiple devices could access your<br>
machine at the same time, we need some for of adressibility of different<br=
>
payment requests. Something like<br>
"bt:<btmac>-<div class=3D"gmail_default" style=3D"font-family:&#=
39;courier new',monospace;color:rgb(0,51,0);display:inline">=E2=80=8B=
=E2=80=8B</div><random_id_of_payment_request>".</blockquote><div=
><div class=3D"gmail_default" style=3D"font-family:'courier new',mo=
nospace;color:rgb(0,51,0)">
=E2=80=8BI guess this would be best option=E2=80=8B. I'm also worried a=
bout potential QR code capacity, since as I imagine we can encounter device=
that has your Wallet installed and bluetooth enabled, but no NFC available=
, so we will have to operate via onscreen QR codes + bluetooth.</div>
<div class=3D"gmail_default" style=3D"font-family:'courier new',mon=
ospace;color:rgb(0,51,0)">Hmm, if we're inventing an URI for bluetooth,=
I'd rather follow existing URI's patterns. BT is strictly point-to=
-point connection, so BT MAC should be considered as server address, and pa=
yment request ID can be considered as request path. Probably "bt:<b=
t-mac>/=E2=80=8B<random_id_of_payment_request>" would be more=
usual and easily understandable.</div>
<div class=3D"gmail_default" style=3D"font-family:'courier new',mon=
ospace;color:rgb(0,51,0)">Really I don't think my PoS will now support =
multiple=C2=A0simultaneous payments, but it's good to have this thing i=
n place for the time I will need it.</div>
<div class=3D"gmail_default" style=3D"font-family:'courier new',mon=
ospace;color:rgb(0,51,0)">I wonder how complex it would be to implement HTT=
P-over-Bluetooth. Not like I'm willing to do that now, but HTTP is well=
known and proven to be quite good for tasks like this, so in theory it wou=
ld be handy to have such capacities in here.</div>
<div class=3D"gmail_default" style=3D"font-family:'courier new',mon=
ospace;color:rgb(0,51,0)"><br></div></div><div>=C2=A0</div><blockquote clas=
s=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left-width:1px;b=
order-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"=
>
<div>
> You're also offering an option to include Base43 encoded PR body r=
ight<br>
> inside the Bitcoin URI, but in a way that is not backwards compatible<=
br>
> with BIP21.<br>
<br>
</div>Well, do we need to be compatible? If the dev community decides Base4=
3<br>
PR QR's (or whatever other self-contained format) is the way to go, we<=
br>
just implement, roll it out and use it.<br></blockquote><div class=3D"gmail=
_default" style=3D"font-family:'courier new',monospace;color:rgb(0,=
51,0)">My PoS needs to be compatible with BIP21, as when I'm presenting=
QR code or sending NFC message - I have no way to tell what wallet/phone i=
s =E2=80=8B=E2=80=8Bon the accepting side, so I have to be compatible to ex=
isting widely supported technologies.</div>
<div><br></div><div><br></div><blockquote class=3D"gmail_quote" style=3D"ma=
rgin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,=
204);border-left-style:solid;padding-left:1ex"><div>
> I understand your intention behind base43 encoding and noncompatible U=
RI<br>
> - you want to make most possible use of QR codes. But I wonder - did y=
ou<br>
> compare this base43 to base64 encoded request in a binary QR code<br>
> format? How much do we actually win in total bytes capacity at a price=
<br>
> of noncompatibility and increased complexity?<br>
<br>
</div>Alphanumeric QR codes have an alphabet of 45 chars, of which I am usi=
ng<br>
43. I skipped Space and '%' because they're not allowed in URIs=
. When I<br>
invented the Base43 format back in 2011, wanted it to be URI compatible<br>
so we can use the Android intent dispatcher.<br>
<br>
If we let go of the URI requirement, we can use binary QR codes as well.<br=
>
This means users will always have to manually start their Bitcoin app<br>
first. (Also, there is an implementation issue with the ZXing scanner<br>
I'm using, it returns Strings rather than a byte array so it will choke=
<br>
on \0 characters.)<br></blockquote><div>=C2=A0</div><blockquote class=3D"gm=
ail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left-width:1px;border-l=
eft-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>&=
gt; And also maybe we can extend BIP72 to include encoded payment request i=
n<br>
> the URL directly in a backwards compatible way?<br>
<br>
</div>I took this into consideration. It would be space inefficient.<br>
<br>
The Base58-encoded address from BIP21 forces the QR code into binary<br>
mode. Still you can't encode the payment request extension (probably an=
<br>
URL parameter) as binary because it needs to stay compatible to the URI<br>
standard (RFC 3986). You could use one of the Base64 variants for the PR<br=
>
in this case, but still it would be inefficient.</blockquote><div><div><div=
class=3D"gmail_default" style=3D"font-family:'courier new',monospa=
ce;color:rgb(0,51,0)">=E2=80=8BWell, yes, it would be less efficient than b=
ase43. But did you calculate how much less? =E2=80=8BIt's a compatible =
and already widely used way and loosing compatibility needs to have serious=
reasons, so would be great to know exact figures here.</div>
<div><div class=3D"gmail_default" style=3D"font-family:'courier new'=
;,monospace;color:rgb(0,51,0)"><br></div><div class=3D"gmail_default" style=
=3D"font-family:'courier new',monospace;color:rgb(0,51,0)">I can fi=
nd out base64 size, but I don't have a working base43 implementation (s=
ince the only existing is in Java, and I don't speak it). Can you give =
me a sample uncompressed PR file of moderate size and a base43 encoded vers=
ion of it? And I'll convert it into base64 and compare. =C2=A0</div>
</div><div></div></div></div><div>=C2=A0</div><div><br></div><div><br></div=
><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border=
-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;=
padding-left:1ex">
<div>
---------------------------------------------------------------------------=
---<br>
Learn Graph Databases - Download FREE O'Reilly Book<br>
"Graph Databases" is the definitive new guide to graph databases =
and their<br>
applications. Written by three acclaimed leaders in the field,<br>
this first edition is now available. Download your free book today!<br>
<a href=3D"http://p.sf.net/sfu/13534_NeoTech" target=3D"_blank">http://p.sf=
.net/sfu/13534_NeoTech</a><br>
</div><div><div>_______________________________________________<br>
Bitcoin-development mailing list<br>
<a href=3D"mailto:Bitcoin-development@lists.sourceforge.net" target=3D"_bla=
nk">Bitcoin-development@lists.sourceforge.net</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/bitcoin-development=
" target=3D"_blank">https://lists.sourceforge.net/lists/listinfo/bitcoin-de=
velopment</a><br>
</div></div></blockquote></div><br></div></div>
--001a11c2c93299635604f50c127b--
|