summaryrefslogtreecommitdiff
path: root/e2/a6806d63968c8621b086e42b504d6475acbdeb
blob: 08558f4c9be660021a7c87ea911313ab8851cc6d (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
Return-Path: <kinoshitajona@gmail.com>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id 2184F1029
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Fri,  4 Oct 2019 05:55:06 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.7.6
Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com
	[209.85.208.51])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 02CF8D3
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Fri,  4 Oct 2019 05:55:04 +0000 (UTC)
Received: by mail-ed1-f51.google.com with SMTP id h2so4750309edn.3
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Thu, 03 Oct 2019 22:55:04 -0700 (PDT)
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; 
	bh=EgKX5n24jwjyJbPPT987oBSa16TfeNSHx5QKeEvcaVI=;
	b=gNn305ZldUSTv+0WRSWMFi14Djn6mdW5iUBFAZ5u18fCLphKdGaYo20m286QObAwSR
	aYJ2ohBzvriqNPUp7Jl2qevI25Fc8ejIXsGglhLUVZXRz2Y2d4C1uMz6HwfJpIXJv0Fz
	iwR6q8qxdNBD05hmrAMyCSuHzWB3ANZeQ6ecAFKoB9Z/unIzlI+sKEg8tRVUHVmoAMoV
	4eLlcNW8F7M1P9XorBUrtsAfey34djyfYLwU9l2dqW44gbBVh7BJTcG4pES7Bld2MHZZ
	LQO2qkvHTjPRTDRzPpUezGUEMwvKlH+yy9oaWBDWKfm/4gzKWYFVuYfq+KZiRxqYWWGT
	9CfA==
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;
	bh=EgKX5n24jwjyJbPPT987oBSa16TfeNSHx5QKeEvcaVI=;
	b=CQ9eUlSpa7CnEtFhAAIipufO/7Vi8BJktxuBi9w5LYOIOIKDouh9+qQk7BIoV9JONg
	1hWF8/AotGfXSxfKKfFZO89CEdC39OxjawlrdEWl5vYnDEcdOctkBsgXQl1Rh9r9RFqq
	F3JUiQ/dJ+wh2uUfuANCivpHhrV/2WfK2o+ffmypaacx5oD6bo1ybNbw5LkNPrTPSaSX
	jeXTE3duQKTDPCzi6tx1uzmAfAQF9d3YsyUTLRtAifcf8kIcN1cjzyOoChSYUaXYx3kX
	a/xGfzAh+yUIBwC9kAEsrtuH60Kc+MWiTC+CY+7DrnAmim4+lzlB+y1I4NImgYEtnjqp
	TxGQ==
X-Gm-Message-State: APjAAAUxgk9pYnHHl9RBeKbBf8Rk0HBQnb55fPlPsq2TFDuFc0fFxiFf
	0SFQfvG5LwIG6dHylgV0Y3Kojrd0jhck/4ViWB8tng==
X-Google-Smtp-Source: APXvYqxIzBreDhfsmXU75xaJeW12v8CYNfGatslei7gRyB5t1xnHgfo6LlXcQgQE2qke3n5Tp0DWPtABc9CJ5jFw0Ik=
X-Received: by 2002:a17:906:1310:: with SMTP id
	w16mr10810614ejb.73.1570168503133; 
	Thu, 03 Oct 2019 22:55:03 -0700 (PDT)
MIME-Version: 1.0
References: <CAJR7vkqjWs2PqLhS2P4LGFc5A5Sh3ZFMOnVPVS9S_8C9HHD=GQ@mail.gmail.com>
In-Reply-To: <CAJR7vkqjWs2PqLhS2P4LGFc5A5Sh3ZFMOnVPVS9S_8C9HHD=GQ@mail.gmail.com>
From: =?UTF-8?B?5pyo44OO5LiL44GY44KH44Gq?= <kinoshitajona@gmail.com>
Date: Fri, 4 Oct 2019 14:54:52 +0900
Message-ID: <CACvEmnH4Qcm3EDNBqQb1GPu0ct5R-JbbZGfUgdiGh_63OMbvgw@mail.gmail.com>
To: Jimmy Song via bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org>
Content-Type: multipart/alternative; boundary="000000000000ddec5b05940f5750"
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID, DKIM_VALID_AU, DOS_RCVD_IP_TWICE_B, FREEMAIL_FROM,
	HTML_MESSAGE, 
	RCVD_IN_DNSWL_NONE,TRACKER_ID 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] PSBT global key for network
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: Fri, 04 Oct 2019 05:55:06 -0000

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

Hi Jimmy,

The only time I could see this being a problem is in the case of a
fork-coin.
Otherwise the likelihood that two unrelated networks could have a tx with
an id that is identical are low.

