summaryrefslogtreecommitdiff
path: root/ac/c6b09f48b01ce08c03b090b3f5e1ad816a640f
blob: eb09dd7e8baa2876cf1aaf4d55f70b72928aed61 (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
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
Return-Path: <gsanders87@gmail.com>
Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])
 by lists.linuxfoundation.org (Postfix) with ESMTP id 555BDC013E
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed,  4 Mar 2020 14:43:28 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by silver.osuosl.org (Postfix) with ESMTP id 4474720469
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed,  4 Mar 2020 14:43:28 +0000 (UTC)
X-Virus-Scanned: amavisd-new at osuosl.org
Received: from silver.osuosl.org ([127.0.0.1])
 by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id WQFo3TkukWju
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed,  4 Mar 2020 14:43:27 +0000 (UTC)
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6
Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com
 [209.85.208.49])
 by silver.osuosl.org (Postfix) with ESMTPS id A937720009
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed,  4 Mar 2020 14:43:26 +0000 (UTC)
Received: by mail-ed1-f49.google.com with SMTP id n18so2580034edw.9
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 04 Mar 2020 06:43:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=uu9BrKVBwA0W0OPBRaAkQz0hdtkDSw4Ly/FjU3gmsMg=;
 b=uuKRR9kwIpaSeX8HxT7DCwrfbazGcn89u6lqf6EDNCjVPejCIsfT2yHUFbhnas3xhW
 FJtyqPRH878EsWjQp7A5wH5ZOVQUcKsDh884spPMd266Q70FjM9tkQClY2QCJHh+X56r
 3HLkFoYHPUtjcMrAXaxcMAP1QjTdGXxTw6Y7IhQ4JVzhN2nGJhfE39DpVadcMFPHG+he
 xFIzz7K2IwfMoZ4wfEHSfIrlUCAteGM5aaU9A4nAOCyU+Ap5dKUgDd94UqIyXlnYGIpa
 /gWg+aUYR8nievP4Wh4U+OZgMrmRP/TRus3U1rCMS2SOa9+a54lKWptEuSCtWhi1Qmy6
 qyDg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=uu9BrKVBwA0W0OPBRaAkQz0hdtkDSw4Ly/FjU3gmsMg=;
 b=nsKM2CErT4AYBBOUfHHpE1QhFBdfe9BXoPv8erW0ZqloZSi+iStpsbTpAWWozyL98o
 I99BY9tuz7G3mSnmFOEmpEl8Jn0d+xUXyIhITkre2duCLOpD53fsd1ZYuHjczpOjsM2o
 bQ+mbrpVJtv0EMztgxDOPGfQbM8WwMQTDHfr/0aIXBMTuafwexZEyvHrs/EjVC68VxXs
 +5LKrg9jtejSXRIcPFnJgaK4tubCj1VOq2oHsTj0oIdOp/PSd5yxWhatq19akb37keKC
 V5ovU+YLl5Ob7jtq8e9AY0lUVULZiRWtiBHqs5Y4Hvhpzs050J5GsqJ4ySHWK3g4IFD5
 7Hrw==
X-Gm-Message-State: ANhLgQ3bpBoozoyT9VeGxmSsUKMOFaqaYYNsWRSUQTywHbUNeRgMRJ/r
 psLwA3UjD4h47D6jfnRRYtMMIinuI7pyGjlXP2bJO+Be
X-Google-Smtp-Source: ADFU+vvDMSJhS8YW1YF5rjgR7vU2CMkz+anGZhqLLByr9ig02gZ0EiyyNKyDqdEV9DoGS4MctKUrldwtNNgBQzJZWRw=
X-Received: by 2002:a17:906:7d5:: with SMTP id
 m21mr2875151ejc.356.1583333005022; 
 Wed, 04 Mar 2020 06:43:25 -0800 (PST)
MIME-Version: 1.0
References: <CALJw2w4ENV3y3Ufu=YRquDNwvQnewcwGHOe1njw8-ztNXJF-XQ@mail.gmail.com>
 <202003041435.17644.luke@dashjr.org>
