public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Christopher Allen <ChristopherA@lifewithalacrity.com>
To: Alfred Hodler <alfred_hodler@protonmail.com>,
	 Bitcoin Protocol Discussion
	<bitcoin-dev@lists.linuxfoundation.org>
Cc: Wolf McNally <wolf@wolfmcnally.com>
Subject: Re: [bitcoin-dev] [BIP proposal] Private Payments
Date: Fri, 1 Jul 2022 10:37:57 -0700	[thread overview]
Message-ID: <CACrqygB9djLPibhRPoTmN-fDtdSBtBhjOtQTdccJKr=j4P-LfQ@mail.gmail.com> (raw)
In-Reply-To: <ssSz15zsnav_kwhbS29ErU1VEi1DleCTSVuahEbHvAsA7sGWIAJswrai3f51PrO7JH6w8qmN1BdFd5cuNrFt-6NmC-13TI6Q4aayS-DACfs=@protonmail.com>

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

On Fri, Jul 1, 2022 at 5:43 AM Alfred Hodler via bitcoin-dev <
bitcoin-dev@lists.linuxfoundation.org> wrote:

> I agree with your proposal to use bech32 instead of base58. It looks sound
> to me and as you said, the standard would benefit from more compact QR
> codes.


The most important thing to get more compact QR codes is to not use
lowercase letters, and certain other characters, as if you can avoid them
the QRs will auto-compress.

It happens that the core of bech32 works if all caps, and you are careful
with the human readable portion.

See
https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-003-uri-binary-compatibility.md
for more details, but a big offender is base64 which not only doesn’t
auto-compress but also can trigger binary mode that almost doubled the size
of the QR.

We have a number of standards & libraries focused on bitcoin QRs, including
support of animated QRs for things like PSBTs, but if you care about QR
size you should take a look at the techniques we use our swift library
https://github.com/BlockchainCommons/QRCodeGenerator which are also in
https://www.nayuki.io/page/qr-code-generator-library.

Basically both of these libraries support “optimal encoding using segments”
that if they encounter a set of characters that must be encoded in binary
(In particularly $ % * + / :) that would in most default platform QR
implementations  cause the entire QR to double in size. Instead will only
encode the small segment as binary, letting the rest of the QR leverage
auto-compression.

If your are interested in our other Airgap QR and TorGap UR efforts, see
our video from last year:
https://youtu.be/RYgOFSdUqWY We have much more on the way, including NFC
encrypted Airgap & crypto-request/response flows.

I’d love to see proposals for various payment and invoice QRs that leverage
these wallet interoperability standards we have been offering. Let us know
if you are interested, or join discussions at
https://github.com/BlockchainCommons/Airgapped-Wallet-Community

— Christopher Allen, Blockchain Commons

>

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

  reply	other threads:[~2022-07-01 17:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-27 18:17 [bitcoin-dev] [BIP proposal] Private Payments Alfred Hodler
2022-06-27 20:20 ` Bryan Bishop
2022-06-27 20:35   ` Ruben Somsen
2022-06-28 12:40   ` Alfred Hodler
2022-06-27 20:30 ` Ruben Somsen
2022-06-28 12:35   ` Alfred Hodler
     [not found]     ` <PS2P216MB10894F1EE83AFA648003C6339DBF9@PS2P216MB1089.KORP216.PROD.OUTLOOK.COM>
2022-07-05  9:38       ` Alfred Hodler
2022-06-28 23:33   ` Peter Todd
2022-06-29 22:33 ` Clark Moody
2022-07-01 12:41   ` Alfred Hodler
2022-07-01 17:37     ` Christopher Allen [this message]
2022-07-11 10:28 ` Alfred Hodler

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='CACrqygB9djLPibhRPoTmN-fDtdSBtBhjOtQTdccJKr=j4P-LfQ@mail.gmail.com' \
    --to=christophera@lifewithalacrity.com \
    --cc=alfred_hodler@protonmail.com \
    --cc=bitcoin-dev@lists.linuxfoundation.org \
    --cc=wolf@wolfmcnally.com \
    /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