* [Bitcoin-development] Providing Payment Request within URI @ 2015-02-24 15:58 Oleg Andreev 2015-02-25 20:44 ` Mike Hearn 2015-02-26 9:32 ` Andreas Schildbach 0 siblings, 2 replies; 6+ messages in thread From: Oleg Andreev @ 2015-02-24 15:58 UTC (permalink / raw) To: Bitcoin Dev Hi, I wonder if there is a standard way to put Payment Request data into bitcoin: URI or directly into QR code. The goal is to allow device to generate a multi-output payment request on its own, without relying on the server and x509 certificates. When scanned via QR code from, say, POS, it's pretty secure, so no additional authentication needed. I'd like something like this: bitcoin:?r=data://<base64url-encoded-payment-request> If there's no standard for that, would it be a good idea to extend BIP72 this way? ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Bitcoin-development] Providing Payment Request within URI 2015-02-24 15:58 [Bitcoin-development] Providing Payment Request within URI Oleg Andreev @ 2015-02-25 20:44 ` Mike Hearn 2015-02-26 9:32 ` Andreas Schildbach 1 sibling, 0 replies; 6+ messages in thread From: Mike Hearn @ 2015-02-25 20:44 UTC (permalink / raw) To: Oleg Andreev; +Cc: Bitcoin Dev [-- Attachment #1: Type: text/plain, Size: 1528 bytes --] Andreas' wallet supports this, but don't do it. Payment requests can get larger in future even without signing. Exploding the capacity of a QR code is very easy. Instead, take a look at the Bluetooth/NFC discussion happening in a different thread. On Tue, Feb 24, 2015 at 4:58 PM, Oleg Andreev <oleganza@gmail.com> wrote: > Hi, > > I wonder if there is a standard way to put Payment Request data into > bitcoin: URI or directly into QR code. The goal is to allow device to > generate a multi-output payment request on its own, without relying on the > server and x509 certificates. When scanned via QR code from, say, POS, it's > pretty secure, so no additional authentication needed. > > I'd like something like this: > > bitcoin:?r=data://<base64url-encoded-payment-request> > > If there's no standard for that, would it be a good idea to extend BIP72 > this way? > > ------------------------------------------------------------------------------ > 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 > [-- Attachment #2: Type: text/html, Size: 2135 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Bitcoin-development] Providing Payment Request within URI 2015-02-24 15:58 [Bitcoin-development] Providing Payment Request within URI Oleg Andreev 2015-02-25 20:44 ` Mike Hearn @ 2015-02-26 9:32 ` Andreas Schildbach 2015-02-26 9:48 ` Oleg Andreev 1 sibling, 1 reply; 6+ messages in thread From: Andreas Schildbach @ 2015-02-26 9:32 UTC (permalink / raw) To: bitcoin-development Yeah, you'd be limited to simple usecases. X509 signing or lots of outputs will make the QR code hard to scan. However, if all you want to do is send to a custom script (without using P2SH) I invite you to have a look at https://github.com/schildbach/bitcoin-wallet/blob/master/wallet/src/de/schildbach/wallet/ui/InputParser.java#L86 https://github.com/schildbach/bitcoin-wallet/blob/master/wallet/src/de/schildbach/wallet/util/Qr.java#L134 https://github.com/schildbach/bitcoin-wallet/blob/master/wallet/src/de/schildbach/wallet/util/Base43.java Basically it's "BITCOIN:-" plus the payment request in Base43 encoded form. I picked Base43, because that's optimized for QR codes. On 02/24/2015 04:58 PM, Oleg Andreev wrote: > Hi, > > I wonder if there is a standard way to put Payment Request data into bitcoin: URI or directly into QR code. The goal is to allow device to generate a multi-output payment request on its own, without relying on the server and x509 certificates. When scanned via QR code from, say, POS, it's pretty secure, so no additional authentication needed. > > I'd like something like this: > > bitcoin:?r=data://<base64url-encoded-payment-request> > > If there's no standard for that, would it be a good idea to extend BIP72 this way? > ------------------------------------------------------------------------------ > 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/ > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Bitcoin-development] Providing Payment Request within URI 2015-02-26 9:32 ` Andreas Schildbach @ 2015-02-26 9:48 ` Oleg Andreev [not found] ` <54EEF12B.2050803@schildbach.de> 0 siblings, 1 reply; 6+ messages in thread From: Oleg Andreev @ 2015-02-26 9:48 UTC (permalink / raw) To: Andreas Schildbach; +Cc: Bitcoin Dev Thanks for references. Yeah, I don't need X509 signing (if I could use certificates, I wouldn't need to include PR in the URL in the first place). I presume you used "BITCOIN:-<payment request>" instead of "bitcoin:?r=somescheme://<payment request>" to make it more compact. I also tried to look up Base43, but I could not find any info on how it is specifically optimized for QR codes. Could you enlighten me? > On 26 Feb 2015, at 10:32, Andreas Schildbach <andreas@schildbach.de> wrote: > > Yeah, you'd be limited to simple usecases. X509 signing or lots of > outputs will make the QR code hard to scan. However, if all you want to > do is send to a custom script (without using P2SH) I invite you to have > a look at > > https://github.com/schildbach/bitcoin-wallet/blob/master/wallet/src/de/schildbach/wallet/ui/InputParser.java#L86 > > https://github.com/schildbach/bitcoin-wallet/blob/master/wallet/src/de/schildbach/wallet/util/Qr.java#L134 > > https://github.com/schildbach/bitcoin-wallet/blob/master/wallet/src/de/schildbach/wallet/util/Base43.java > > Basically it's "BITCOIN:-" plus the payment request in Base43 encoded > form. I picked Base43, because that's optimized for QR codes. > > > On 02/24/2015 04:58 PM, Oleg Andreev wrote: >> Hi, >> >> I wonder if there is a standard way to put Payment Request data into bitcoin: URI or directly into QR code. The goal is to allow device to generate a multi-output payment request on its own, without relying on the server and x509 certificates. When scanned via QR code from, say, POS, it's pretty secure, so no additional authentication needed. >> >> I'd like something like this: >> >> bitcoin:?r=data://<base64url-encoded-payment-request> >> >> If there's no standard for that, would it be a good idea to extend BIP72 this way? >> ------------------------------------------------------------------------------ >> 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/ >> > > ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <54EEF12B.2050803@schildbach.de>]
* Re: [Bitcoin-development] Providing Payment Request within URI [not found] ` <54EEF12B.2050803@schildbach.de> @ 2015-02-26 11:14 ` Oleg Andreev 2015-02-26 12:11 ` Andreas Schildbach 0 siblings, 1 reply; 6+ messages in thread From: Oleg Andreev @ 2015-02-26 11:14 UTC (permalink / raw) To: Andreas Schildbach; +Cc: Bitcoin Dev > Base43 is the same as any BaseX standard, but using a different alphabet > (43 characters). It's meant to be used for efficiently storing binary > data into QR codes. The alphabet is picked to match the 'Alphanumeric' > input mode of QR codes as closely as possible, but at the same time be > allowed in URIs. Does it mean Base58 or Base64 take more space in QR code than Base43? Do you have an estimate of the gains? ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Bitcoin-development] Providing Payment Request within URI 2015-02-26 11:14 ` Oleg Andreev @ 2015-02-26 12:11 ` Andreas Schildbach 0 siblings, 0 replies; 6+ messages in thread From: Andreas Schildbach @ 2015-02-26 12:11 UTC (permalink / raw) To: bitcoin-development On 02/26/2015 12:14 PM, Oleg Andreev wrote: > >> Base43 is the same as any BaseX standard, but using a different alphabet >> (43 characters). It's meant to be used for efficiently storing binary >> data into QR codes. The alphabet is picked to match the 'Alphanumeric' >> input mode of QR codes as closely as possible, but at the same time be >> allowed in URIs. > > Does it mean Base58 or Base64 take more space in QR code than Base43? Do you have an estimate of the gains? Both Base58 and Base64 force QR codes into binary encoding. Base64 can take 6 bits per char, binary of course has 8 bits per char. So you're wasting 25% of space if you use Base64, a little bit more with Base58. Base43 takes log2(43) = 5.43 bits per char, while each char uses up 5.5 bits in QR codes in 'Alphanumeric' encoding. So that's a waste of 1.3%. Source for QR code standard: http://en.wikipedia.org/wiki/QR_code ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-02-26 12:12 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-02-24 15:58 [Bitcoin-development] Providing Payment Request within URI Oleg Andreev 2015-02-25 20:44 ` Mike Hearn 2015-02-26 9:32 ` Andreas Schildbach 2015-02-26 9:48 ` Oleg Andreev [not found] ` <54EEF12B.2050803@schildbach.de> 2015-02-26 11:14 ` Oleg Andreev 2015-02-26 12:11 ` Andreas Schildbach
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox