summaryrefslogtreecommitdiff
path: root/bb/7a008966f81461690f08b09b98f32bcaadd6bb
blob: 787516d9a0ae57fbdf85aa9f13949a896d71e5bc (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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
Return-Path: <sjors@sprovoost.nl>
Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138])
 by lists.linuxfoundation.org (Postfix) with ESMTP id 8ED35C0012
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 24 Nov 2021 12:50:56 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by smtp1.osuosl.org (Postfix) with ESMTP id 7DF5B81A64
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 24 Nov 2021 12:50:56 +0000 (UTC)
X-Virus-Scanned: amavisd-new at osuosl.org
X-Spam-Flag: NO
X-Spam-Score: -1.552
X-Spam-Level: 
X-Spam-Status: No, score=-1.552 tagged_above=-999 required=5
 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
 DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_ABUSE_SURBL=1.25]
 autolearn=no autolearn_force=no
Authentication-Results: smtp1.osuosl.org (amavisd-new);
 dkim=pass (2048-bit key) header.d=sprovoost.nl header.b="w0bFaKsk";
 dkim=pass (2048-bit key) header.d=messagingengine.com
 header.b="lZNR30mP"
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 BH0fMsANqpHg
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 24 Nov 2021 12:50:55 +0000 (UTC)
X-Greylist: delayed 00:06:06 by SQLgrey-1.8.0
Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com
 [64.147.123.24])
 by smtp1.osuosl.org (Postfix) with ESMTPS id 6EBB881A5F
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 24 Nov 2021 12:50:55 +0000 (UTC)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailout.west.internal (Postfix) with ESMTP id A230C3200953;
 Wed, 24 Nov 2021 07:44:48 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute1.internal (MEProxy); Wed, 24 Nov 2021 07:44:48 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sprovoost.nl; h=
 from:content-type:mime-version:subject:date:references:to
 :in-reply-to:message-id; s=fm1; bh=XM9iM/MFFcsE2J3dahnIpmQ3S9Me9
 paEfOyG4o4QXSU=; b=w0bFaKskeeNG4ymuCZatY1O9gcAR4M2fyp48zgYc5l8ZC
 v7ttc2sy0Zy92ZQ/3HQ65cZ3YUMVg0XZ4fMkVayTGWJMu9iHF/URIwE1+BhpUp7E
 5ZtgITiSSy1dQ0l+kTSoed4dWAegYnFzY6SCYo0dFmrlzCPG3AXyELpDLUUnqNV4
 yfTIgKkAjnxKkKaOe5kQ+0ZZ57BsJBFiDVvs5Kytc6aYiBt8CBI3NQxVrcGX1Cfj
 aiFWSxEReSjvvGVyA9k+95fyysjeC97+MOzN22qxK8v2kwm9ryTS5YzkZCiTN9iG
 26ZikaV+zSYj9mIJZQ/NXh84LijuGwIQsP1AWeS0A==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=XM9iM/
 MFFcsE2J3dahnIpmQ3S9Me9paEfOyG4o4QXSU=; b=lZNR30mPxsF3OL70eqnlIQ
 QlAk7Yyx1mzgfhJoRdbs0Rt9R5mkI9VUk1ziV+1fRfOMmSAi0JX0QztljctZffsk
 imQTnWtXm6iqZyqN6mst36imr7ThFskdpRZspVNtnQuqLY7YRX28tNi8gurnXoYN
 CKs0GrEbfNpwCtMD5xNq3rDHn5AIKFmfTNedSgIyzLHH8/NBaiIu3PZ2UtWR3Vh5
 0I+FRzwzdzbUgBgg+Qbj3ldmEO7Y/h+DLdEoXG0jrFJwHIqkHdiLJtoHv9nS1clm
 ATQXz9dGugz+/01DFjR+/tLXpGZjWlCG/TTNxJrOg48+41mzz7PfYLvjDVN5YoUA
 ==
