Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 2184F1029 for ; 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 ; Fri, 4 Oct 2019 05:55:04 +0000 (UTC) Received: by mail-ed1-f51.google.com with SMTP id h2so4750309edn.3 for ; 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: In-Reply-To: From: =?UTF-8?B?5pyo44OO5LiL44GY44KH44Gq?= Date: Fri, 4 Oct 2019 14:54:52 +0900 Message-ID: To: Jimmy Song via bitcoin-dev 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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 x6x0cK3XLClASLLDomm7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FbkKY2GQl13ztWp82QYJZpj5af6dmyUosurn6AZABEBAAHCwF8EGAEIABMF 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
Hi Jimmy,

The only time I could see thi= s being a problem is in the case of a fork-coin.
Otherwise the li= kelihood=C2=A0that two unrelated networks could have a tx with an id that i= s identical are low.

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.
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 w= ere able to separate PSBTs via network info, it won't matter if there&#= 39;s no replay protection anyways, so giving a false sense of security in t= hinking "I have explicitly stated my network so I should be ok" (= developers will think this, I guarantee) is actually a security minus IMO.<= /div>

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

Cheers,
Jon

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

I wanted to propose a new key in the global context for B= IP174, Partially-Signed Bitcoin Transactions.

=3D = Rationale

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'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' and 1' as coins for= mainnet Bitcoin and testnet Bitcoin respectively.

=3D Proposal

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>
Best,

Jimmy

<= /div>
_______________________________________________
bitcoin-dev mailing list
= bitcoin-dev@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mail= man/listinfo/bitcoin-dev


--
-----BEGIN PGP PUBLIC KEY = BLOCK-----

xsBNBFTmJ8oBB/9rd+7= XLxZG/x/KnhkVK2WBG8ySx91fs+qQfHIK1JrakSV3
x6x0cK3XLClASLLDomm7Od3= Q/fMFzdwCEqj6z60T8wgKxsjWYSGL3mq8ucdv
iBjC3wGauk5dQKtT7tkCFyQQbX/= uMsBM4ccGBICoDmIJlwJIj7fAZVqGxGOM
bO1RhYb4dbQA2qxYP7wSsHJ6/ZNAXyE= phOj6blUzdqO0exAbCOZWWF+E/1SC
EuKO4RmL7Imdep7uc2Qze1UpJCZx7ASHl2I= Z4UD0G3Qr3pI6/jvNlaqCTa3U
3/YeJwEubFsd0AVy0zs809RcKKgX3W1q+hVDTeW= inem9RiOG/vT+Eec/ABEB
AAHNI2tpbm9zaGl0YSA8a2lub3NoaXRham9uYUBnbWF= pbC5jb20+wsByBBAB
CAAmBQJU5ifRBgsJCAcDAgkQRB9iZ30dlisEFQgCCgMWAgE= CGwMCHgEAAC6Z
B/9otobf0ASHYdlUBeIPXdDopyjQhR2RiZGYaS0VZ5zzHYLDDMW= 6ZIYm5CjO
Fc09ETLGKFxH2RcCOK2dzwz+KRU4xqOrt/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