Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id C113D504 for ; Fri, 28 Jun 2019 02:44:28 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-yw1-f44.google.com (mail-yw1-f44.google.com [209.85.161.44]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 0933B13A for ; Fri, 28 Jun 2019 02:44:27 +0000 (UTC) Received: by mail-yw1-f44.google.com with SMTP id s5so2633013ywd.9 for ; Thu, 27 Jun 2019 19:44:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bitcoinbank.co.jp; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UikQbEXlERtp8i+0KU6alV8FHf21Np+/0AyU0tkJ1Zw=; b=kVvP38GAkjKVR3hLboku2jBJznbHzqBYhnSc1ZmSQA2YMBx0weXZ7H9fYD5NZqagog C80SO1sP/dLL/STgSMNzWWqjNgG7tc11xGIptFSdel5WdrQBsFh84q4QTaW5J51P1Z5S ImWclQVpfys4yh03j0tX+baoSCodncXW0p+a/jEE139bM+WM8bbkXu414W2dKRDjYMts DS9xA8NvZghhinpL4MqDj2ZBlFn3mQJfjbkshInVqWNZQ4zw3jytaC0sCQ6Geo77+Y9O 6/5ZPTcH7j5Gea8F1/m8wOuIa9FUjF8t8UZIjhdlTQJzH8WgLrpR6y6nU1lzLGHE7u56 L4jw== 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=UikQbEXlERtp8i+0KU6alV8FHf21Np+/0AyU0tkJ1Zw=; b=ZGj3Pv2yFp6QaRdzpvSTOiQ44cFC5IPia+mnHPXFFY4KuGbpDNs9/lgb/DVHORPUkZ 5BR8gL7P1yqK/+NQQGf7fSryE6Km5LniHacqOefH4AJgrtjaZMjaQGMqC1aw99ZAq2Af yoWJ7und8Q2kytWaTvPygrQYPLkxE1POSwAh4qEU6nNIbqjx/T3UT71EfXBeJF86gibS lfeVg6T+o3ixfCK4wyCcHEKozSvoYC4ir9v1OXR55+GNR3FA1i7N5qAxSjyQR+Z36tmh epEccL1Ofm5iQdcFdbdgsXDwJB6r18Q/VxVo1Ev01a/2kMyZ43EF8lTj8FsP+mtYcc0Q jj+w== X-Gm-Message-State: APjAAAW3d/3ayxAU/H4xML3KaYx9bVNb0/eK92amON+Wq39wfBGEB7T/ ATg4ireUVPrAmLe5DnfM82tbfi8Dqb1g7+1dLEL3 X-Google-Smtp-Source: APXvYqyWARvE9w9WnK41jQA8ks3KZ8flH2Un6A+YuOiUyaU9ckjCHyDC2hHbKmVmlbYg+j0pON8F94BlNzCO3qgD5f0= X-Received: by 2002:a0d:d656:: with SMTP id y83mr4362486ywd.79.1561689866985; Thu, 27 Jun 2019 19:44:26 -0700 (PDT) MIME-Version: 1.0 References: <20190627095031.4d5817b8@simplexum.com> <20190627122916.3b6c2c32@simplexum.com> <20190627134628.4d131264@simplexum.com> <20190627142120.2c24fddb@simplexum.com> <20190627150745.GA1897@coinkite.com> In-Reply-To: <20190627150745.GA1897@coinkite.com> From: Jonathan Underwood Date: Fri, 28 Jun 2019 11:44:15 +0900 Message-ID: To: Peter Gray Content-Type: multipart/alternative; boundary="000000000000c57b29058c594174" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HTML_MESSAGE, 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 X-Mailman-Approved-At: Fri, 28 Jun 2019 03:20:46 +0000 Cc: Bitcoin development mailing list Subject: Re: [bitcoin-dev] BIP174 extension proposal (Global Type: PSBT_GLOBAL_XPUB_SIGNATURE) 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, 28 Jun 2019 02:44:28 -0000 --000000000000c57b29058c594174 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Peter, tl;dr The problem this solves is "How can a signer verify an address with HD changing the address every time?" As an aside: (This is sort of explaining the current PR for the 0x01 global field (separate from mine)) The problem is more easily understood with change addresses: If someone can alter my PSBT before signing, they could replace my change address with their address, and my signer would not know unless the signer just guesses all the path sets it knows, then derives thousands of change addresses and searches (most likely a signer is offline, so gap limit doesn't work since we can't tell which change addresses have tx history. So the 0x01 global tag will tell the signer "here's how you get from your master private key to the xpub used in the change output's output BIP32_DERIVATION tag... you can then derive the same key and check it is yours before signing." Back to my proposal, this problem extends across wallets, since, for example, if I want to send from my cold wallet to my warm wallet, I don't want to give my cold signer my warm master key just so it can derive and check the key. That's what signatures are for. So this proposal says "A signer can be built to only sign if it sees a signature that itself has signed, then from that signed xpub(s) derives the BIP32_DERIVATION in the outputs, and if the output doesn't match it will reject and not sign" This creates a sort of "chain of trust" for the wallet. Currently the best way to prevent this (hacker swapping the send to address) without using signatures is to reuse the same address every time you want to send to the warm wallet, since after a few times, the signers (people) will be able to remember the address. This is a huge HD drawback for high security requirement environments. Having this data in the PSBT standard will allow Trezor etc. to create an enforceable whitelist feature. Let me know if you have feedback on the details. Thanks, Jon 2019=E5=B9=B46=E6=9C=8828=E6=97=A5(=E9=87=91) 0:07 Peter D. Gray : > I haven't studied the new proposal in depth, but my first impression is: > > Wouldn't it just be easier and better to just sign the entire "outputs" > section of the PSBT? > > The signature would cover every byte, and therefore would cover any > future BIP additions to the outputs area, and also help non-multisig > cases today. > > --- > Peter D. Gray || Founder, Coinkite || Twitter: @dochex || GPG: > A3A31BAD 5A2A5B10 > > --=20 ----------------- Jonathan Underwood =E3=83=93=E3=83=83=E3=83=88=E3=83=90=E3=83=B3=E3=82=AF=E7=A4=BE =E3=83=81= =E3=83=BC=E3=83=95=E3=83=93=E3=83=83=E3=83=88=E3=82=B3=E3=82=A4=E3=83=B3=E3= =82=AA=E3=83=95=E3=82=A3=E3=82=B5=E3=83=BC ----------------- =E6=9A=97=E5=8F=B7=E5=8C=96=E3=81=97=E3=81=9F=E3=83=A1=E3=83=83=E3=82=BB=E3= =83=BC=E3=82=B8=E3=82=92=E3=81=8A=E9=80=81=E3=82=8A=E3=81=AE=E6=96=B9=E3=81= =AF=E4=B8=8B=E8=A8=98=E3=81=AE=E5=85=AC=E9=96=8B=E9=8D=B5=E3=82=92=E3=81=94= =E5=88=A9=E7=94=A8=E4=B8=8B=E3=81=95=E3=81=84=E3=80=82 =E6=8C=87=E7=B4=8B: 0xCE5EA9476DE7D3E45EBC3FDAD998682F3590FEA3 --000000000000c57b29058c594174 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Peter,

tl;dr The problem this solves= is "How can a signer verify an address with HD changing the address e= very time?"

As an aside: (This is sort of exp= laining the current PR for the 0x01 global field (separate from mine))
The problem is more easily understood with change addresses: If someo= ne can alter my PSBT before signing, they could replace my change address w= ith their address, and my signer would not know unless the signer just gues= ses all the path sets it knows, then derives thousands of change addresses = and searches (most likely a signer is offline, so gap limit doesn't wor= k since we can't tell which change addresses have tx history. So the 0x= 01 global tag will tell the signer "here's how you get from your m= aster private key to the xpub used in the change output's output BIP32_= DERIVATION tag... you can then derive the same key and check it is yours be= fore signing."

Back to my proposal, this problem extends across= wallets, since, for=C2=A0example, if I want to send from my cold wallet to= my warm wallet, I don't want to give my cold signer my warm master key= just so it can derive and check the key. That's what signatures are fo= r. So this proposal says "A signer can be built to only sign if it see= s a signature that itself has signed, then from that signed xpub(s) derives= the BIP32_DERIVATION in the outputs, and if the output doesn't match i= t will reject and not sign"

This creates a so= rt of "chain of trust" for the wallet.

C= urrently the best way to prevent this (hacker swapping the send to address)= without using signatures is to reuse the same address every time you want = to send to the warm wallet, since after a few times, the signers (people) w= ill be able to remember the address.

This is a hug= e HD drawback for high security requirement environments. Having this data = in the PSBT standard will allow Trezor etc. to create an enforceable whitel= ist feature.

Let me know if you have feedback on t= he details.

Thanks,
Jon

<= div class=3D"gmail_quote">
2019=E5=B9= =B46=E6=9C=8828=E6=97=A5(=E9=87=91) 0:07 Peter D. Gray <peter@coinkite.com>:
I haven't studied the new proposal in= depth, but my first impression is:

Wouldn't it just be easier and better to just sign the entire "out= puts" section of the PSBT?

The signature would cover every byte, and therefore would cover any
future BIP additions to the outputs area, and also help non-multisig
cases today.

---
Peter D. Gray=C2=A0 ||=C2=A0 Founder, Coinkite=C2=A0 ||=C2=A0 Twitter: @doc= hex=C2=A0 ||=C2=A0 GPG: A3A31BAD 5A2A5B10



--
-----------------
Jonathan Underwood
= =E3=83=93=E3=83=83=E3=83=88=E3=83=90=E3=83=B3=E3=82=AF=E7=A4=BE=E3=80=80=E3= =83=81=E3=83=BC=E3=83=95=E3=83=93=E3=83=83=E3=83=88=E3=82=B3=E3=82=A4=E3=83= =B3=E3=82=AA=E3=83=95=E3=82=A3=E3=82=B5=E3=83=BC
----------------= -

=E6=9A=97=E5=8F=B7=E5=8C=96=E3=81=97=E3=81=9F=E3= =83=A1=E3=83=83=E3=82=BB=E3=83=BC=E3=82=B8=E3=82=92=E3=81=8A=E9=80=81=E3=82= =8A=E3=81=AE=E6=96=B9=E3=81=AF=E4=B8=8B=E8=A8=98=E3=81=AE=E5=85=AC=E9=96=8B= =E9=8D=B5=E3=82=92=E3=81=94=E5=88=A9=E7=94=A8=E4=B8=8B=E3=81=95=E3=81=84=E3= =80=82

=E6=8C=87=E7=B4=8B: 0xCE5EA9476DE7D3E45EBC3= FDAD998682F3590FEA3
--000000000000c57b29058c594174--