Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 8D650ACC for ; Mon, 21 Oct 2019 11:00:40 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-qk1-f181.google.com (mail-qk1-f181.google.com [209.85.222.181]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 9915D89B for ; Mon, 21 Oct 2019 11:00:39 +0000 (UTC) Received: by mail-qk1-f181.google.com with SMTP id u184so12144596qkd.4 for ; Mon, 21 Oct 2019 04:00:39 -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 :cc; bh=rG0A+Zpo6ELgI/pQUwZtqnZJPNWCs7wfxuZi5j+J0BY=; b=U+ZwKP4k4DyoeInL7SqFOb3bBiFy9krE9JxME/bXG0eZlAEVRukC7ICsELlgliwqVb i/CwhAg55EQy/QPHSFatis0tnDpqyR36WkWvLVdf4REHMxVnPmgPD7mKK6dK+JBgZR4T PRiy30DE22NpU+u8bxDTMi5I71+VHPYWKOZoAA0Dcb6EExXU5qdwWBnFv+Mzc1rWmypB 7yW55fZzRf3dBORzbDkFeUCbTnSx8JsdFl6DK+mIutnbtle0W677eOvSf05rbDJmuUHH csDG94R1RCoVKaexjOf+4ZbM3F01baiZ4wASPxW8zA2kFbGTEQmCo4UlmRWvQ/EkO/jo Fv+A== 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=rG0A+Zpo6ELgI/pQUwZtqnZJPNWCs7wfxuZi5j+J0BY=; b=nO/C6BRlhaWPHm+QjeYz5iIX66+Xu7awNOe4llbyRMtmvSL2KqOEaIGFwYEXZdn0d9 S3ScH7SxixiWzH7CO8r3jHCIdk37K0/YUKSd3Czw2THNvNu7hv9KRql16qGTRUj/n+9P GBqmlKj0DWkV/bzL29EBPxoXxnl+l3P7qqYrt4k2QbrbhM0waC8Hi3+nq9uWrKfh2pdu jKubQqlV2stYleKGOjf9avnBoyet42Iu0kHfUKcrK0JS5ztwcAKyS4SzgcLRjGgxLVL1 KyRuoybEjciALrWNWRDkFhdQCzkHN4Z8Xws1oHjCXEIfurJxTyFrf7kffLbFA58T5KaP YsJg== X-Gm-Message-State: APjAAAW1uU5sCbJnr1zPmZKrnceiuQVfYmqfB4KWFqA9ZnRPDjB3zPrX 41tXRTkXamEqxcbcYMxAIl8eBhu5R47hgeY5piF8/Q== X-Google-Smtp-Source: APXvYqxpVAy98b1GZ+89uCZKgRSEEkJdacLTsaCI/BiwU+hKIEIDqFDpVrOqXyq1TuGH2WiMuBEYZZFCExpr/FDjJB0= X-Received: by 2002:a37:9a8a:: with SMTP id c132mr19142651qke.92.1571655638112; Mon, 21 Oct 2019 04:00:38 -0700 (PDT) MIME-Version: 1.0 References: <20191021000608.ajvzjxh6phtuhydp@ganymede> In-Reply-To: <20191021000608.ajvzjxh6phtuhydp@ganymede> From: Riccardo Casatta Date: Mon, 21 Oct 2019 13:00:26 +0200 Message-ID: To: "David A. Harding via bitcoin-dev" Content-Type: multipart/alternative; boundary="00000000000004df6605956998d3" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, 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: Mon, 21 Oct 2019 15:13:22 +0000 Cc: SomberNight Subject: Re: [bitcoin-dev] Draft BIP for SNICKER 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: Mon, 21 Oct 2019 11:00:40 -0000 --00000000000004df6605956998d3 Content-Type: text/plain; charset="UTF-8" The "Receiver" could immediately create a tx that spend the coinjoin outputs to bip32 keys, The hard part is that he had to delay the broadcast otherwise he loose privacy Il giorno lun 21 ott 2019 alle ore 02:08 David A. Harding via bitcoin-dev < bitcoin-dev@lists.linuxfoundation.org> ha scritto: > On Sun, Oct 20, 2019 at 12:29:25AM +0000, SomberNight via bitcoin-dev > wrote: > > waxwing, ThomasV, and I recently had a discussion about implementing > > SNICKER in Electrum; specifically the "Receiver" role. > > That'd be awesome! > > > As the referenced section [0] explains, the "Receiver" can restore > > from seed, and assuming he knows he needs to do extra scanning steps > > (e.g. via a seed version that signals SNICKER support), he can find > > and regain access to his SNICKER outputs. However, to calculate `c` he > > needs access to his private keys, as it is the ECDH of one of the > > Receiver's pubkeys and one of the Proposer's pubkeys. > > > > This means the proposed scheme is fundamentally incompatible with > > watch-only wallets. > > > > [0] > https://gist.github.com/AdamISZ/2c13fb5819bd469ca318156e2cf25d79#Storage_of_Keys > > Your logic seems correct for the watching half of the wallet, but I > think it's ok to consider requiring interaction with the cold wallet. > Let's look at the recovery procedure from the SNICKER documentation > that you kindly cited: > > 1. Derive all regular addresses normally (doable watch-only for > wallets using public BIP32 derivation) > > 2. Find all transactions spending an output for each of those > addresses. Determine whether the spend looks like a SNICKER > coinjoin (e.g. "two equal-[value] outputs"). (doable watch-only) > > 3. "For each of those transactions, check, for each of the two equal > sized outputs, whether one destination address can be regenerated > from by taking c found in the method described above" (not doable > watch only; requires private keys) > > I'd expect the set of candidate transactions produced in step #2 to be > pretty small and probably with no false positives for users not > participating in SNICKER coinjoins or doing lots of payment batching. > That means, if any SNICKER candidates were found by a watch-only wallet, > they could be compactly bundled up and the user could be encouraged to > copy them to the corresponding cold wallet using the same means used for > PSBTs (e.g. USB drive, QR codes, etc). You wouldn't even need the whole > transactions, just the BIP32 index of the user's key, the pubkey of the > suspected proposer, and a checksum of the resultant address. > > The cold wallet could then perform step #3 using its private keys and > return a file/QRcode/whatever to the hot wallet telling it any shared > secrets it found. > > This process may need to be repeated several times if an output created > by one SNICKER round is spent in a subsequent SNICKER round. This can be > addressed by simply refusing to participate in chains of SNICKER > transactions or by refusing to participant in chains of SNICKERs more > than n long (requring a maximum n rounds of recovery). It could also be > addressed by the watching-only wallet looking ahead at the block chain a > bit in order to grab SNICKER-like child and grandchild transactions of > our SNICKER candidates and sending them also to the cold wallet for > attempted shared secret recovery. > > The SNICKER recovery process is, of course, only required for wallet > recovery and not normal wallet use, so I don't think a small amount of > round-trip communication between the hot wallet and the cold wallet is > too much to ask---especially since anyone using SNICKER with a > watching-only wallet must be regularly interacting with their cold > wallet anyway to sign the coinjoins. > > -Dave > _______________________________________________ > bitcoin-dev mailing list > bitcoin-dev@lists.linuxfoundation.org > https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev > -- Riccardo Casatta - @RCasatta --00000000000004df6605956998d3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The= "Receiver" could immediately create a tx that spend the coinjoin= outputs to bip32 keys,
The hard part is that he had to delay the broadcast otherwise = he loose privacy

Il giorno lun 21 ott 2019 alle ore 02:08 David A.= Harding via bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org> ha scritto:
On Sun, Oct 20, 2019 a= t 12:29:25AM +0000, SomberNight via bitcoin-dev wrote:
> waxwing, ThomasV, and I recently had a discussion about implementing > SNICKER in Electrum; specifically the "Receiver" role.

That'd be awesome!

> As the referenced section [0] explains, the "Receiver" can r= estore
> from seed, and assuming he knows he needs to do extra scanning steps > (e.g. via a seed version that signals SNICKER support), he can find > and regain access to his SNICKER outputs. However, to calculate `c` he=
> needs access to his private keys, as it is the ECDH of one of the
> Receiver's pubkeys and one of the Proposer's pubkeys.
>
> This means the proposed scheme is fundamentally incompatible with
> watch-only wallets.
>
> [0] https://gis= t.github.com/AdamISZ/2c13fb5819bd469ca318156e2cf25d79#Storage_of_Keys
Your logic seems correct for the watching half of the wallet, but I
think it's ok to consider requiring interaction with the cold wallet. Let's look at the recovery procedure from the SNICKER documentation
that you kindly cited:

=C2=A0 =C2=A0 1. Derive all regular addresses normally (doable watch-only f= or
=C2=A0 =C2=A0 wallets using public BIP32 derivation)

=C2=A0 =C2=A0 2. Find all transactions spending an output for each of those=
=C2=A0 =C2=A0 addresses.=C2=A0 Determine whether the spend looks like a SNI= CKER
=C2=A0 =C2=A0 coinjoin (e.g. "two equal-[value] outputs").=C2=A0 = (doable watch-only)

=C2=A0 =C2=A0 3. "For each of those transactions, check, for each of t= he two equal
=C2=A0 =C2=A0 sized outputs, whether one destination address can be regener= ated
=C2=A0 =C2=A0 from by taking c found in the method described above" (n= ot doable
=C2=A0 =C2=A0 watch only; requires private keys)

