summaryrefslogtreecommitdiff
path: root/03/0dc33565aeea114bd0d5c4da1ec7e005be67ec
blob: f42361a6a362145cfe5835141d96c9db6dbc4653 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
Return-Path: <christophera@gmail.com>
Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133])
 by lists.linuxfoundation.org (Postfix) with ESMTP id D825CC0032
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Sat, 12 Aug 2023 01:05:21 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by smtp2.osuosl.org (Postfix) with ESMTP id A56F8400D8
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Sat, 12 Aug 2023 01:05:21 +0000 (UTC)
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org A56F8400D8
Authentication-Results: smtp2.osuosl.org;
 dkim=pass (2048-bit key) header.d=lifewithalacrity-com.20221208.gappssmtp.com
 header.i=@lifewithalacrity-com.20221208.gappssmtp.com header.a=rsa-sha256
 header.s=20221208 header.b=gQSG7Tdx
X-Virus-Scanned: amavisd-new at osuosl.org
X-Spam-Flag: NO
X-Spam-Score: -1.399
X-Spam-Level: 
X-Spam-Status: No, score=-1.399 tagged_above=-999 required=5
 tests=[BAYES_00=-1.9, 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 smtp2.osuosl.org ([127.0.0.1])
 by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id EHJvXuwI08jt
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Sat, 12 Aug 2023 01:05:20 +0000 (UTC)
Received: from mail-yw1-x1130.google.com (mail-yw1-x1130.google.com
 [IPv6:2607:f8b0:4864:20::1130])
 by smtp2.osuosl.org (Postfix) with ESMTPS id 46C53400C5
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Sat, 12 Aug 2023 01:05:20 +0000 (UTC)
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 46C53400C5
Received: by mail-yw1-x1130.google.com with SMTP id
 00721157ae682-583b3aa4f41so26240387b3.2
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Fri, 11 Aug 2023 18:05:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=lifewithalacrity-com.20221208.gappssmtp.com; s=20221208; t=1691802319;
 x=1692407119; 
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=i3aaWKB0v05jbJsazKGOufOuIyW9G0pgAlq5VxrEgFc=;
 b=gQSG7TdxQw+graGN2z7D8EUqVwzmlfUXaM9p4C4UQJW5AKHBs5Jx0isTspwzQMRKWJ
 6YYYeJ/mNlxSSt4KB2MYa72KKej53o+Fh87QwkWX+9YNo+o+tGoJYiL71jhTvQaMlrXH
 GNwzTkztSs7uh6g7MddCmurDoeRDvub3U1X+PLjlPV1kSg+5eFz3Gh21ua/Ydd/l9Wu+
 WffgBMQ3JEDvjHbb2D1JYAW4g4UKN/w77DC9SNy30dIK1MX67nqBcJ/eQbi52OB0nUdC
 waj4hqWDNYoNRkHmPblUDL2iWpWrh+Eh4S9aF4uoyVHLZZmB9+Bkm76xylKmVgqesgA1
 z71w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1691802319; x=1692407119;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=i3aaWKB0v05jbJsazKGOufOuIyW9G0pgAlq5VxrEgFc=;
 b=gOFFMvriWz5rlSbUR98wesTxDOfXkwyL7n0Ks2uCPH7Oe4PrPDUw0+TfB1fPf4B2xf
 1gxctMEQLXX8JRiCVMb3zMRqyqCzBi28QgLw1FV9hoEooVhdCqFR2P6y+3Ubh4xKqDDh
 abu9jcEDVL50bmBXwmxZpx/O4AQTNkkzDh8ZrsADbhzTdXW1b5Th34G0d+46i1N5OR3k
 9+izAafxf5Or5qLmNV4bxD4i9KNjEXtGdHsVQgdCWiWGXNhIZJ/dMiqxv2cvLDXn9Yx9
 UryNKY4qIpgGLYsuXHOq1YhnLFEAiyqcigUPG8N6MJSRWZZK66vd4VT32gJVvaC7/Dn8
 aeTg==
X-Gm-Message-State: AOJu0YzgZ7m/bsw4L8rN/sHjQ/EV7yc+hSpiDUQ4mNXD/MpwOxlzJ90p
 WYInpdLAcxu+USusFDBdZ3bYYNkfApqvJGoMA5xRTd5R/F0=
X-Google-Smtp-Source: AGHT+IEEZigl5zifDIWExy4sxs28+R9xWpjmeX6Ub2W4KwwfEvSHWAKZXdGslVcv2rDDoNvsTqYqyPC2uVkD2sX/+RA=
X-Received: by 2002:a0d:f3c6:0:b0:577:2fda:f181 with SMTP id
 c189-20020a0df3c6000000b005772fdaf181mr3117168ywf.44.1691802318829; Fri, 11
 Aug 2023 18:05:18 -0700 (PDT)
MIME-Version: 1.0
References: <mailman.130337.1691684480.956.bitcoin-dev@lists.linuxfoundation.org>
 <50A19B79-46A1-4F21-AA53-74356F4B0CBA@ngould.dev>
 <P1bXSK5FgAsqtckOyZmQ4U6XyKJavBuDC92FgE_R4osiQJIIEDndFRPBFJsU6vO0fhioctnDV9MKp1sYoCfSwswUbFfkglxHEvYaNMo67fI=@proton.me>
In-Reply-To: <P1bXSK5FgAsqtckOyZmQ4U6XyKJavBuDC92FgE_R4osiQJIIEDndFRPBFJsU6vO0fhioctnDV9MKp1sYoCfSwswUbFfkglxHEvYaNMo67fI=@proton.me>
From: Christopher Allen <ChristopherA@lifewithalacrity.com>
Date: Fri, 11 Aug 2023 18:05:06 -0700
Message-ID: <CACrqygAPKUUYxWbV0XwrRN9U1sNEGCkv+iWwA8MiLLjN_+dASQ@mail.gmail.com>
To: Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>, 
 symphonicbtc <symphonicbtc@proton.me>
Content-Type: multipart/alternative; boundary="0000000000003e80bb0602af6cfe"
X-Mailman-Approved-At: Sat, 12 Aug 2023 09:31:22 +0000
Cc: Dan Gould <d@ngould.dev>
Subject: Re: [bitcoin-dev] BIP for Serverless Payjoin (AdamISZ)
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Bitcoin Protocol Discussion <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>, 
 <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>, 
 <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe>
X-List-Received-Date: Sat, 12 Aug 2023 01:05:21 -0000

--0000000000003e80bb0602af6cfe
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Fri, Aug 11, 2023 at 3:29 PM symphonicbtc via bitcoin-dev <
bitcoin-dev@lists.linuxfoundation.org> wrote:

> Quick little nit I noticed as well, are you sure base64 encoding is the
> best choice for the psk in the URI? You may find that having to urlencode
> the special characters in base64 it impacts readability and adds a layer =
of
> complexity if a human wanted to extract the psk from the URI for some
> reason. I suggest using something like [base64url](
> https://datatracker.ietf.org/doc/html/rfc4648#section-5) which modifies
> base64 slightly to be more suited to this purpose.


Yes, the URI version of base64 is better.

>
However, If you plan to display these via QRs, either will double the
density of the QR as QR libraries treat them as binary data (like hex of
hex data). Thus you may want to use UR encoding, which is what over a dozen
bitcoin wallets use to encode PSBTs. URs are very efficient with QRs, and
have the optional benefit that if the data carried becomes too large, they
can be animated. The have other advantages.

* A top level link about URs:
https://github.com/BlockchainCommons/crypto-commons/blob/master/Docs/README=
.md#uniform-resources-urs

* About the base64 encoding with QRs problem:
https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-0=
03-uri-binary-compatibility.md

* The base UR tech spec:
https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-0=
05-ur.md

* List of bitcoin wallets using UR for PSBTs:
https://github.com/blockchaincommons/gordian-developer-community#urs

* List of UR libraries:
https://github.com/BlockchainCommons/crypto-commons#bc-ur

Let me know if you=E2=80=99re interested.

=E2=80=94 Christopher Allen

>

--0000000000003e80bb0602af6cfe
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div><div><br></div><div><br><div class=3D"gmail_quote"><div dir=3D"ltr" cl=
ass=3D"gmail_attr">On Fri, Aug 11, 2023 at 3:29 PM symphonicbtc via bitcoin=
-dev &lt;<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" target=3D=
"_blank">bitcoin-dev@lists.linuxfoundation.org</a>&gt; wrote:</div><blockqu=
ote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left-wid=
th:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,2=
04,204)" dir=3D"auto">Quick little nit I noticed as well, are you sure base=
64 encoding is the best choice for the psk in the URI? You may find that ha=
ving to urlencode the special characters in base64 it impacts readability a=
nd adds a layer of complexity if a human wanted to extract the psk from the=
 URI for some reason. I suggest using something like [base64url](<a href=3D=
"https://datatracker.ietf.org/doc/html/rfc4648#section-5" rel=3D"noreferrer=
" target=3D"_blank">https://datatracker.ietf.org/doc/html/rfc4648#section-5=
</a>) which modifies base64 slightly to be more suited to this purpose.</bl=
ockquote><div dir=3D"auto"><br></div><div dir=3D"auto">Yes, the URI version=
 of base64 is better.</div><blockquote class=3D"gmail_quote" style=3D"margi=
n:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-l=
eft:1ex;border-left-color:rgb(204,204,204)" dir=3D"auto"></blockquote><div =
dir=3D"auto"><br></div><div dir=3D"auto">However, If you plan to display th=
ese via QRs, either will double the density of the QR as QR libraries treat=
 them as binary data (like hex of hex data). Thus you may want to use UR en=
coding, which is what over a dozen bitcoin wallets use to encode PSBTs. URs=
 are very efficient with QRs, and have the optional benefit that if the dat=
a carried becomes too large, they can be animated. The have other advantage=
s.=C2=A0</div><div dir=3D"auto"><br></div><div dir=3D"auto">* A top level l=
ink about URs:=C2=A0<div><a href=3D"https://github.com/BlockchainCommons/cr=
ypto-commons/blob/master/Docs/README.md#uniform-resources-urs">https://gith=
ub.com/BlockchainCommons/crypto-commons/blob/master/Docs/README.md#uniform-=
resources-urs</a></div><div dir=3D"auto"><br></div><div dir=3D"auto">* Abou=
t the base64 encoding with QRs problem:=C2=A0<div><a href=3D"https://github=
.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-003-uri-binary-=
compatibility.md">https://github.com/BlockchainCommons/Research/blob/master=
/papers/bcr-2020-003-uri-binary-compatibility.md</a></div><div dir=3D"auto"=
><br></div><div dir=3D"auto">* The base UR tech spec:=C2=A0<div><a href=3D"=
https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-0=
05-ur.md">https://github.com/BlockchainCommons/Research/blob/master/papers/=
bcr-2020-005-ur.md</a></div><div dir=3D"auto"><br></div><div dir=3D"auto">*=
 List of bitcoin wallets using UR for PSBTs:=C2=A0<div><a href=3D"https://g=
ithub.com/blockchaincommons/gordian-developer-community#urs">https://github=
.com/blockchaincommons/gordian-developer-community#urs</a></div><div dir=3D=
"auto"><br></div><div dir=3D"auto">* List of UR libraries:=C2=A0<div><a hre=
f=3D"https://github.com/BlockchainCommons/crypto-commons#bc-ur">https://git=
hub.com/BlockchainCommons/crypto-commons#bc-ur</a></div><div dir=3D"auto"><=
br></div><div dir=3D"auto">Let me know if you=E2=80=99re interested.</div><=
div dir=3D"auto"><br></div><div dir=3D"auto">=E2=80=94 Christopher Allen</d=
iv></div></div></div></div></div><blockquote class=3D"gmail_quote" style=3D=
"margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;pad=
ding-left:1ex;border-left-color:rgb(204,204,204)" dir=3D"auto"></blockquote=
></div></div>
</div>

--0000000000003e80bb0602af6cfe--