X-ME-Sender: <xms:wDOeYW1Va3dung3sEJmkWykZBxMNwBQCJS3POTibt7Wi-gYrZfhb5w>
 <xme:wDOeYZFp5dUk7YA4hqdAe0WEXoSd4-bq59IwkLgsowSHZcWKgx0ylWeui-ZsSSYpS
 pyHPeoP9JBiFHnifw>
X-ME-Received: <xmr:wDOeYe6QkjYoJZPKutwVgIwkxHXJjVzViWZghnVZ8GlCJJtR5hGV5GkYoQhj1vlLlKg8gD3QSwnEECm7jKLx7JvNZmtxQuY>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrgeekgdeghecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu
 uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc
 fjughrpefhtggguffffhfvjgfkofesghdtmherhhdtvdenucfhrhhomhepufhjohhrshcu
 rfhrohhvohhoshhtuceoshhjohhrshesshhprhhovhhoohhsthdrnhhlqeenucggtffrrg
 htthgvrhhnpeevvdfgjeetueetkeegjeetueeljeegieevhfelkeffffdvjeeuteevvedu
 hfffkeenucffohhmrghinhepghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivg
 eptdenucfrrghrrghmpehmrghilhhfrhhomhepshhjohhrshesshhprhhovhhoohhsthdr
 nhhl
X-ME-Proxy: <xmx:wDOeYX316C79n9qiWQ4CDYeEv2FAW_MD4G3jDJ1regFqk7Uq9MZekQ>
 <xmx:wDOeYZGYPje-xoZZcQpKmz_Xur7Y56f-oLwA3BfqHGBMviQXrY9Evw>
 <xmx:wDOeYQ_YS6e1IfTXXdgk0fUtQ7J84Lv5N2r_FY3pj5W9z8WAFPGIDQ>
 <xmx:wDOeYcOdm_35DhtPkj2f_Sn5tUnC13NYvBbLm36GEA8dsCtkEUBDPg>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 24 Nov 2021 07:44:47 -0500 (EST)
From: Sjors Provoost <sjors@sprovoost.nl>
Content-Type: multipart/signed;
 boundary="Apple-Mail=_92A76D1B-DFD9-4E4C-94D5-EDD1B26C41D5";
 protocol="application/pgp-signature"; micalg=pgp-sha256
Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.20.0.1.32\))
Date: Wed, 24 Nov 2021 13:44:46 +0100
References: <795f917b-3883-1827-f39b-35123b500f36@achow101.com>
To: Andrew Chow <achow101-lists@achow101.com>,
 Bitcoin Dev <bitcoin-dev@lists.linuxfoundation.org>
In-Reply-To: <795f917b-3883-1827-f39b-35123b500f36@achow101.com>
Message-Id: <E2219CF0-4044-42BC-B782-69DCFF33A5A0@sprovoost.nl>
X-Mailer: Apple Mail (2.3693.20.0.1.32)
X-Mailman-Approved-At: Wed, 24 Nov 2021 15:15:44 +0000
Subject: Re: [bitcoin-dev] Taproot Fields for PSBT
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: Wed, 24 Nov 2021 12:50:56 -0000


--Apple-Mail=_92A76D1B-DFD9-4E4C-94D5-EDD1B26C41D5
Content-Type: multipart/alternative;
	boundary="Apple-Mail=_0AB63C07-24DA-4227-92FC-4C04F2F8F6C7"


--Apple-Mail=_0AB63C07-24DA-4227-92FC-4C04F2F8F6C7
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

Hi Andrew,

I'm confused why PSBT_IN_TAP_BIP32_DERIVATION and =
PSBT_OUT_TAP_BIP32_DERIVATION
contain not just the derivation path for the xonlypubkey, but also the =
tapleaf merkle path.

First I thought it was perhaps necessary in order for a signer to guess =
which
script leaves it can sign with its own keys. But you can't really know =
that without
actually seeing the script. When a signer looks at a script, it =
presumably already
knows the leaf path.

