public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Alex Kotenko <alexykot@gmail.com>
To: Andreas Schildbach <andreas@schildbach.de>
Cc: Bitcoin Dev <bitcoin-development@lists.sourceforge.net>
Subject: Re: [Bitcoin-development] Payment Protocol for Face-to-face Payments
Date: Thu, 20 Mar 2014 16:14:27 +0000	[thread overview]
Message-ID: <CALDj+BZRsXnU5w=1B+01PDfMPY-7zqU3GP_52vr9wknEdTJ59Q@mail.gmail.com> (raw)
In-Reply-To: <lge7lv$3mf$1@ger.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 5183 bytes --]

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>-
> ​​
> <random_id_of_payment_request>".

​I guess this would be best option​. 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>/​<random_id_of_payment_request>"
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 ​​on 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 you
> > 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 in
> > 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.

​Well, yes, it would be less efficient than base43. But did you calculate
how much less? ​It'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.

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 their
> 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
>

[-- Attachment #2: Type: text/html, Size: 8340 bytes --]

  reply	other threads:[~2014-03-20 16:15 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-27 11:59 [Bitcoin-development] Payment Protocol for Face-to-face Payments Andreas Schildbach
2014-01-27 13:11 ` Mike Hearn
2014-01-27 18:18   ` Andreas Schildbach
2014-01-27 18:34     ` Mike Hearn
2014-01-27 20:53     ` [Bitcoin-development] Experiment with linking payment requests via href Andreas Schildbach
2014-01-27 21:47       ` Mike Hearn
2014-01-27 17:11 ` [Bitcoin-development] Payment Protocol for Face-to-face Payments Jeremy Spilman
2014-01-27 17:39   ` Andreas Schildbach
2014-01-27 18:18     ` Jeremy Spilman
2014-01-27 20:34   ` Roy Badami
2014-01-29 14:57     ` Christophe Biocca
2014-01-30 10:46 ` Andreas Schildbach
2014-01-30 10:50   ` Mike Hearn
2014-02-07 23:15   ` Andreas Schildbach
2014-03-02  9:47 ` Andreas Schildbach
2014-03-02 11:50   ` Mike Hearn
2014-03-20  2:22     ` Alex Kotenko
2014-03-20  3:31       ` Jeff Garzik
2014-03-20  8:09         ` Andreas Schildbach
2014-03-20 10:36           ` Mike Hearn
2014-03-20 12:12             ` Adam Back
2014-03-20 12:20               ` Mike Hearn
2014-03-20 17:31               ` Jeff Garzik
2014-03-20 17:42                 ` Alex Kotenko
2014-03-20 18:01                   ` Jeff Garzik
2014-03-21 10:28                 ` Andreas Schildbach
2014-03-21 13:59                   ` Alex Kotenko
2014-03-22 16:35                     ` Jeff Garzik
2014-03-22 16:45                       ` Mike Hearn
2014-03-22 16:55                       ` Mark Friedenbach
2014-03-22 17:24                         ` Jeff Garzik
2014-03-22 17:30                           ` Mike Hearn
2014-03-23  3:47                             ` Alex Kotenko
2014-03-21 10:25               ` Andreas Schildbach
2014-03-21 10:59                 ` Adam Back
2014-03-21 11:08                   ` Mike Hearn
2014-03-21 11:33                     ` Mike Hearn
2014-03-21 12:25                       ` Adam Back
2014-03-21 13:07                         ` Mike Hearn
2014-03-20 18:20             ` Alex Kotenko
2014-03-20 18:31               ` Mike Hearn
2014-03-20 18:50                 ` Alex Kotenko
2014-03-20 21:52                 ` Roy Badami
2014-03-20 23:02                   ` Mike Hearn
2014-03-26 22:48                     ` Roy Badami
2014-03-26 22:56                       ` Mike Hearn
2014-03-26 23:20                         ` Andreas Schildbach
2014-03-27 10:08                           ` Mike Hearn
2014-03-27 13:31                             ` vv01f
2014-06-30 19:26                               ` Alex Kotenko
2014-07-01  8:18                                 ` Mike Hearn
2014-07-01  9:48                                   ` Andreas Schildbach
2014-07-01 10:42                                     ` Michael Wozniak
2014-07-01 13:03                                       ` Alex Kotenko
2014-07-01 14:59                                         ` Andreas Schildbach
2014-07-01 15:07                                           ` Michael Wozniak
2014-07-01 15:39                                             ` Andreas Schildbach
2014-07-01 17:18                                               ` Alex Kotenko
2014-07-01 17:59                                                 ` Mike Hearn
2014-07-02  8:49                                                   ` Alex Kotenko
2014-03-21 10:43                   ` Andreas Schildbach
2014-03-20  8:08       ` Andreas Schildbach
2014-03-20 16:14         ` Alex Kotenko [this message]
2014-03-21  9:47           ` Andreas Schildbach
2014-03-21 13:54             ` Alex Kotenko
2014-03-21 14:51               ` Andreas Schildbach
2014-03-21 15:38                 ` Alex Kotenko
2014-03-21 15:20               ` Andreas Schildbach
2014-03-21 15:24                 ` Mike Hearn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALDj+BZRsXnU5w=1B+01PDfMPY-7zqU3GP_52vr9wknEdTJ59Q@mail.gmail.com' \
    --to=alexykot@gmail.com \
    --cc=andreas@schildbach.de \
    --cc=bitcoin-development@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox