public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Thomas Voegtlin <thomasv@electrum•org>
To: bitcoin-dev@lists•linuxfoundation.org
Subject: Re: [bitcoin-dev] QR code alternatives (was: Proposal: extend bip70 with OpenAlias)
Date: Tue, 21 Jul 2015 16:58:39 +0200	[thread overview]
Message-ID: <55AE5E1F.4050609@electrum.org> (raw)
In-Reply-To: <CA+w+GKRRfT=8xALsVMqEUAZWzd87Lf4HqFPuDigatY+nHzafQQ@mail.gmail.com>



Le 20/07/2015 16:40, Mike Hearn a écrit :
> 
> If we accept a single payment address i.e. no clever tricks around merge
> avoidance, such a QR code could look like this:
> 
> bitcoin:1aBcD1234....?x=serialized_payment_request
> 
> However this requires text mode and wastes bytes at the front for the URI
> type.
> 

It is possible to be both backward-compatible and to avoid wasting space
in URIs, if we simply assume that the payment request is a single
standard output + amount (that scenario will probably cover 99% of the
cases, and the few other cases may not need QR codes). We generate a
serialized bip70 PR from the parameters found in the URI, sign that
string, and add the signature to the URI.

Example:

bitcoin:1H14AiSc4PqkK9VTmeutZU3edSy3HS5HL8?amount=1&message=here%20is%20a%20test&time=1437489571&exp=604800&name=ecdsa.net&sig=3Quot6m2RsR43NgV8VQQx3Ngf5u8wZY18mu523x3ViLrA3WLwSoQum2Znw3gRsTgfADpHuEiyyjnpxCLKWrkR4RQM

'time' is the timestamp of the request
'exp' is the duration of validity, 1 week here
(it saves a few bits to express it that way)

'name' is the domain name of the signer
'sig' is the signature

The QR code derived from that URI is perfectly scannable with a phone.




      parent reply	other threads:[~2015-07-21 14:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-20 14:40 Mike Hearn
2015-07-21  8:20 ` Andreas Schildbach
2015-07-21  8:42   ` Clément Elbaz
2015-07-21 10:25     ` Mike Hearn
2015-07-21 14:58 ` Thomas Voegtlin [this message]

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=55AE5E1F.4050609@electrum.org \
    --to=thomasv@electrum$(echo .)org \
    --cc=bitcoin-dev@lists$(echo .)linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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