- Sjors

> Op 22 jun. 2021, om 23:22 heeft Andrew Chow via bitcoin-dev =
<bitcoin-dev@lists.linuxfoundation.org> het volgende geschreven:
>=20
> Hi All,
>=20
> I would like to propose a BIP which defines new fields for Taproot
> support in PSBT.
>=20
> The full text is below, and the rendered file can be found at

Now at: https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki =
<https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki>

> -
> | Taproot Key BIP 32 Derivation Path
> | <tt>PSBT_IN_TAP_BIP32_DERIVATION =3D 0x16</tt>
> | <tt><xonlypubkey></tt>
> | The 32 byte X-only public key
> | <tt><hashes len> <leaf hash>* <32-bit uint> <32-bit uint>*</tt>
> | A compact size unsigned integer representing the number of leaf
> hashes, followed by a list of leaf hashes, followed by the master key
> fingerprint concatenated with the derivation path of the public key. =
The
> derivation path is represented as 32-bit little endian unsigned =
integer
> indexes concatenated with each other. Public keys are those needed to
> spend this output. The leaf hashes are of the leaves which involve =
this
> public key.

> |-
> | Taproot Key BIP 32 Derivation Path
> | <tt>PSBT_OUT_TAP_BIP32_DERIVATION =3D 0x07</tt>
> | <tt><xonlypubkey></tt>
> | The 32 byte X-only public key
> | <tt><hashes len> <leaf hash>* <32-bit uint> <32-bit uint>*</tt>
>=20


--Apple-Mail=_0AB63C07-24DA-4227-92FC-4C04F2F8F6C7
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=us-ascii

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Dus-ascii"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;" class=3D"">Hi =
Andrew,<div class=3D""><br class=3D""></div><div class=3D"">I'm confused =
why PSBT_IN_TAP_BIP32_DERIVATION and =
PSBT_OUT_TAP_BIP32_DERIVATION</div><div class=3D"">contain not just the =
derivation path for the xonlypubkey, but also the tapleaf merkle =
path.</div><div class=3D""><br class=3D""></div><div class=3D"">First I =
thought it was perhaps necessary in order for a signer to guess =
which</div><div class=3D"">script leaves it can sign with its own keys. =
But you can't really know that without</div><div class=3D"">actually =
seeing the script. When a signer looks at a script, it presumably =
already</div><div class=3D"">knows the leaf path.</div><div class=3D""><br=
 class=3D""></div><div class=3D"">- Sjors<br class=3D""><div><br =
class=3D""><blockquote type=3D"cite" class=3D""><div class=3D"">Op 22 =
jun. 2021, om 23:22 heeft Andrew Chow via bitcoin-dev &lt;<a =
href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" =
class=3D"">bitcoin-dev@lists.linuxfoundation.org</a>&gt; het volgende =
geschreven:</div><br class=3D"Apple-interchange-newline"><div =
class=3D""><div class=3D"">Hi All,<br class=3D""><br class=3D"">I would =
like to propose a BIP which defines new fields for Taproot<br =
class=3D"">support in PSBT.<br class=3D""><br class=3D"">The full text =
is below, and the rendered file can be found at<br =
class=3D""></div></div></blockquote><div><br class=3D""></div><div>Now =
at:&nbsp;<a =
href=3D"https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki" =
class=3D"">https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki<=
/a></div><div><br class=3D""></div><blockquote type=3D"cite" =
class=3D""><div class=3D""><div class=3D"">-<br class=3D"">| Taproot Key =
BIP 32 Derivation Path<br class=3D"">| =
&lt;tt&gt;PSBT_IN_TAP_BIP32_DERIVATION =3D 0x16&lt;/tt&gt;<br class=3D"">|=
 &lt;tt&gt;&lt;xonlypubkey&gt;&lt;/tt&gt;<br class=3D"">| The 32 byte =