I'd expect the set of candidate transactions produced in step #2 to be<= br> pretty small and probably with no false positives for users not
participating in SNICKER coinjoins or doing lots of payment batching.
That means, if any SNICKER candidates were found by a watch-only wallet, they could be compactly bundled up and the user could be encouraged to
copy them to the corresponding cold wallet using the same means used for PSBTs (e.g. USB drive, QR codes, etc).=C2=A0 You wouldn't even need the= whole
transactions, just the BIP32 index of the user's key, the pubkey of the=
suspected proposer, and a checksum of the resultant address.

The cold wallet could then perform step #3 using its private keys and
return a file/QRcode/whatever to the hot wallet telling it any shared
secrets it found.

This process may need to be repeated several times if an output created
by one SNICKER round is spent in a subsequent SNICKER round.=C2=A0 This can= be
addressed by simply refusing to participate in chains of SNICKER
transactions or by refusing to participant in chains of SNICKERs more
than n long (requring a maximum n rounds of recovery).=C2=A0 It could also = be
addressed by the watching-only wallet looking ahead at the block chain a bit in order to grab SNICKER-like child and grandchild transactions of
our SNICKER candidates and sending them also to the cold wallet for
attempted shared secret recovery.

The SNICKER recovery process is, of course, only required for wallet
recovery and not normal wallet use, so I don't think a small amount of<= br> round-trip communication between the hot wallet and the cold wallet is
too much to ask---especially since anyone using SNICKER with a
watching-only wallet must be regularly interacting with their cold
wallet anyway to sign the coinjoins.

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


--
Riccardo Casatta - @RCasatta
--00000000000004df6605956998d3--