Return-Path: Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 03AEDC002D for ; Fri, 1 Jul 2022 17:38:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id AB95C846DA for ; Fri, 1 Jul 2022 17:38:12 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org AB95C846DA Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=lifewithalacrity-com.20210112.gappssmtp.com header.i=@lifewithalacrity-com.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=CjHb/d6D X-Virus-Scanned: amavisd-new at osuosl.org X-Spam-Flag: NO X-Spam-Score: 0.001 X-Spam-Level: X-Spam-Status: No, score=0.001 tagged_above=-999 required=5 tests=[BAYES_05=-0.5, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=no autolearn_force=no Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cl2ci0Ojshy1 for ; Fri, 1 Jul 2022 17:38:11 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 2B56A846D7 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by smtp1.osuosl.org (Postfix) with ESMTPS id 2B56A846D7 for ; Fri, 1 Jul 2022 17:38:11 +0000 (UTC) Received: by mail-lf1-x12d.google.com with SMTP id j21so5073652lfe.1 for ; Fri, 01 Jul 2022 10:38:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lifewithalacrity-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=F5Ez8fvN0wpG88XnHg4kTYildKzebU2r8SJ3cEsz+ac=; b=CjHb/d6DSPLPi0U9oNV5sifZZhG6b9AmQS0D4SaJzjjg8C16f57b6vivvs9xB9lTUU 1iUfWLvcENo3pLRMXiIHnuEC94drUtVM+pcYnx+7BSu8yly2BV4uVQ5BxtNYDaSXvTaZ /BTGpgfMTnOOdNNio5MtkIUO+3Govs3G2lKhBDzx1XLNBh79YWbK50M/f8taNrFIgNfU XWi3su+oX/M7U/aah3y88p0trqZD2OdJCI06UpyQovvmmb8GqbuPCbQLUa+wmtXlVmAm NEp/n4HbC3Ppu+x56EU92o2nC0UYZpV89+XXuA+9OUbB+B+JdJqx2dwCHNN+XINxYAkc JFCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=F5Ez8fvN0wpG88XnHg4kTYildKzebU2r8SJ3cEsz+ac=; b=uQMfjlrFAJ5ITx4GK0AHbdfpMnvuDokrOjdqyEA8jJzoWfdusracV3e741+lG2qnNM a6APtUlVrAnKvBdDEONA6R4Le6t/ZiU6sfR8yhJUb35GUQJgvizTSDqJS+gcjydwChi0 ulOB4OHwqwp++/nIoj62BkwxfsdZ7KxKl1Djo0LKqMR46y4BepJgeCQBmFYgwydc1DhE TJY4sHxqrbYaEtNX6nZGbVBeWj3ZvXO/Wdpzvg6VtMk4h5g9OY/ZW6nRxZCyS1cf8ybS rhpt+eFww94oq6rIbvqFwZYUvVjTK16dSqkr0pYzVQKRTCjrMm4p+YrTEWoWLgc0K7mt jWTA== X-Gm-Message-State: AJIora/l1MQt1mTcFon+mm7ZwJl8B+mFbHCt/OiiWcxTISJGwGDfOw0O Ca3GNB1BqplT8bgqw8YF6POblS1RryRNHPSifPY= X-Google-Smtp-Source: AGRyM1snQ5qH6frMudyxHWp/O26G5InFQt7PJ7G9Y6ONjfJabM9QwWNSUalKhUD2HQs9r2aF6RTvPb2Nap13AbB4e98= X-Received: by 2002:a05:6512:3d86:b0:47f:9adc:cc27 with SMTP id k6-20020a0565123d8600b0047f9adccc27mr9838313lfv.608.1656697088824; Fri, 01 Jul 2022 10:38:08 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Christopher Allen Date: Fri, 1 Jul 2022 10:37:57 -0700 Message-ID: To: Alfred Hodler , Bitcoin Protocol Discussion Content-Type: multipart/alternative; boundary="0000000000007adb0105e2c1d93d" X-Mailman-Approved-At: Fri, 01 Jul 2022 18:42:04 +0000 Cc: Wolf McNally Subject: Re: [bitcoin-dev] [BIP proposal] Private Payments X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Bitcoin Protocol Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jul 2022 17:38:13 -0000 --0000000000007adb0105e2c1d93d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 soun= d > 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-0= 03-uri-binary-compatibility.md for more details, but a big offender is base64 which not only doesn=E2=80= =99t 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 =E2=80=9Coptimal encoding using s= egments=E2=80=9D 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=E2=80=99d 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 =E2=80=94 Christopher Allen, Blockchain Commons > --0000000000007adb0105e2c1d93d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, Jul 1, 2022 at 5:43 AM Alfred Hodler via bitcoin-dev <bitcoin-dev@lists.linux= foundation.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 t= hem 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/bc= r-2020-003-uri-binary-compatibility.md for more details, but a big offe= nder is base64 which not only doesn=E2=80=99t auto-compress but also can tr= igger binary mode that almost doubled the size of the QR.

We have a number of standards & libra= ries focused on bitcoin QRs, including support of animated QRs for things l= ike PSBTs, but if you care about QR size you should take a look at the tech= niques we use our swift library=C2=A0
https://github.com/BlockchainC= ommons/QRCodeGenerator which are also in =C2=A0

=
Basically both of these libraries support =E2=80=9C= optimal encoding using segments=E2=80=9D that if they encounter a set of ch= aracters that must be encoded in binary (In particularly $ % * + / :) that = would in most default platform QR implementations =C2=A0cause the entire QR= to double in size. Instead will only encode the small segment as binary, l= etting 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:=C2=A0
https://youtu.be/RYgOFSdUqWY= We have much more on the way, including NFC encrypted Airgap & cry= pto-request/response flows.=C2=A0

I=E2=80=99d love to see proposals for various payment and invoice= QRs that leverage these wallet interoperability standards we have been off= ering. Let us know if you are interested, or join discussions at=C2=A0<= /div>

=E2=80=94 Christopher Al= len, Blockchain Commons=C2=A0
--0000000000007adb0105e2c1d93d--