X-only public key<br class=3D"">| &lt;tt&gt;&lt;hashes len&gt; &lt;leaf =
hash&gt;* &lt;32-bit uint&gt; &lt;32-bit uint&gt;*&lt;/tt&gt;<br =
class=3D"">| A compact size unsigned integer representing the number of =
leaf<br class=3D"">hashes, followed by a list of leaf hashes, followed =
by the master key<br class=3D"">fingerprint concatenated with the =
derivation path of the public key. The<br class=3D"">derivation path is =
represented as 32-bit little endian unsigned integer<br class=3D"">indexes=
 concatenated with each other. Public keys are those needed to<br =
class=3D"">spend this output. The leaf hashes are of the leaves which =
involve this<br class=3D"">public key.<br =
class=3D""></div></div></blockquote><br class=3D""><blockquote =
type=3D"cite" class=3D""><div class=3D""><div class=3D"">|-<br =
class=3D"">| Taproot Key BIP 32 Derivation Path<br class=3D"">| =
&lt;tt&gt;PSBT_OUT_TAP_BIP32_DERIVATION =3D 0x07&lt;/tt&gt;<br =
class=3D"">| &lt;tt&gt;&lt;xonlypubkey&gt;&lt;/tt&gt;<br class=3D"">| =
The 32 byte X-only public key<br class=3D"">| &lt;tt&gt;&lt;hashes =
len&gt; &lt;leaf hash&gt;* &lt;32-bit uint&gt; &lt;32-bit =
uint&gt;*&lt;/tt&gt;<br class=3D""><br =
class=3D""></div></div></blockquote></div><br =
class=3D""></div></body></html>=

--Apple-Mail=_0AB63C07-24DA-4227-92FC-4C04F2F8F6C7--

--Apple-Mail=_92A76D1B-DFD9-4E4C-94D5-EDD1B26C41D5
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE7ZvfetalXiMuhFJCV/+b28wwEAkFAmGeM74ACgkQV/+b28ww
EAkSfg//VXmdV7Xnl+tpKm7KDfStDM5GX/UEaLBfmI8vPSt7tERY3DCiZ/1adDcm
Ph1ue3fIa6PiQy1sby8jMic4JGePNsXNX3GQErD7i2sTSSXF/SWQhCPrC87i7lR2
R23SHQK33Znw77wbFleNb8pAIousHrEuj5BJf87gHi4LgqbnJA///U5VD8aCHz2y
uuWZTvQYAA6C+ko8UTmdf5wQ/vEAbiJpeKN/c9Dj2qIgYcUG663JxNAfLOq2gmmo
5dbFXv7q7aK4PbhNH8/Ryb/zZxdaAFzT0vWwFmm+G4aZQsdry0DFsgIwR2zNbI0J
C7j0MDYAY7rzoDuF20mjCiwzQlcZR0245qmhNQqq6U4XfVhy/Xb4+yRA5owpYpFN
9OKWV9tNMCAnlq4opwNP08wO6iuDDANyC4PY2j9iBElT/VnDuWQu6T4RJTLRKdPP
pvFzYKB0eoFhWs8UuOqbo/v3AaEhyYAcNY/VoaMumPM8BOtSeDK5+ALKcL/5C3Gt
GkUOtyn6O7zBy1j8D4gAj3/AmNwLBDYHWML02EnR1TqKXHfDB8PB+BsAjgf4lypp
0NyO6W0nbHvB4xjBESnbhHzA7VdaIhE9M5stOrz+ubKMzvwg8k/8kzdo0WurEvk7
ClEdWjYYBrxQPC27qkHshIV+7GFMPAkqEla/x0aL8vmvmVbRqw4=
=1aTo
-----END PGP SIGNATURE-----

--Apple-Mail=_92A76D1B-DFD9-4E4C-94D5-EDD1B26C41D5--