Everything included in PSBT thus far is info for verifying something
helpful, and providing the information needed for signing and verifying
what will be signed.

Adding a network section will be the inverse of that. The info doesn't help
you verify anything, since I could lie about the network, and you will need
to go out and check the network is as the PSBT says it is anyways.
Network is also not needed for signing.

In fact, come to think of it, even if there was a fork-coin incident, even
if you were able to separate PSBTs via network info, it won't matter if
there's no replay protection anyways, so giving a false sense of security
in thinking "I have explicitly stated my network so I should be ok"
(developers will think this, I guarantee) is actually a security minus IMO.

Currently BitcoinJS only uses network parameters to allow for the use of
addresses in addOutput... but I'm starting to think we should remove it...
not sure...

Cheers,
Jon

2019=E5=B9=B410=E6=9C=884=E6=97=A5(=E9=87=91) 11:04 Jimmy Song via bitcoin-=
dev <
bitcoin-dev@lists.linuxfoundation.org>:

> Hey all,
>
> I wanted to propose a new key in the global context for BIP174,
> Partially-Signed Bitcoin Transactions.
>
> =3D Rationale
>
> Each signer should make sure that the inputs being referenced in the PSBT
> exist (with the exception of a Proof-of-Reserves input). In order to do
> this, it's critical to know which network the coins are on (mainnet or
> testnet). This could potentially be extended to other networks should the=
y
> want to use something like PSBT, much in the same way that HD keys from
> BIP0044 reserved 0' and 1' as coins for mainnet Bitcoin and testnet Bitco=
in
> respectively.
>
> =3D Proposal
>
> Add the key 0x03 for network in the global key-value store. Value is a
> variable integer with 0x00 indicating Bitcoin mainnet and 0x01 indicating
> Bitcoin testnet. Other coins that want to use the PSBT should use the coi=
n
> network number from SLIP-0044 with the high bit removed.
>
> ---------------------------
>
> Best,
>
> Jimmy
>
> _______________________________________________
> bitcoin-dev mailing list
> bitcoin-dev@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>


--=20
-----BEGIN PGP PUBLIC KEY BLOCK-----
Comment: http://openpgpjs.org

xsBNBFTmJ8oBB/9rd+7XLxZG/x/KnhkVK2WBG8ySx91fs+qQfHIK1JrakSV3
x6x0cK3XLClASLLDomm7Od3Q/fMFzdwCEqj6z60T8wgKxsjWYSGL3mq8ucdv
iBjC3wGauk5dQKtT7tkCFyQQbX/uMsBM4ccGBICoDmIJlwJIj7fAZVqGxGOM
bO1RhYb4dbQA2qxYP7wSsHJ6/ZNAXyEphOj6blUzdqO0exAbCOZWWF+E/1SC
EuKO4RmL7Imdep7uc2Qze1UpJCZx7ASHl2IZ4UD0G3Qr3pI6/jvNlaqCTa3U
3/YeJwEubFsd0AVy0zs809RcKKgX3W1q+hVDTeWinem9RiOG/vT+Eec/ABEB
AAHNI2tpbm9zaGl0YSA8a2lub3NoaXRham9uYUBnbWFpbC5jb20+wsByBBAB
CAAmBQJU5ifRBgsJCAcDAgkQRB9iZ30dlisEFQgCCgMWAgECGwMCHgEAAC6Z
B/9otobf0ASHYdlUBeIPXdDopyjQhR2RiZGYaS0VZ5zzHYLDDMW6ZIYm5CjO
Fc09ETLGKFxH2RcCOK2dzwz+KRU4xqOrt/l5gyd50cFE1nOhUN9+/XaPgrou
WhyT9xLeGit7Xqhht93z2+VanTtJAG6lWbAZLIZAMGMuLX6sJDCO0GiO5zxa
02Q2D3kh5GL57A5+oVOna12JBRaIA5eBGKVCp3KToT/z48pxBe3WAmLo0zXr
hEgTSzssfb2zTwtB3Ogoedj+cU2bHJvJ8upS/jMr3TcdguySmxJlGpocVC/e
qxq12Njv+LiETOrD8atGmXCnA+nFNljBkz+l6ADl93jHzsBNBFTmJ9EBCACu
Qq9ZnP+aLU/Rt6clAfiHfTFBsJvLKsdIKeE6qHzsU1E7A7bGQKTtLEnhCCQE
W+OQP+sgbOWowIdH9PpwLJ3Op+NhvLlMxRvbT36LwCmBL0yD7bMqxxmmVj8n
vlMMRSe4wDSIG19Oy7701imnHZPm/pnPlneg/Meu/UffpcDWYBbAFX8nrXPY
vkVULcI/qTcCxW/+S9fwoXjQhWHaiJJ6y3cYOSitN31W9zgcMvLwLX3JgDxE
flkwq/M+ZkfCYnS3GAPEt8GkVKy2eHtCJuNkGFlCAmKMX0yWzHRAkqOMN5KP
LFbkKY2GQl13ztWp82QYJZpj5af6dmyUosurn6AZABEBAAHCwF8EGAEIABMF
AlTmJ9QJEEQfYmd9HZYrAhsMAABKbgf/Ulu5JAk4fXgH0DtkMmdkFiKEFdkW
0Wkw7Vhd5eZ4NzeP9kOkD01OGweT9hqzwhfT2CNXCGxh4UnvEM1ZMFypIKdq
0XpLLJMrDOQO021UjAa56vHZPAVmAM01z5VzHJ7ekjgwrgMLmVkm0jWKEKaO
n/MW7CyphG7QcZ6cJX2f6uJcekBlZRw9TNYRnojMjkutlOVhYJ3J78nc/k0p
kcgV63GB6D7wHRF4TVe4xIBqKpbBhhN+ISwFN1z+gx3lfyRMSmiTSrGdKEQe
XSIQKG8XZQZUDhLNkqPS+7EMV1g7+lOfT4GhLL68dUXDa1e9YxGH6zkpVECw
Spe3vsHZr6CqFg=3D=3D
=3D/vUJ
-----END PGP PUBLIC KEY BLOCK-----

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

