Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1WQbxT-0001Ly-FH for bitcoin-development@lists.sourceforge.net; Thu, 20 Mar 2014 12:20:27 +0000 Received-SPF: pass (sog-mx-1.v43.ch3.sourceforge.com: domain of gmail.com designates 209.85.214.171 as permitted sender) client-ip=209.85.214.171; envelope-from=mh.in.england@gmail.com; helo=mail-ob0-f171.google.com; Received: from mail-ob0-f171.google.com ([209.85.214.171]) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1WQbxR-0006qW-Me for bitcoin-development@lists.sourceforge.net; Thu, 20 Mar 2014 12:20:27 +0000 Received: by mail-ob0-f171.google.com with SMTP id wn1so767704obc.16 for ; Thu, 20 Mar 2014 05:20:20 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.182.122.133 with SMTP id ls5mr6241971obb.52.1395318020354; Thu, 20 Mar 2014 05:20:20 -0700 (PDT) Sender: mh.in.england@gmail.com Received: by 10.76.71.231 with HTTP; Thu, 20 Mar 2014 05:20:20 -0700 (PDT) In-Reply-To: <20140320121221.GA25052@netbook.cypherspace.org> References: <20140320121221.GA25052@netbook.cypherspace.org> Date: Thu, 20 Mar 2014 13:20:20 +0100 X-Google-Sender-Auth: aq0_n5F-lnwgAv-Y2OMswPXC_Cc Message-ID: From: Mike Hearn To: Adam Back Content-Type: multipart/alternative; boundary=001a1134a7e4f3ba1004f508ca83 X-Spam-Score: -0.5 (/) 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 (mh.in.england[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 1.0 HTML_MESSAGE BODY: HTML included in message 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: 1WQbxR-0006qW-Me Cc: Bitcoin Dev , Andreas Schildbach 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Mar 2014 12:20:27 -0000 --001a1134a7e4f3ba1004f508ca83 Content-Type: text/plain; charset=UTF-8 Very, very limited. The more data you stuff in them, the less reliable and slower scanning becomes. A URL is about the limit of what's practically achievable. Even with that, BitPay have been complaining about the increased character length from adding the https url to download the payment request (though not escaping reduces character count by a lot and is valid). X.509 is extremely bloated, partly due to the number of features it supports, partly due to its history but mostly due to the widespread use of RSA which generates giant keys and signatures. Of course you can get ECC certs as well, but in practice most merchants don't seem to use them yet. There's no way you can fit a cert chain into a QR code. However, this is no big deal, because for the serverless PoS device case Alex cares about you need a backchannel to submit the transaction and refund address anyway, so Bluetooth is already useful/required. Downloading the payment request via it as well as uploading the response is not a big change and - as mentioned - already implemented by Andreas and myself some time ago. On Thu, Mar 20, 2014 at 1:12 PM, Adam Back wrote: > Whats a sensible limit on practical/convenient QR code size? > > How much of the payment protocol message size comes from use of x509? > > (Just exploring what the options are). > > Adam > > > On Thu, Mar 20, 2014 at 11:36:09AM +0100, Mike Hearn wrote: > >> Encoding entire payment requests into qrcodes is definitely not the way >> to go. They can already be large when signed and we're just at the >> start of adding features. >> Finishing off and standardising the bluetooth support is the way to go >> (r=bt:mac). Andreas' app already has some support for this I believe, >> so Alex you could prototype with that, but we need to: >> 1) Add an encryption/auth layer on top, because it runs over RFCOMM >> sockets. The authentication would require proof of owning the Bitcoin >> key that's in the address part of the URI (which is needed for >> backwards compat anyway). >> 2) Write a BIP for it and make sure it's interoperable >> For the auth layer we could either use SSL and then just ignore the >> server certificate and require signing of the session public key with >> the Bitcoin key, which should be easy to code up but is rather heavy on >> the air, or roll a custom lightweight thing where we just do a basic >> ECDH, with the servers key being the same as the address key. But >> rolling such protocols is subtle and I guess it'd need to be reviewed >> by people familiar with such things. >> This feels like a good opportunity to grow the community - perhaps we >> can find a volunteer in the forums who enjoys crypto. >> > --001a1134a7e4f3ba1004f508ca83 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Very, very limited. The more data you stuff in them, the l= ess reliable and slower scanning becomes. A URL is about the limit of what&= #39;s practically achievable. Even with that, BitPay have been complaining = about the increased character length from adding the https url to download = the payment request (though not escaping reduces character count by a lot a= nd is valid).

X.509 is extremely bloated, partly due to the number of feat= ures it supports, partly due to its history but mostly due to the widesprea= d use of RSA which generates giant keys and signatures. Of course you can g= et ECC certs as well, but in practice most merchants don't seem to use = them yet. There's no way you can fit a cert chain into a QR code.

However, this is no big deal, because for the serverles= s PoS device case Alex cares about you need a backchannel to submit the tra= nsaction and refund address anyway, so Bluetooth is already useful/required= . Downloading the payment request via it as well as uploading the response = is not a big change and - as mentioned - already implemented by Andreas and= myself some time ago.



On Thu, Mar 20, 2014 at 1:12 PM, Adam Back <adam@cypherspace.or= g> wrote:
Whats a sensible limit on practical/convenie= nt QR code size?

How much of the payment protocol message size comes from use of x509?

(Just exploring what the options are).

Adam


On Thu, Mar 20, 2014 at 11:36:09AM +0100, Mike Hearn wrote:
=C2=A0 Encoding entire payment requests into qrcodes is definitely not the = way
=C2=A0 to go. They can already be large when signed and we're just at t= he
=C2=A0 start of adding features.
=C2=A0 Finishing off and standardising the bluetooth support is the way to = go
=C2=A0 (r=3Dbt:mac). Andreas' app already has some support for this I b= elieve,
=C2=A0 so Alex you could prototype with that, but we need to:
=C2=A0 1) Add an encryption/auth layer on top, because it runs over RFCOMM<= br> =C2=A0 sockets. The authentication would require proof of owning the Bitcoi= n
=C2=A0 key that's in the address part of the URI (which is needed for =C2=A0 backwards compat anyway).
=C2=A0 2) Write a BIP for it and make sure it's interoperable
=C2=A0 For the auth layer we could either use SSL and then just ignore the<= br> =C2=A0 server certificate and require signing of the session public key wit= h
=C2=A0 the Bitcoin key, which should be easy to code up but is rather heavy= on
=C2=A0 the air, or roll a custom lightweight thing where we just do a basic=
=C2=A0 ECDH, with the servers key being the same as the address key. But =C2=A0 rolling such protocols is subtle and I guess it'd need to be rev= iewed
=C2=A0 by people familiar with such things.
=C2=A0 This feels like a good opportunity to grow the community - perhaps w= e
=C2=A0 can find a volunteer in the forums who enjoys crypto.

--001a1134a7e4f3ba1004f508ca83--