Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 118C6918 for ; Tue, 22 Aug 2017 19:26:53 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id C6363485 for ; Tue, 22 Aug 2017 19:26:52 +0000 (UTC) Received: by mail-wm0-f43.google.com with SMTP id l19so734553wmi.1 for ; Tue, 22 Aug 2017 12:26:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=S8XpsGJ/aKGYQ6guy6+UqG3v6M8PfSL4Jeur1tSSToY=; b=HHGfp2AJgR7UOQ0NPabBWE8L1VvlnEu5OwOsb7bF34UcOwWGdQEX5+x6TSJjvmeWVY Si1buVzc/tWbq1d+BczOAWMYnkx8vyCxZ835w07q/IJrwl3Ems4LXE6GazlgpXkCxg9T R4UVnP0ABmN3PiJNk/lwAwAUDARd3UbE41385EwF6mTxe9alYDQ79MIhot/TV9Jtuk5G fuDirG+wdkecL4vOqjAE2pEwytewmipH+jV4O4O6dtYriIzoWuKu8E/f1EP65IiM9pk0 AQ35mYXy7L6b8HLbZC9gFR4Dr0uFcj3lKsRHt0rhX7LmvnlLa1NETGLyWQa9X6bFb2im 7gZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=S8XpsGJ/aKGYQ6guy6+UqG3v6M8PfSL4Jeur1tSSToY=; b=WzC7gaBT1EQs4HxF/upTw1d02i4YR2xtXkVcVSKZ1jnXmnsEfag9sGzg6BQNCgh78l cLFPYRnWnZgGGsU1hlotBokuswROauhKPDgZj3cNYP+/DZzkAbOU3XnYuej0Z43Y6h0y mbAIrLQUaJr4H+jAyNUiCT1yLHBEgDHT/3YNQWR/NuUrDkVqKr/v2+lgcA1aPEDw08hs WSyWQ6sxcehw0xqr+mvKB3R5ftB00H79SPILWCcKQvZZ3SBA9WDQubkxQfPsDxaAATqL ScBm1W1EyzKG5POZWvM1ppkpFR1DA7l91DBC4Rp9ljV5EYdqdkar1VaKv1SYMtkEzLMY O1Uw== X-Gm-Message-State: AHYfb5iSPUB3LgoC2DNgBMd9AAMqftDjX1UCr2mF3cPxH+HxICrrSYqZ IrETstahdtoF9ylqAO7bOxLfVypXDA== X-Received: by 10.80.146.220 with SMTP id l28mr951476eda.160.1503430011389; Tue, 22 Aug 2017 12:26:51 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.129.163 with HTTP; Tue, 22 Aug 2017 12:26:30 -0700 (PDT) In-Reply-To: <5f67d70d-a432-7826-22df-4207580aa1d2@gmail.com> References: <5f67d70d-a432-7826-22df-4207580aa1d2@gmail.com> From: Greg Sanders Date: Tue, 22 Aug 2017 12:26:30 -0700 Message-ID: To: Jochen Hoenicke Content-Type: multipart/alternative; boundary="f403045c1b50c60e4a05575c931b" Cc: Bitcoin Protocol Discussion Subject: Re: [bitcoin-dev] [BIP Proposal] Partially Signed Bitcoin Transaction (PSBT) format 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: Tue, 22 Aug 2017 19:26:53 -0000 --f403045c1b50c60e4a05575c931b Content-Type: text/plain; charset="UTF-8" If 'x' is public, that makes it identifiable and privacy-losing across inputs. To avoid "re-use" I suppose you'd want to sign some message like `HMAC("ownership proof", H(A || x) )` instead. Otherwise any signature you make using `A` ends up being used as a proof you don't know the input(this seems like just details but to be more clear)... To reiterate: Sign `HMAC("ownership proof", H(A || x) )` using `A`. Public verifiers see `HMAC("ownership proof", some_random_hash_connected_to_A )` and the HWW that owns that input can recreate `some_random_hash_connected_to_A` by `H(A || x) )` On Mon, Aug 21, 2017 at 2:36 PM, Jochen Hoenicke wrote: > On 21.08.2017 20:12, Greg Sanders via bitcoin-dev wrote: > > To fix this I consulted with andytoshi and got something we think works > > for both cases: > > > > 1) When a signing device receives a partially signed transaction, all > > inputs must come with a ownership proof: > > - For the input at address A, a signature over H(A || x) using the key > > for A. 'x' is some private fixed key that only the signing device > > knows(most likely some privkey along some unique bip32 path). > > - For each input ownership proof, the HW wallet validates each signature > > over the hashed message, then attempts to "decode" the hash by applying > > its own 'x'. If the hash doesn't match, it cannot be its own input. > > - Sign for every input that is yours > > Interesting, basically a proof of non-ownership :), a proof that the > hardware wallet doesn't own the address. > > But shouldn't x be public, so that the device can verify the signature? > Can you expand on this, what is exactly signed with which key and how is > it checked? > > One also has to make sure that it's not possible to reuse signatures as > ownership proof that were made for a different purpose. > > Jochen > --f403045c1b50c60e4a05575c931b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
If 'x' is public, that makes it identifiable and p= rivacy-losing across inputs.

To avoid "re-use&= quot; I suppose you'd want to sign some message like `HMAC("owners= hip proof", H(A || x) )` instead. Otherwise any signature you make usi= ng `A` ends up being used as a proof you don't know the input(this seem= s like just details but to be more clear)...

To reiterate:

Sign `HMAC("ownership proof&qu= ot;, H(A || x) )` using `A`. Public verifiers see `HMAC("ownership pro= of", some_random_hash_connected_to_A )` and the HWW that owns that inp= ut can recreate `some_random_hash_connected_to_A` by `H(A || x) )`

On Mon, Aug 21= , 2017 at 2:36 PM, Jochen Hoenicke <hoenicke@gmail.com> wro= te:
On 21.08.2017 20:12, Greg Sanders vi= a bitcoin-dev wrote:
> To fix this I consulted with andytoshi and got something we think work= s
> for both cases:
>
> 1) When a signing device receives a partially signed transaction, all<= br> > inputs must come with a ownership proof:
> - For the input at address A, a signature over H(A || x) using the key=
> for A. 'x' is some private fixed key that only the signing dev= ice
> knows(most likely some privkey along some unique bip32 path).
> - For each input ownership proof, the HW wallet validates each signatu= re
> over the hashed message, then attempts to "decode" the hash = by applying
> its own 'x'. If the hash doesn't match, it cannot be its o= wn input.
> - Sign for every input that is yours

Interesting, basically a proof of non-ownership :), a proof that the=
hardware wallet doesn't own the address.

But shouldn't x be public, so that the device can verify the signature?=
Can you expand on this, what is exactly signed with which key and how is it checked?

One also has to make sure that it's not possible to reuse signatures as=
ownership proof that were made for a different purpose.

=C2=A0 Jochen

--f403045c1b50c60e4a05575c931b--