<div dir=3D"ltr">Hi Jimmy,<div><br></div><div>The only time I could see thi=
s being a problem is in the case of a fork-coin.</div><div>Otherwise the li=
kelihood=C2=A0that two unrelated networks could have a tx with an id that i=
s identical are low.<br></div><div><br></div><div>Everything included in PS=
BT thus far is info for verifying something helpful, and providing the info=
rmation needed for signing and verifying what will be signed.</div><div><br=
></div><div>Adding a network section will be the inverse of that. The info =
doesn&#39;t help you verify anything, since I could lie about the network, =
and you will need to go out and check the network is as the PSBT says it is=
 anyways.</div><div>Network is also not needed for signing.<br><br>In fact,=
 come to think of it, even if there was a fork-coin incident, even if you w=
ere able to separate PSBTs via network info, it won&#39;t matter if there&#=
39;s no replay protection anyways, so giving a false sense of security in t=
hinking &quot;I have explicitly stated my network so I should be ok&quot; (=
developers will think this, I guarantee) is actually a security minus IMO.<=
/div><div><br></div><div>Currently BitcoinJS only uses network parameters t=
o allow for the use of addresses in addOutput... but I&#39;m starting to th=
ink we should remove it... not sure...</div><div><br></div><div>Cheers,</di=
v><div>Jon</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=
=3D"gmail_attr">2019=E5=B9=B410=E6=9C=884=E6=97=A5(=E9=87=91) 11:04 Jimmy S=
ong via bitcoin-dev &lt;<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation=
.org">bitcoin-dev@lists.linuxfoundation.org</a>&gt;:<br></div><blockquote c=
lass=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px soli=
d rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div>Hey all,</div><d=
iv><br></div><div>I wanted to propose a new key in the global context for B=
IP174, Partially-Signed Bitcoin Transactions.</div><div><br></div><div>=3D =
Rationale</div><div><br></div><div>Each signer should make sure that the in=
puts being referenced in the PSBT exist (with the exception of a Proof-of-R=
eserves input). In order to do this, it&#39;s critical to know which networ=
k the coins are on (mainnet or testnet). This could potentially be extended=
 to other networks should they want to use something like PSBT, much in the=
 same way that HD keys from BIP0044 reserved 0&#39; and 1&#39; as coins for=
 mainnet Bitcoin and testnet Bitcoin respectively.</div><div><br></div><div=
>=3D Proposal</div><div><br></div><div>Add the key 0x03 for network in the =
global key-value store. Value is a variable integer with 0x00 indicating Bi=
tcoin mainnet and 0x01 indicating Bitcoin testnet. Other coins that want to=
 use the PSBT should use the coin network number from SLIP-0044 with the hi=
gh bit removed.</div><div><br></div><div>---------------------------</div><=
div><br></div><div>Best,</div><div><br></div><div>Jimmy<br></div><div><br><=
/div></div>
_______________________________________________<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><br clear=3D"all"><div><br></div>-- <br><div dir=3D"ltr"=
 class=3D"gmail_signature"><div dir=3D"ltr"><div>-----BEGIN PGP PUBLIC KEY =