In-Reply-To: <202003041435.17644.luke@dashjr.org>
From: Greg Sanders <gsanders87@gmail.com>
Date: Wed, 4 Mar 2020 09:43:13 -0500
Message-ID: <CAB3F3DtruOW8q7E8=wP+Jf-bdcPGrypgXjFjcABrD1qQcrX+gg@mail.gmail.com>
To: Luke Dashjr <luke@dashjr.org>, 
 Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Content-Type: multipart/alternative; boundary="000000000000535b2905a0087121"
Subject: Re: [bitcoin-dev] RFC: Kicking BIP-322 (message signing) into motion
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, 04 Mar 2020 14:43:28 -0000

--000000000000535b2905a0087121
Content-Type: text/plain; charset="UTF-8"

OP_MESSAGEONLY would make "dumb" signers like HWW more difficult to
support. They'd have to do script interpretation to make sure they're not
signing something real with funds.

Just FYI.

On Wed, Mar 4, 2020 at 9:35 AM Luke Dashjr via bitcoin-dev <
bitcoin-dev@lists.linuxfoundation.org> wrote:

> In addition to starting with proof-of-funds instead of proof-of-receiver,
> it
> would be nice to integrate with Taproot somehow or another. Perhaps
> OP_MESSAGEONLY is the most straightforward way to do this? It might be a
> good
> idea to have a message type after the opcode too.
>
> On Wednesday 04 March 2020 06:23:53 Karl-Johan Alm via bitcoin-dev wrote:
> > Hello,
> >
> > I noticed recently that a PR to Bitcoin Core that pretty much touched
> > everything my BIP-322 pull request touches (around the same
> > complexity) was merged without a thought given to BIP-322
> > compatibility, despite the BIP-322 PR being open for 2x the time. I
> > can only conclude from this that people dislike BIP-322 in its current
> > form, which the 9 month old pull request stagnating can probably
> > attest to.
> >
> > There are several things that I can do to make this a bit more
> > appealing to people, which would hopefully kick the progress on this
> > forward. I have already put in a non-trivial amount of energy and
> > effort into maintaining the pull request as is, so I'd prefer if
> > people were harsh and unfiltered in their criticism rather than polite
> > and buffered, so I can beat this thing into shape (or abandon it, in
> > the worst case).
> >
> > =============
> > 1. People use signmessage as a way to prove funds. This is misleading
> > and should be discouraged; throw the sign message stuff out and
> > replace it entirely with a prove funds system.
> >
> > I know in particular luke-jr is of this opinion, and Greg Maxwell in
> > https://github.com/bitcoin/bitcoin/pull/16440#issuecomment-568194168
> > leans towards this opinion as well, it seems.
> >
> > =============
> > 2. Use a transaction rather than a new format; make the first input's
> > txid the message hash to ensure the tx cannot be broadcasted. This has
> > the benefit of being able to provide to an existing hardware wallet
> > without making any modifications to its firmware.
> >
> > I think Mark Friedenbach and Johnson Lau are of this opinion, except
> > Johnson Lau also suggests that the signature hash is modified, see
> > https://github.com/bitcoin/bips/pull/725#issuecomment-420040430 --
> > which defeats the benefit above since now hw wallets can no longer
> > sign.
> >
> > Prusnak (I think he works at Trezor; apologies if I am mistaken) is
> > against this idea, and proposes (3) below:
> > https://github.com/bitcoin/bips/pull/725#issuecomment-420210488
> >
> > =============
> > 3. Use Trezor style
> >
> > See https://github.com/trezor/trezor-mcu/issues/169
> >
> > This has the benefit of already being adopted (which clearly BIP-322
> > is failing hard at right now), but has the drawback that we can no
> > longer do *generic* signing; we are stuck with the exact same
> > limitations as in the legacy system, which we kinda wanted to fix in
> > the updated version.
> >
> > =============
> > 4. Introduce OP_MESSAGEONLY
> >
> > Quoting Johnson Lau at
> > https://github.com/bitcoin/bips/pull/725#issuecomment-420421058 :
> > """
> > OP_MESSAGEONLY means the script following the code would never be
> > valid. For example, a scriptPubKey:
> >
> > OP_IF OP_MESSAGEONLY <key_m> OP_ELSE <key_s> OP_ENDIF OP_CHECKSIG
> >
> > For messaging purpose, OP_MESSAGEONLY is considered as OP_NOP and is
> > ignored. A message could be signed with either key_m or key_s.
> >
> > For spending, only key_s is valid.
> >
> > I don't think it is a big problem to consume a op_code. If this is a
> > real concern, I could modify it as follow: in message system,
> > OP_RETURN will pop the top stack. If top stack is msg in hex, it is
> > ignored. Otherwise, the script fails.
> > """
> >
> > =============
> > 5. Some other solution
> > _______________________________________________
> > bitcoin-dev mailing list
> > bitcoin-dev@lists.linuxfoundation.org
> > https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>
> _______________________________________________
> bitcoin-dev mailing list
> bitcoin-dev@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>

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

