summaryrefslogtreecommitdiff
path: root/b6/e4354b34457b50f86d5b70b99bc4141a31cb55
blob: 8d8006b3c03d595c4c958009a97ebb49149ba3be (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
332
333
Return-Path: <mark@friedenbach.org>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id C98CFBAE
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Thu, 21 Dec 2017 16:29:21 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.7.6
Received: from mail-pl0-f41.google.com (mail-pl0-f41.google.com
	[209.85.160.41])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id F3E8BCA
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Thu, 21 Dec 2017 16:29:19 +0000 (UTC)
Received: by mail-pl0-f41.google.com with SMTP id i6so11236508plt.13
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Thu, 21 Dec 2017 08:29:19 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=friedenbach-org.20150623.gappssmtp.com; s=20150623;
	h=from:content-transfer-encoding:mime-version:date:subject:message-id
	:references:in-reply-to:to;
	bh=ky77aUk1Lu7c2torijFYAc31Co4U+fpgSPnYNKgKnfU=;
	b=PuxnRFmjd+vSeo1h/ZeObJGDgxA4LlYBpG9gieM6WEAEaMm3QoPZPGpY84KQ46ID/Z
	3Z3TucyxKf/VemIKPmNoySvaNUh5eO1GXTd54hcDSvA7SNGmDgMLWre0jT+i0w8TpoRK
	9loj4d8H49g5tsNRljpfvoyi9V6HxqU0httDAQ1cjITcL2NydfBqLxsXpQmWiiFxKFIH
	kBoWrqycuPxf3jIKp7/HRXQMTtoKCIUOB06mwQUNKkWg4PHy4FG7TH/DTolIEVSgP+Pr
	7EVJ0cwfsjrCUEwIMfEUvZrc/u7ir4qnWu0hSMTFrwfkz9U35SZZFmWIP21gvoJhZeKh
	WHZA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:from:content-transfer-encoding:mime-version:date
	:subject:message-id:references:in-reply-to:to;
	bh=ky77aUk1Lu7c2torijFYAc31Co4U+fpgSPnYNKgKnfU=;
	b=uI5el3nT5vcAqXRhAS+hpF10ixpBx2vdSJQUxAu+QtB2K2jXbg6ck+zokkeSC+xveW
	dQ9INyfpMzRqBj9wA8t+riy8j44halfEhRpTrFEymbgne/5w2mKP33foD7fWWZtcORFL
	4eXV9li3GaMTOcuV7BFRtCxxgUNcRjfxbSd1Dyziqb7iVkWtOx5YfMTvGzePjtlns0iY
	Ag1HESSxqFsejtTzWQPzDfTcysqjJy+KaMFw60zeG0Ml7dWVuc/mL6B77y6uKdhF3w4M
	ZeA77L76MexgkwbYvxvxLaab2G1NaBfV3URl8Z7jSi9zCOElcwix0zv7Gmvcyl0MCqan
	scdw==
X-Gm-Message-State: AKGB3mKr9XBzfK8NhdgL951sdfr/zcBfBHoGlvxcp+TGaeqnwmOCjkIK
	SymzWtXe1WWV8FtUIYRHVCZ+pw==
X-Google-Smtp-Source: ACJfBovRY3HgkWnF9MgXF5S7Zz+3vILJauXShZFyFuB2Q5KIm879c607keC1uTK2Lxzx+vhyqfVX+Q==
X-Received: by 10.84.129.75 with SMTP id 69mr443593plb.161.1513873758667;
	Thu, 21 Dec 2017 08:29:18 -0800 (PST)
Received: from [10.0.0.6] (c-73-170-162-66.hsd1.ca.comcast.net.
	[73.170.162.66]) by smtp.gmail.com with ESMTPSA id
	h190sm18656299pgc.92.2017.12.21.08.29.17
	(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
	Thu, 21 Dec 2017 08:29:17 -0800 (PST)
From: Mark Friedenbach <mark@friedenbach.org>
Content-Type: multipart/alternative;
	boundary=Apple-Mail-A15D2D36-CE67-49E1-9945-63BD08B7F106
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (1.0)
Date: Thu, 21 Dec 2017 08:29:13 -0800
Message-Id: <1EE8D3E5-E9BA-4276-A139-E028D1F0BA4A@friedenbach.org>
References: <CAAUFj10gEPBS3nTZ6aJn4UazhcJKPni6_pYGWwOs+QNeDo9NaA@mail.gmail.com>
	<52b65bab-ff84-7e21-e35a-f6ebd8106767@satoshilabs.com>
	<725C679B-60E2-4E21-9F7D-10F67118D58D@friedenbach.org>
	<PS2P216MB01795FCE6D61A62EBEA79AD79D0D0@PS2P216MB0179.KORP216.PROD.OUTLOOK.COM>
In-Reply-To: <PS2P216MB01795FCE6D61A62EBEA79AD79D0D0@PS2P216MB0179.KORP216.PROD.OUTLOOK.COM>
To: Damian Williamson <willtech@live.com.au>,
	Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
X-Mailer: iPhone Mail (15C153)
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID, HTML_MESSAGE, MIME_QP_LONG_LINE,
	RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
	smtp1.linux-foundation.org
Subject: Re: [bitcoin-dev] Sign / Verify message against SegWit P2SH
	addresses.
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.12
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: Thu, 21 Dec 2017 16:29:21 -0000


--Apple-Mail-A15D2D36-CE67-49E1-9945-63BD08B7F106
Content-Type: text/plain;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable

It doesn=E2=80=99t matter what it does under the hood. The api could be the s=
ame.

> On Dec 21, 2017, at 3:19 AM, Damian Williamson via bitcoin-dev <bitcoin-de=
v@lists.linuxfoundation.org> wrote:
>=20
> In all seriousness, being able to sign a message is an important feature w=
hether it is with Bitcoin Core or, with some other method. It is a good feat=
ure and it would be worthwhile IMHO to update it for SegWit addresses. I don=
't know about renewing it altogether, I like the current simplicity.
>=20
> Regards,
> Damian Williamson
>=20
> ------------------------------------
> Sometimes I like to sign a message just to verify that is what I have said=
.
> -
> Bitcoin: 1PMUf9aaQ41M4bgVbCAPVwAeuKvj8CwxJg
> ------------------------------------
> Signature:
> HwJPqyWF0CbdsR7x737HbNIDoRufsrMI5XYQsKZ+MrWCJ6K7imtLY00sTCmSMDigZxRuoxyYZy=
QUw/lL0m/MV9M=3D
>=20
> (Of course, signed messages will verify better usually with plain text and=
 not HTML interpreted email - need a switch for outlook.com to send plaintex=
t.)
> From: bitcoin-dev-bounces@lists.linuxfoundation.org <bitcoin-dev-bounces@l=
ists.linuxfoundation.org> on behalf of Mark Friedenbach via bitcoin-dev <bit=
coin-dev@lists.linuxfoundation.org>
> Sent: Wednesday, 20 December 2017 8:58 AM
> To: Pavol Rusnak; Bitcoin Protocol Discussion
> Subject: Re: [bitcoin-dev] Sign / Verify message against SegWit P2SH addre=
sses.
> =20
> For what it=E2=80=99s worth, I think it would be quite easy to do better t=
han the implied solution of rejiggering the message signing system to suppor=
t non-P2PKH scripts. Instead, have the signature be an actual bitcoin transa=
ction with inputs that have the script being signed. Use the salted hash of t=
he message being signed as the FORKID as if this were a spin-off with replay=
 protection. This accomplishes three things:
>=20
> (1) This enables signing by any infrastructure out there =E2=80=94 includi=
ng hardware wallets and 2FA signing services =E2=80=94 that have enabled sup=
port for FORKID signing, which is a wide swath of the ecosystem because of B=
itcoin Cash and Bitcoin Gold.
>=20
> (2) It generalizes the message signing to allow multi-party signing setups=
 as complicated (via sighash, etc.) as those bitcoin transactions allow, usi=
ng existing and future tools based on Partially Signed Bitcoin Transactions;=
 and
>=20
> (3) It unifies a single approach for message signing, proof of reserve (wh=
ere the inputs are actual UTXOs), and off-chain colored coins.
>=20
> There=E2=80=99s the issue of size efficiency, but for the single-party mes=
sage signing application that can be handled by a BIP that specifies a templ=
ate for constructing the pseudo-transaction and its inputs from a raw script=
.
>=20
> Mark
>=20
> > On Dec 19, 2017, at 1:36 PM, Pavol Rusnak via bitcoin-dev <bitcoin-dev@l=
ists.linuxfoundation.org> wrote:
> >=20
> > On 08/12/17 19:25, Dan Bryant via bitcoin-dev wrote:
> >> I know there are posts, and an issue opened against it, but is there
> >> anyone writing a BIP for Sign / Verify message against a SegWit address=
?
> >=20
> > Dan, are you still planning to write this BIP?
> >=20
> > --=20
> > Best Regards / S pozdravom,
> >=20
> > Pavol "stick" Rusnak
> > CTO, SatoshiLabs
> > _______________________________________________
> > bitcoin-dev mailing list
> > bitcoin-dev@lists.linuxfoundation.org
> > https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>=20
> _______________________________________________
> 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

--Apple-Mail-A15D2D36-CE67-49E1-9945-63BD08B7F106
Content-Type: text/html;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html><head><meta http-equiv=3D"content-type" content=3D"text/html; charset=3D=
utf-8"></head><body dir=3D"auto">It doesn=E2=80=99t matter what it does unde=
r the hood. The api could be the same.<br><div><br>On Dec 21, 2017, at 3:19 A=
M, Damian Williamson via bitcoin-dev &lt;<a href=3D"mailto:bitcoin-dev@lists=
.linuxfoundation.org">bitcoin-dev@lists.linuxfoundation.org</a>&gt; wrote:<b=
r><br></div><blockquote type=3D"cite"><div>

<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DWindows-12=
52">



<div id=3D"divtagdefaultwrapper" style=3D"font-size: 12pt; color: rgb(0, 0, 0=
); font-family: Calibri,Helvetica,sans-serif,&quot;EmojiFont&quot;,&quot;App=
le Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,NotoColorEmoji,&quot;Segoe U=
I Symbol&quot;,&quot;Android Emoji&quot;,EmojiSymbols;" dir=3D"ltr">
<p style=3D"margin-top:0;margin-bottom:0">In all seriousness, being able to s=
ign a message is an important feature whether it is with Bitcoin Core or, wi=
th some other method. It is a good feature and it would be worthwhile IMHO t=
o update it for SegWit addresses.
 I don't know about renewing it altogether, I like the current simplicity.<b=
r>
</p>
<p style=3D"margin-top:0;margin-bottom:0"><br>
</p>
<p style=3D"margin-top:0;margin-bottom:0">Regards,</p>
<p style=3D"margin-top:0;margin-bottom:0">Damian Williamson<br>
</p>
<p style=3D"margin-top:0;margin-bottom:0"><br>
</p>
<p style=3D"margin-top:0;margin-bottom:0">----------------------------------=
--</p>
<p style=3D"margin-top:0;margin-bottom:0"></p>
<p style=3D"margin: 0px; text-indent: 0px; white-space: pre-wrap;"></p>
<p style=3D"margin: 0px; text-indent: 0px; white-space: pre-wrap;"></p>
<p style=3D"margin: 0px; text-indent: 0px; white-space: pre-wrap;"></p>
<p style=3D"margin: 0px; text-indent: 0px; white-space: pre-wrap;">Sometimes=
 I like to sign a message just to verify that is what I have said.</p>
<p style=3D"margin: 0px; text-indent: 0px; white-space: pre-wrap;">-</p>
<p style=3D"margin: 0px; text-indent: 0px; white-space: pre-wrap;">Bitcoin: 1=
PMUf9aaQ41M4bgVbCAPVwAeuKvj8CwxJg</p>
<p style=3D"margin: 0px; text-indent: 0px; white-space: pre-wrap;"></p>
<p style=3D"margin: 0px; text-indent: 0px; white-space: pre-wrap;"></p>
<p style=3D"margin: 0px; text-indent: 0px; white-space: pre-wrap;"></p>
<p></p>
<p style=3D"margin-top:0;margin-bottom:0">----------------------------------=
--<br>
</p>
Signature:<br>
<span><span><span><span>HwJPqyWF0CbdsR7x737HbNIDoRufsrMI5XYQsKZ+MrWCJ6K7imtL=
Y00sTCmSMDigZxRuoxyYZyQUw/lL0m/MV9M=3D</span><br>
<br>
</span></span></span><span>(Of course, signed messages will verify better us=
ually with plain text and not HTML interpreted email - need a switch for <a h=
ref=3D"http://outlook.com">outlook.com</a> to send plaintext.)</span><br>
<div style=3D"color: rgb(0, 0, 0);">
<hr style=3D"display:inline-block;width:98%" tabindex=3D"-1">
<div id=3D"divRplyFwdMsg" dir=3D"ltr"><font style=3D"font-size:11pt" face=3D=
"Calibri, sans-serif" color=3D"#000000"><b>From:</b> <a href=3D"mailto:bitco=
in-dev-bounces@lists.linuxfoundation.org">bitcoin-dev-bounces@lists.linuxfou=
ndation.org</a> &lt;<a href=3D"mailto:bitcoin-dev-bounces@lists.linuxfoundat=
ion.org">bitcoin-dev-bounces@lists.linuxfoundation.org</a>&gt; on behalf of M=
ark Friedenbach via bitcoin-dev
 &lt;<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org">bitcoin-dev@li=
sts.linuxfoundation.org</a>&gt;<br>
<b>Sent:</b> Wednesday, 20 December 2017 8:58 AM<br>
<b>To:</b> Pavol Rusnak; Bitcoin Protocol Discussion<br>
<b>Subject:</b> Re: [bitcoin-dev] Sign / Verify message against SegWit P2SH a=
ddresses.</font>
<div>&nbsp;</div>
</div>
<div class=3D"BodyFragment"><font size=3D"2"><span style=3D"font-size:11pt;"=
>
<div class=3D"PlainText">For what it=E2=80=99s worth, I think it would be qu=
ite easy to do better than the implied solution of rejiggering the message s=
igning system to support non-P2PKH scripts. Instead, have the signature be a=
n actual bitcoin transaction with inputs
 that have the script being signed. Use the salted hash of the message being=
 signed as the FORKID as if this were a spin-off with replay protection. Thi=
s accomplishes three things:<br>
<br>
(1) This enables signing by any infrastructure out there =E2=80=94 including=
 hardware wallets and 2FA signing services =E2=80=94 that have enabled suppo=
rt for FORKID signing, which is a wide swath of the ecosystem because of Bit=
coin Cash and Bitcoin Gold.<br>
<br>
(2) It generalizes the message signing to allow multi-party signing setups a=
s complicated (via sighash, etc.) as those bitcoin transactions allow, using=
 existing and future tools based on Partially Signed Bitcoin Transactions; a=
nd<br>
<br>
(3) It unifies a single approach for message signing, proof of reserve (wher=
e the inputs are actual UTXOs), and off-chain colored coins.<br>
<br>
There=E2=80=99s the issue of size efficiency, but for the single-party messa=
ge signing application that can be handled by a BIP that specifies a templat=
e for constructing the pseudo-transaction and its inputs from a raw script.<=
br>
<br>
Mark<br>
<br>
&gt; On Dec 19, 2017, at 1:36 PM, Pavol Rusnak via bitcoin-dev &lt;<a href=3D=
"mailto:bitcoin-dev@lists.linuxfoundation.org">bitcoin-dev@lists.linuxfounda=
tion.org</a>&gt; wrote:<br>
&gt; <br>
&gt; On 08/12/17 19:25, Dan Bryant via bitcoin-dev wrote:<br>
&gt;&gt; I know there are posts, and an issue opened against it, but is ther=
e<br>
&gt;&gt; anyone writing a BIP for Sign / Verify message against a SegWit add=
ress?<br>
&gt; <br>
&gt; Dan, are you still planning to write this BIP?<br>
&gt; <br>
&gt; -- <br>
&gt; Best Regards / S pozdravom,<br>
&gt; <br>
&gt; Pavol "stick" Rusnak<br>
&gt; CTO, SatoshiLabs<br>
&gt; _______________________________________________<br>
&gt; bitcoin-dev mailing list<br>
&gt; <a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org">bitcoin-dev@li=
sts.linuxfoundation.org</a><br>
&gt; <a href=3D"https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-d=
ev" id=3D"LPlnk12677" previewremoved=3D"true">
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">bitcoin-dev@lists.l=
inuxfoundation.org</a><br>
<a href=3D"https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" i=
d=3D"LPlnk370485" previewremoved=3D"true">https://lists.linuxfoundation.org/=
mailman/listinfo/bitcoin-dev</a><br>
</div>
</span></font></div>
</div>
</div>


</div></blockquote><blockquote type=3D"cite"><div><span>____________________=
___________________________</span><br><span>bitcoin-dev mailing list</span><=
br><span><a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org">bitcoin-de=
v@lists.linuxfoundation.org</a></span><br><span><a href=3D"https://lists.lin=
uxfoundation.org/mailman/listinfo/bitcoin-dev">https://lists.linuxfoundation=
.org/mailman/listinfo/bitcoin-dev</a></span><br></div></blockquote></body></=
html>=

--Apple-Mail-A15D2D36-CE67-49E1-9945-63BD08B7F106--