BLOCK-----</div><div>Comment: <a href=3D"http://openpgpjs.org" target=3D"_b=
lank">http://openpgpjs.org</a></div><div><br></div><div>xsBNBFTmJ8oBB/9rd+7=
XLxZG/x/KnhkVK2WBG8ySx91fs+qQfHIK1JrakSV3</div><div>x6x0cK3XLClASLLDomm7Od3=
Q/fMFzdwCEqj6z60T8wgKxsjWYSGL3mq8ucdv</div><div>iBjC3wGauk5dQKtT7tkCFyQQbX/=
uMsBM4ccGBICoDmIJlwJIj7fAZVqGxGOM</div><div>bO1RhYb4dbQA2qxYP7wSsHJ6/ZNAXyE=
phOj6blUzdqO0exAbCOZWWF+E/1SC</div><div>EuKO4RmL7Imdep7uc2Qze1UpJCZx7ASHl2I=
Z4UD0G3Qr3pI6/jvNlaqCTa3U</div><div>3/YeJwEubFsd0AVy0zs809RcKKgX3W1q+hVDTeW=
inem9RiOG/vT+Eec/ABEB</div><div>AAHNI2tpbm9zaGl0YSA8a2lub3NoaXRham9uYUBnbWF=
pbC5jb20+wsByBBAB</div><div>CAAmBQJU5ifRBgsJCAcDAgkQRB9iZ30dlisEFQgCCgMWAgE=
CGwMCHgEAAC6Z</div><div>B/9otobf0ASHYdlUBeIPXdDopyjQhR2RiZGYaS0VZ5zzHYLDDMW=
6ZIYm5CjO</div><div>Fc09ETLGKFxH2RcCOK2dzwz+KRU4xqOrt/l5gyd50cFE1nOhUN9+/Xa=
Pgrou</div><div>WhyT9xLeGit7Xqhht93z2+VanTtJAG6lWbAZLIZAMGMuLX6sJDCO0GiO5zx=
a</div><div>02Q2D3kh5GL57A5+oVOna12JBRaIA5eBGKVCp3KToT/z48pxBe3WAmLo0zXr</d=
iv><div>hEgTSzssfb2zTwtB3Ogoedj+cU2bHJvJ8upS/jMr3TcdguySmxJlGpocVC/e</div><=
div>qxq12Njv+LiETOrD8atGmXCnA+nFNljBkz+l6ADl93jHzsBNBFTmJ9EBCACu</div><div>=
Qq9ZnP+aLU/Rt6clAfiHfTFBsJvLKsdIKeE6qHzsU1E7A7bGQKTtLEnhCCQE</div><div>W+OQ=
P+sgbOWowIdH9PpwLJ3Op+NhvLlMxRvbT36LwCmBL0yD7bMqxxmmVj8n</div><div>vlMMRSe4=
wDSIG19Oy7701imnHZPm/pnPlneg/Meu/UffpcDWYBbAFX8nrXPY</div><div>vkVULcI/qTcC=
xW/+S9fwoXjQhWHaiJJ6y3cYOSitN31W9zgcMvLwLX3JgDxE</div><div>flkwq/M+ZkfCYnS3=
GAPEt8GkVKy2eHtCJuNkGFlCAmKMX0yWzHRAkqOMN5KP</div><div>LFbkKY2GQl13ztWp82QY=
JZpj5af6dmyUosurn6AZABEBAAHCwF8EGAEIABMF</div><div>AlTmJ9QJEEQfYmd9HZYrAhsM=
AABKbgf/Ulu5JAk4fXgH0DtkMmdkFiKEFdkW</div><div>0Wkw7Vhd5eZ4NzeP9kOkD01OGweT=
9hqzwhfT2CNXCGxh4UnvEM1ZMFypIKdq</div><div>0XpLLJMrDOQO021UjAa56vHZPAVmAM01=
z5VzHJ7ekjgwrgMLmVkm0jWKEKaO</div><div>n/MW7CyphG7QcZ6cJX2f6uJcekBlZRw9TNYR=
nojMjkutlOVhYJ3J78nc/k0p</div><div>kcgV63GB6D7wHRF4TVe4xIBqKpbBhhN+ISwFN1z+=
gx3lfyRMSmiTSrGdKEQe</div><div>XSIQKG8XZQZUDhLNkqPS+7EMV1g7+lOfT4GhLL68dUXD=
a1e9YxGH6zkpVECw</div><div>Spe3vsHZr6CqFg=3D=3D</div><div>=3D/vUJ</div><div=
>-----END PGP PUBLIC KEY BLOCK-----</div></div></div>

--000000000000ddec5b05940f5750--