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
|
Return-Path: <ZmnSCPxj@protonmail.com>
Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])
by lists.linuxfoundation.org (Postfix) with ESMTP id 76D8EC0051
for <bitcoin-dev@lists.linuxfoundation.org>;
Thu, 20 Aug 2020 21:38:33 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by silver.osuosl.org (Postfix) with ESMTP id 59F8122122
for <bitcoin-dev@lists.linuxfoundation.org>;
Thu, 20 Aug 2020 21:38:33 +0000 (UTC)
X-Virus-Scanned: amavisd-new at osuosl.org
Received: from silver.osuosl.org ([127.0.0.1])
by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id HDMsV1mkpZtu
for <bitcoin-dev@lists.linuxfoundation.org>;
Thu, 20 Aug 2020 21:38:29 +0000 (UTC)
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6
Received: from mail4.protonmail.ch (mail4.protonmail.ch [185.70.40.27])
by silver.osuosl.org (Postfix) with ESMTPS id 4C83A204BF
for <bitcoin-dev@lists.linuxfoundation.org>;
Thu, 20 Aug 2020 21:38:29 +0000 (UTC)
Date: Thu, 20 Aug 2020 21:38:16 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
s=protonmail; t=1597959506;
bh=EJphkyuL38lOSdg32iC5YmGj9PfWVOtK4vMFfU7BTxM=;
h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From;
b=SP7LVnlt16BBMRRBMd6cnrJ1SIpg/bQIsJGNIw+DZSd8Y/D6asZij3MvxS7vfL87L
9u1bTmqlhsQkJ68BZtpxXFG8ylJla4XnFzoiiR9etmcP7Fyja7KbPAU16rUQ+TupXM
P4v6ucQKNLqBUeE5OQTLP6ilukrDHjkt1AYITZZg=
To: Nadav Kohen <nadav@suredbits.com>
From: ZmnSCPxj <ZmnSCPxj@protonmail.com>
Reply-To: ZmnSCPxj <ZmnSCPxj@protonmail.com>
Message-ID: <eoSHJi6wcD_oq5w9XBzj91Q8bn_fGKIjyQ_F1xxKDUhuyjhKeJrUXVE315lC0G9VrN7DakXC-D9Yds7DQ5TVaHai_caCAnugp7SsgFYaH_Y=@protonmail.com>
In-Reply-To: <CALGTLwPOhHwXULLOhpEzbKxb0V-kjZWLRdnZ90T9RWxFSwuu4w@mail.gmail.com>
References: <813e51a1-4252-08c0-d42d-5cef32f684bc@riseup.net>
<xhRsCejqgUjoLy5hPMHgFcZdiqJsO7TfS0azWhis9-tvSgXodoKe7gN5IXyiVIVqUWSm7FoY-aBUaJCCDgixdWUN4n8EzhQlSNshsQeIFsw=@protonmail.com>
<CALGTLwPOhHwXULLOhpEzbKxb0V-kjZWLRdnZ90T9RWxFSwuu4w@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Cc: Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Subject: Re: [bitcoin-dev] Detailed protocol design for routed
multi-transaction CoinSwap
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.15
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: Thu, 20 Aug 2020 21:38:33 -0000
Good morning Nadav,
> Hey Chris and all,
>
> Looking good :) I have one major concern though
>
> >=C2=A0 =C2=A0 q =3D EC privkey generated by maker
> >=C2=A0 =C2=A0 Q =3D q.G =3D EC pubkey published by maker
> >
> >=C2=A0 =C2=A0 p =3D nonce generated by taker
> >=C2=A0 =C2=A0 P =3D p.G =3D nonce point calculated by taker
> >
> >=C2=A0 =C2=A0 R =3D Q + P =3D pubkey used in bitcoin transaction
> >=C2=A0 =C2=A0 =C2=A0 =3D (q + p).G
>
> If I'm understanding this correctly (which I'm not sure I ame), it seems =
like the plan is to put R on-chain as the key to an output? As stated this =
is completely=C2=A0insecure as Q is known in advance so the taker can alway=
s choose a nonce p but then claim that their nonce point is p.G - Q so that=
the key that goes on-chain is (p.G - Q=C2=A0+ Q) =3D p.G allowing them to =
steal the funds.
My reading from this is that nonce `p` has to be given by the taker to the =
maker outright.
In original post:
> Taker sends unsigned transaction which pays to multisig using pubkey Q,
> and also sends nonce p.
Thus, taker provides a proof-of-knowledge, i.e. the actual `p` scalar itsel=
f (not zero-knowledge, but what the maker needs is proof-of-knowledge, and =
could not care less if the proof is zero-knowledge or not).
On the other hand, I do not see the point of this tweak if you are going to=
use 2p-ECDSA, since my knowledge is that 2p-ECDSA uses the pubkey that is =
homomorphic to the product of the private keys.
And that pubkey is already tweaked, by the fresh privkey of the maker (and =
the maker is buying privacy and wants security of the swap, so is incentivi=
zed to generate high-entropy temporary privkeys for the actual swap operati=
on).
Not using 2p-ECDSA of some kind would remove most of the privacy advantages=
of CoinSwap.
You cannot hide among `2 <A> <B> 2 OP_CHECKMULTISIG` scripts of Lightning, =
because:
* Lightning channel closes tend to be weeks at least after the funding outp=
oint creation, whereas CoinSwap envisions hours or days.
* Lightning mutual channel closes have a very high probability of spending =
to two P2WPKH addresses.
You need to hide among the much larger singlesig anonymity set, which means=
using a single signature (created multiparty by both participants), not tw=
o signatures (one from each participant).
Or is this intended for HTLCs in open-coded SCRIPTs `OP_DUP OP_IF OP_HASH16=
0 <hash> OP_EQUAL <A> OP_ELSE <time> OP_CHECKSEQUENCEVERIFY OP_DROP <B> OP_=
ENDIF OP_CHECKSIG`?
This provides a slight privacy boost in a case (contract transaction public=
ation) where most of the privacy is lost anyway.
Regards,
ZmnSCPxj
|