From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YPudp-00019r-Ip for bitcoin-development@lists.sourceforge.net; Mon, 23 Feb 2015 15:09:49 +0000 X-ACL-Warn: Received: from vm299.rz.uni-osnabrueck.de ([131.173.16.215] helo=mail-in-3.serv.Uni-Osnabrueck.DE) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1YPudn-0004wd-MB for bitcoin-development@lists.sourceforge.net; Mon, 23 Feb 2015 15:09:49 +0000 Received: from smtp-auth.serv.Uni-Osnabrueck.DE (vm136.rz.uni-osnabrueck.de [131.173.16.11]) by mail-in-3.serv.Uni-Osnabrueck.DE (8.14.4/8.14.4) with ESMTP id t1NF9dEE016898 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 23 Feb 2015 16:09:39 +0100 Received: from msmtp-using-host (ip4d17d118.dynamic.kabel-deutschland.de [77.23.209.24]) (authenticated bits=0) by smtp-auth.serv.Uni-Osnabrueck.DE (8.13.8/8.13.8) with ESMTP id t1NF9bwn018872 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 23 Feb 2015 16:09:38 +0100 Date: Mon, 23 Feb 2015 16:09:37 +0100 From: Jan Vornberger To: Andy Schroder Message-ID: <20150223150937.GA7987@odo.localdomain> References: <20150222190839.GA18527@odo.localdomain> <54EA5A1C.2020701@AndySchroder.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54EA5A1C.2020701@AndySchroder.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2015.2.23.150034 (Univ. Osnabrueck) X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report= HTML_00_01 0.05, HTML_00_10 0.05, BODY_SIZE_5000_5999 0, BODY_SIZE_7000_LESS 0, NO_URI_FOUND 0, REFERENCES 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CD 0, __CP_MEDIA_BODY 0, __CT 0, __CT_TEXT_PLAIN 0, __FORWARDED_MSG 0, __HAS_FROM 0, __HAS_MSGID 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __REFERENCES 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __SUBJ_ALPHA_NEGATE 0, __TO_MALFORMED_2 0, __USER_AGENT 0 X-PMX-Spam-Level: IIIIIIII X-Spam-Score: 0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. X-Headers-End: 1YPudn-0004wd-MB Cc: bitcoin-development@lists.sourceforge.net Subject: Re: [Bitcoin-development] Bitcoin at POS using BIP70, NFC and offline payments - implementer feedback 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: Mon, 23 Feb 2015 15:09:49 -0000 Hey! On Sun, Feb 22, 2015 at 05:37:16PM -0500, Andy Schroder wrote: > It's maybe not a bad idea for the wallet to try all payment_url > mechanisms in parallel. Should we add this as a recommendation to > wallets in TBIP75? It doesn't need to be a recommendation I think, but maybe it would be good to mention that a wallet may do that, if it wants. > I actually also happen to be using nfcpy. I am having some > reliability issues as well with it. What exactly are your problems? Aw, interesting. Sometimes transfers seem to start and then not complete in some way and occasionally the NFC dongle is then totally 'stuck' in some way afterwards, that even after restarting the Python script or reloading the driver nothing works anymore. I have to actually unplug the dongle and plug it in again. Obviously not exactly production ready. I had the same problems with the command line tools based on libnfc, so it might be a problem lower down the stack. I'm not sure I have the expertise to troubleshoot that. > I have seen your video before. I guess I'm wondering how your > prototype works with bitpay and bluetooth. Doesn't bitpay sign the > payment request for you with an https based payment_url? If so, how > do you add the bluetooth payment_url while keeping their signature > valid? Good point, I'm currently simply removing the signature, so that I can modify the payment request. I haven't spoken with BitPay yet, but I hope that they will extend their API at some point to set additional payment_urls or provide a Bluetooth MAC and then I can do it properly with signed requests. > In your video it looks like the phone still has cellular and > wifi reception (it is not offline). You are right, I forgot to actually disable wifi and cellular data when recording the video. But as you know it would work the same way offline. > Regarding the NFC data formats. I would like to clarify that the > wallets are having those events dispatched by the android OS. The > "URI" and "mime type" events are sent to the application in the same > way as from other sources such as a web browser, e-mail, stand alone > QR code scanner app, etc.. So, I don't think the wallet actually > knows it is receiving the event from NFC. That is one reason why so > many existing wallets happen to support BIP21 payment request via > NFC. Andreas can correct me if I am wrong on these statements. I'm a > little weary sending the "mime type" based format over NFC because > of backwards compatibility and because of the long certificate chain > that needs to be transferred. You want that tap to be as robust and > fast as possible. A bluetooth connection can have a retry without > any user interaction. There is a specific NFC intent that you have to list in your Android manifest, but you are right that if you already support BIP21 URIs then it is often fairly easy and quick to also support them via NFC. Whereas the mime type approach means that you necessarily need to be able to actually understand BIP70, which a lot of wallet don't yet. But personally that wouldn't hold me back using the mime type if I feel it's the better experience. Those wallets simply have to fall back on scanning the QR code in the meantime and then get up to speed on their NFC and BIP70 support. I'm still concerned that the fact, that Bluetooth is often disabled, is a problem for the UX. And it's not just a one-time thing as with NFC, which is - in my experience - also often disabled, but then people turn it on and leave it on. But with Bluetooth the Android system is geared much more towards turning it off after use and people have this general idea of 'it uses energy, so I should disable it' and sometimes also 'Bluetooth is insecure and if I leave it on I will get hacked'. So chances are, Bluetooth will be off most of the time, which means everytime you pay the dialog 'Turn on Bluetooth?' will pop up, which isn't exactly streamlined. So the advantage of transmitting the whole BIP70 payment request via NFC I see is, that you don't need Bluetooth to get the payment request and for sending the transaction back the wallet can then make an intelligent decision and first try via HTTP and only after that fails, say something like: "You are currently offline, turn on and transmit via Bluetooth instead?". Much less confusing to the user, in my opinion. Another idea could be to request the permission BLUETOOTH_ADMIN which, as far as I know, allows you to programmatically turn on Bluetooth without user interaction. The wallet could then have a setting somewhere that says 'automatically turn on Bluetooth during payments' which would enable and then disable (if it was off before) Bluetooth during the payment process. That should also be a decent compromise, at the cost of another permission. > There is also the "ack" memo that I mentioned in reference [2]. I > think we can improve upon this really. Can we make a new status > field or different bluetooth message header? I know Andreas didn't > want to change it because that is how his app already works, but I > don't think the way it is is ideal. I'm fine with doing changes here - I don't think there is all that much stuff out there yet which would break from it. At the moment I'm also modifying BitPay's memo field to contain 'ack', as Andreas' wallet otherwise reports a failure if I transmit the original via Bluetooth. :-) But I was assuming that was temporary anyway (?). Jan