<div dir=3D"ltr">OP_MESSAGEONLY would make &quot;dumb&quot; signers like HW=
W more difficult to support. They&#39;d have to do script interpretation to=
 make sure they&#39;re not signing something real with funds.<div><br></div=
><div>Just FYI.</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" =
class=3D"gmail_attr">On Wed, Mar 4, 2020 at 9:35 AM Luke Dashjr via bitcoin=
-dev &lt;<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org">bitcoin-d=
ev@lists.linuxfoundation.org</a>&gt; wrote:<br></div><blockquote class=3D"g=
mail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204=
,204,204);padding-left:1ex">In addition to starting with proof-of-funds ins=
tead of proof-of-receiver, it <br>
would be nice to integrate with Taproot somehow or another. Perhaps <br>
OP_MESSAGEONLY is the most straightforward way to do this? It might be a go=
od <br>
idea to have a message type after the opcode too.<br>
<br>
On Wednesday 04 March 2020 06:23:53 Karl-Johan Alm via bitcoin-dev wrote:<b=
r>
&gt; Hello,<br>
&gt;<br>
&gt; I noticed recently that a PR to Bitcoin Core that pretty much touched<=
br>
&gt; everything my BIP-322 pull request touches (around the same<br>
&gt; complexity) was merged without a thought given to BIP-322<br>
&gt; compatibility, despite the BIP-322 PR being open for 2x the time. I<br=
>
&gt; can only conclude from this that people dislike BIP-322 in its current=
<br>
&gt; form, which the 9 month old pull request stagnating can probably<br>
&gt; attest to.<br>
&gt;<br>
&gt; There are several things that I can do to make this a bit more<br>
&gt; appealing to people, which would hopefully kick the progress on this<b=
r>
&gt; forward. I have already put in a non-trivial amount of energy and<br>
&gt; effort into maintaining the pull request as is, so I&#39;d prefer if<b=
r>
&gt; people were harsh and unfiltered in their criticism rather than polite=
<br>
&gt; and buffered, so I can beat this thing into shape (or abandon it, in<b=
r>
&gt; the worst case).<br>
&gt;<br>
&gt; =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br>
&gt; 1. People use signmessage as a way to prove funds. This is misleading<=
br>
&gt; and should be discouraged; throw the sign message stuff out and<br>
&gt; replace it entirely with a prove funds system.<br>
&gt;<br>
&gt; I know in particular luke-jr is of this opinion, and Greg Maxwell in<b=
r>
&gt; <a href=3D"https://github.com/bitcoin/bitcoin/pull/16440#issuecomment-=
568194168" rel=3D"noreferrer" target=3D"_blank">https://github.com/bitcoin/=
bitcoin/pull/16440#issuecomment-568194168</a><br>
&gt; leans towards this opinion as well, it seems.<br>
&gt;<br>
&gt; =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br>
&gt; 2. Use a transaction rather than a new format; make the first input&#3=
9;s<br>
&gt; txid the message hash to ensure the tx cannot be broadcasted. This has=
<br>
&gt; the benefit of being able to provide to an existing hardware wallet<br=
>
&gt; without making any modifications to its firmware.<br>
&gt;<br>
&gt; I think Mark Friedenbach and Johnson Lau are of this opinion, except<b=
r>
&gt; Johnson Lau also suggests that the signature hash is modified, see<br>
&gt; <a href=3D"https://github.com/bitcoin/bips/pull/725#issuecomment-42004=
0430" rel=3D"noreferrer" target=3D"_blank">https://github.com/bitcoin/bips/=
pull/725#issuecomment-420040430</a> --<br>
&gt; which defeats the benefit above since now hw wallets can no longer<br>
&gt; sign.<br>
&gt;<br>
&gt; Prusnak (I think he works at Trezor; apologies if I am mistaken) is<br=
>
&gt; against this idea, and proposes (3) below:<br>
&gt; <a href=3D"https://github.com/bitcoin/bips/pull/725#issuecomment-42021=
0488" rel=3D"noreferrer" target=3D"_blank">https://github.com/bitcoin/bips/=
pull/725#issuecomment-420210488</a><br>
&gt;<br>
&gt; =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br>
&gt; 3. Use Trezor style<br>
&gt;<br>
&gt; See <a href=3D"https://github.com/trezor/trezor-mcu/issues/169" rel=3D=
"noreferrer" target=3D"_blank">https://github.com/trezor/trezor-mcu/issues/=
169</a><br>
&gt;<br>
&gt; This has the benefit of already being adopted (which clearly BIP-322<b=
r>
&gt; is failing hard at right now), but has the drawback that we can no<br>
&gt; longer do *generic* signing; we are stuck with the exact same<br>
&gt; limitations as in the legacy system, which we kinda wanted to fix in<b=
r>
&gt; the updated version.<br>
&gt;<br>
&gt; =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br>
&gt; 4. Introduce OP_MESSAGEONLY<br>
&gt;<br>
&gt; Quoting Johnson Lau at<br>
&gt; <a href=3D"https://github.com/bitcoin/bips/pull/725#issuecomment-42042=
1058" rel=3D"noreferrer" target=3D"_blank">https://github.com/bitcoin/bips/=
pull/725#issuecomment-420421058</a> :<br>
&gt; &quot;&quot;&quot;<br>
&gt; OP_MESSAGEONLY means the script following the code would never be<br>
&gt; valid. For example, a scriptPubKey:<br>
&gt;<br>
&gt; OP_IF OP_MESSAGEONLY &lt;key_m&gt; OP_ELSE &lt;key_s&gt; OP_ENDIF OP_C=
HECKSIG<br>
&gt;<br>
&gt; For messaging purpose, OP_MESSAGEONLY is considered as OP_NOP and is<b=
r>
&gt; ignored. A message could be signed with either key_m or key_s.<br>
&gt;<br>
&gt; For spending, only key_s is valid.<br>
&gt;<br>
&gt; I don&#39;t think it is a big problem to consume a op_code. If this is=
 a<br>
&gt; real concern, I could modify it as follow: in message system,<br>
&gt; OP_RETURN will pop the top stack. If top stack is msg in hex, it is<br=
>
&gt; ignored. Otherwise, the script fails.<br>
&gt; &quot;&quot;&quot;<br>
&gt;<br>
&gt; =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br>
&gt; 5. Some other solution<br>
&gt; _______________________________________________<br>
&gt; bitcoin-dev mailing list<br>
&gt; <a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" target=3D"_bl=
ank">bitcoin-dev@lists.linuxfoundation.org</a><br>
&gt; <a href=3D"https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-=
dev" rel=3D"noreferrer" target=3D"_blank">https://lists.linuxfoundation.org=
/mailman/listinfo/bitcoin-dev</a><br>
<br>
_______________________________________________<br>
bitcoin-dev mailing list<br>
<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" target=3D"_blank">=
bitcoin-dev@lists.linuxfoundation.org</a><br>
<a href=3D"https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" =
rel=3D"noreferrer" target=3D"_blank">https://lists.linuxfoundation.org/mail=
man/listinfo/bitcoin-dev</a><br>
</blockquote></div>

--000000000000535b2905a0087121--