summaryrefslogtreecommitdiff
path: root/b2/65520d2898bbe7faa6510af6ed6cdf72e6208e
blob: 962153cef601d3e53c3efc170852e200ed2dff27 (plain)
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
Return-Path: <nadav@suredbits.com>
Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])
 by lists.linuxfoundation.org (Postfix) with ESMTP id 64CF8C07FF
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Fri,  3 Apr 2020 16:37:30 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by whitealder.osuosl.org (Postfix) with ESMTP id 4CB9A88305
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Fri,  3 Apr 2020 16:37:30 +0000 (UTC)
X-Virus-Scanned: amavisd-new at osuosl.org
Received: from whitealder.osuosl.org ([127.0.0.1])
 by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id P3IvDyCk9nTI
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Fri,  3 Apr 2020 16:37:28 +0000 (UTC)
X-Greylist: from auto-whitelisted by SQLgrey-1.7.6
Received: from mail-io1-f50.google.com (mail-io1-f50.google.com
 [209.85.166.50])
 by whitealder.osuosl.org (Postfix) with ESMTPS id 97F16882BB
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Fri,  3 Apr 2020 16:37:28 +0000 (UTC)
Received: by mail-io1-f50.google.com with SMTP id o127so8208506iof.0
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Fri, 03 Apr 2020 09:37:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=suredbits-com.20150623.gappssmtp.com; s=20150623;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
 bh=77rdOYMG4j0bxS2KbpPnyIbEeeMoph123jbvCDUl4Cs=;
 b=th1g0lkq1bP2wGfp/2QRDWxMM7d3Hh2+iko/FrdX6hpWC7i8BYNGMvCJRJo+WqzQaj
 rwFXdzGhnzfdeg8NJFLTcWkp43KsIXckDFQ6yM4hP5De6aLTsG4lcnSL1IoJnQaGLI47
 RR7D4S64gkXmEQRxiCCYKprF87brSrfaNLAhKaH5sIEz0YFxOWpkfkFWPfZ+iw71QFJy
 BkdI1t4Orbn1RtoOXmlp7RrM4haGeTxUtwuXGyr7dtbcTJoN0uK9RC149Z3ZqzTjKjkD
 x7GHbN04CpjjzsbAWRZVSUsY0m4NkCShTzcWhVDx7LaCEPpLx6IUh0V9Y9sbDYmom0Jy
 XuEA==
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=77rdOYMG4j0bxS2KbpPnyIbEeeMoph123jbvCDUl4Cs=;
 b=a8rUmR15ABstusF2vLTFUclJ7cJMhsYpfHQbOBxfhxUQ74IKF2sbJ796V6hEgXWmvl
 hOzZrT6B4ExvfhNRPR+wbahkcTun4HPQuXURq0iwidCYq3t9k6mB3KsQocDRxVK1c8I4
 9krCtCCSClcuQH77aSQjHzs2iW8UG73wTxfJnJbhtMZAdDaJfooW213fITsbeHZhXePo
 uPm2ECfy3JS3XDXQ5OK37AkUEYy4gf/YjoxhHheAVzFEQ/Ma0GEA9mIFurb657SMp920
 51gjQJhxI/WKosN7uPdSMfM0tHxjkMANjNu8feea8CmGNJMAQyU2SjbUHkMnzzf4lqC2
 k50A==
X-Gm-Message-State: AGi0PuZKZk0TlTQcU+OD6oJQ+rDi+mHDxdODuN824TE6hmIZzW1GdHYI
 rRYaSlV7guPNJTqfsTkAFiLGFtsgL0kKXP1FCdfNkg94HgM=
X-Google-Smtp-Source: APiQypK/KigjB0T8JhNv9xfrO0Gbs3YgwS88QPXONqwNYzF5dOCfZo3I+2Fmc9zOHchrkasjLXlIdXZSxgdAX495L48=
X-Received: by 2002:a5e:de45:: with SMTP id e5mr8159147ioq.37.1585931847699;
 Fri, 03 Apr 2020 09:37:27 -0700 (PDT)
MIME-Version: 1.0
References: <CAJvkSseW9OZ50yQiS7e0zt9tQt4v9aoikgGs_54_kMN-ORkQgw@mail.gmail.com>
 <20200331103508.asvxujkhtifj6n7i@ganymede>
 <CAJvkSsfWoTTUOUYjQDrP-xrwB8FwAGUaDKSrYX3=-+wAE3yDLA@mail.gmail.com>
 <CAJvkSseMqFUJD7rj1AAZPMy0Hf6tufkvrHFgzsViPEirWMWx_A@mail.gmail.com>
In-Reply-To: <CAJvkSseMqFUJD7rj1AAZPMy0Hf6tufkvrHFgzsViPEirWMWx_A@mail.gmail.com>
From: Nadav Kohen <nadav@suredbits.com>
Date: Fri, 3 Apr 2020 11:37:15 -0500
Message-ID: <CALGTLwOu+R6ZmzYb4ESc9kjgrpspmmdWogF_Z=msQB8dTqD0xQ@mail.gmail.com>
To: Tom Trevethan <tom@commerceblock.com>, 
 Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Content-Type: multipart/alternative; boundary="0000000000006ba3f005a265887f"
X-Mailman-Approved-At: Fri, 03 Apr 2020 16:40:26 +0000
Subject: Re: [bitcoin-dev] Statechain implementations
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: Fri, 03 Apr 2020 16:37:30 -0000

--0000000000006ba3f005a265887f
Content-Type: text/plain; charset="UTF-8"

Hey all,

So my main concern with the proposal as written is that the Statechain
Entity (SE) can untraceably scam its users with the following attack:

1) Buy the utxo (have it transferred to a key it knows), this first step
can be skipped if the utxo was created by the SE.
2) Transfer the UTXO to someone else, let it be for however long
3) When it wishes to steal the UTXO, the SE now knows its own shard s_n and
it  knows the full private key, x, from when it owned the UTXO (and had
both shards), and so it can compute x/s_n = the current users shard. It can
then sign for the current user, and forge a state transition to a key it
owns before spending the UTXO on chain.

The main problem here is that the user who had their funds stolen cannot
prove to anyone that this has happened since the attack compromises their
key.
That said, I think this problem is easily fixed by adding a new user key to
the protocol with which they must sign in order for the transfer to be
considered valid on the state chain. This way, if the SE wishes to steal
the funds (which they still can), at least it is traceable/provable that
this SE is not trustworthy as there is no evidence of a valid transfer for
the funds that have been stolen.

Best,
Nadav

On Thu, Apr 2, 2020 at 7:22 PM Tom Trevethan via bitcoin-dev <
bitcoin-dev@lists.linuxfoundation.org> wrote:

> Thanks for all of the input and comments - I do now think that the
> decrementing nSequence relative locktime backup system with kick-off
> transaction is the way to go, including a fee penalty via CPFP to
> disincentivise DoS, as suggested.
> I have started a more detailed document specifying the proposed protocol
> in more detail:
> https://github.com/commerceblock/mercury/blob/master/statechains.md which
> includes improvements to the transfer mechanism (and an explanation of how
> this can be used to transfer/novate positions in DLCs). Always happy to get
> more feedback or PRs.
>
> Tom
>
> On Tue, Mar 31, 2020 at 12:41 PM Tom Trevethan <tom@commerceblock.com>
> wrote:
>
>> Hi David,
>>
>> Just for clarity, I left nChain over 2 years ago (having worked there
>> since 2016). While there, I (along with other researchers) were given free
>> rein to work on any ideas we wanted to. I had been interested in the
>> scaling of Bitcoin off-chain, and this was one of several things I spent
>> time on (including things like sidechains, pegs and threshold signatures).
>> This patent application came out of an idea I had to transfer ownership of
>> UTXOs off-chain that has some similarities to the statechains proposal,
>> which has shown there is interest and demand for this type of system.
>>
>> Although I think the existence of this application is something to be
>> mindful of, there are several important things to note:
>>
>> 1. Although there are similarities, the current ideas are significantly
>> different to those in the application.
>> 2. The key transfer protocol as described in the application is not
>> secure (for several reasons, including as discussed above, by Albert and
>> Bob etc.) - and a different mechanism is required.
>> 3. Decrementing timelocks (as suggested in the application) are prior art
>> (Decker-Wattenhofer 2015), and in any case any implementation will most
>> likely use an 'invalidation tree' relative locktime backup mechanism for
>> open-ended UTXOs.
>> 4. The patent application has not been granted (it was made in May 2017)
>> and the international search report rejected it on the grounds of prior
>> art.
>>
>> Tom
>>
>> On Tue, Mar 31, 2020 at 11:36 AM David A. Harding <dave@dtrt.org> wrote:
>>
>>> On Wed, Mar 25, 2020 at 01:52:10PM +0000, Tom Trevethan via bitcoin-dev
>>> wrote:
>>> > Hi all,
>>> >
>>> > We are starting to work on an implementation of the statechains
>>> concept (
>>> >
>>> https://medium.com/@RubenSomsen/statechains-non-custodial-off-chain-bitcoin-transfer-1ae4845a4a39
>>> ),
>>> >
>>> > [...]
>>> > There are two main modifications we are looking at:
>>> > [...]
>>> >
>>> > 2. Replacing the 2-of-2 multisig output (paying to statechain entity
>>> SE key
>>> > and transitory key) with a single P2(W)PKH output where the public key
>>> > shared between the SE and the current owner. The SE and the current
>>> owner
>>> > can then sign with a 2-of-2 ECDSA MPC.
>>>
>>> Dr. Trevethan,
>>>
>>> Would you be able to explain how your proposal to use statechains with
>>> 2P-ECDSA relates to your patent assigned to nChain Holdings for "Secure
>>> off-chain blockchain transactions"?[1]
>>>
>>>     [1] https://patents.google.com/patent/US20200074464A1
>>>
>>> Here are some excerpts from the application that caught my attention in
>>> the context of statechains in general and your proposal to this list in
>>> particular:
>>>
>>> > an exchange platform that is trusted to implement and operate the
>>> > transaction protocol, without requiring an on-chain transaction. The
>>> > off-chain transactions enable one computer system to generate multiple
>>> > transactions that are recordable to a blockchain in different
>>> > circumstances
>>> >
>>> > [...]
>>> >
>>> > at least some of the off-chain transactions are valid for recording on
>>> > the blockchain even in the event of a catastrophic failure of the
>>> > exchange (e.g., exchange going permanently off-line or loosing key
>>> > shares).
>>> >
>>> > [...]
>>> >
>>> > there may be provided a computer readable storage medium including a
>>> > two-party elliptic curve digital signature algorithm (two-party ECDSA)
>>> > script comprising computer executable instructions which, when
>>> > executed, configure a processor to perform functions of a two-party
>>> > elliptic curve digital signature algorithm described herein.
>>> >
>>> > [...]
>>> >
>>> > In this instance the malicious actor would then also have to collude
>>> > with a previous owner of the funds to recreate the full key. Because
>>> > an attack requires either the simultaneous theft of both exchange and
>>> > depositor keys or collusion with previous legitimate owners of funds,
>>> > the opportunities for a malicious attacker to compromise the exchange
>>> > platform are limited.
>>>
>>> Thank you,
>>>
>>> -Dave
>>>
>> _______________________________________________
> bitcoin-dev mailing list
> bitcoin-dev@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>

--0000000000006ba3f005a265887f
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hey all,<div><br></div><div>So my main concern with the pr=
oposal as written is that the Statechain Entity (SE) can untraceably=C2=A0s=
cam its users with the following attack:<br><br></div><div>1) Buy the utxo =
(have it transferred to a key it knows), this first step can be skipped if =
the utxo was created by the SE.</div><div>2) Transfer the UTXO to someone e=
lse, let it be for however long</div><div>3) When it wishes to steal the UT=
XO, the SE now knows its own shard s_n and it=C2=A0 knows the full private =
key, x, from when it owned the UTXO (and had both shards), and so it can co=
mpute x/s_n =3D the current users shard. It can then sign for the current u=
ser, and forge a state transition to a key it owns before spending the UTXO=
 on chain.</div><div><br></div><div>The main problem here is that the user =
who had their funds stolen cannot prove to anyone that this has happened si=
nce the attack compromises their key.</div><div>That said, I think this pro=
blem is easily fixed by adding a new user key to the protocol with which th=
ey must sign in order for the transfer to be considered valid on the state =
chain. This way, if the SE wishes to steal the funds (which they still can)=
, at least it is traceable/provable that this SE is not trustworthy as ther=
e is no evidence of a valid transfer for the funds that have been stolen.</=
div><div><br></div><div>Best,</div><div>Nadav</div></div><br><div class=3D"=
gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Thu, Apr 2, 2020 at 7=
:22 PM Tom Trevethan via bitcoin-dev &lt;<a href=3D"mailto:bitcoin-dev@list=
s.linuxfoundation.org">bitcoin-dev@lists.linuxfoundation.org</a>&gt; wrote:=
<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8=
ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr=
">Thanks for all of the input and comments - I do now think that the decrem=
enting nSequence relative locktime backup system with kick-off transaction =
is the way to go, including a fee penalty via CPFP to disincentivise=C2=A0D=
oS, as suggested.=C2=A0<div>I have started a more detailed document specify=
ing the proposed protocol in more detail:=C2=A0<a href=3D"https://github.co=
m/commerceblock/mercury/blob/master/statechains.md" target=3D"_blank">https=
://github.com/commerceblock/mercury/blob/master/statechains.md</a>=C2=A0whi=
ch includes improvements to the transfer=C2=A0mechanism (and an explanation=
 of how this can be used to transfer/novate positions in DLCs). Always happ=
y to get more feedback or PRs.=C2=A0</div><div><br></div><div>Tom</div></di=
v><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On T=
ue, Mar 31, 2020 at 12:41 PM Tom Trevethan &lt;<a href=3D"mailto:tom@commer=
ceblock.com" target=3D"_blank">tom@commerceblock.com</a>&gt; wrote:<br></di=
v><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;borde=
r-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr">Hi Dav=
id,<div><br></div><div>Just for clarity, I left nChain over 2 years ago (ha=
ving worked there since 2016). While there, I (along with other researchers=
) were given free rein to work on any ideas we wanted to. I had been intere=
sted in the scaling of Bitcoin off-chain, and this was one of several thing=
s I spent time on (including things like sidechains,=C2=A0pegs and threshol=
d signatures). This patent application came out of an idea I had to transfe=
r ownership of UTXOs off-chain that has some similarities to the statechain=
s proposal, which has shown there is interest and demand for this type of s=
ystem.=C2=A0</div><div><br></div><div>Although I think the existence of thi=
s application is something to be mindful of, there are several important th=
ings to note:</div><div><br></div><div>1. Although there are similarities, =
the current ideas are significantly different to those in the application.=
=C2=A0</div><div>2. The key transfer protocol as described in the applicati=
on is not secure (for several reasons, including as discussed above, by Alb=
ert and Bob etc.) - and a different mechanism is required.=C2=A0</div><div>=
3. Decrementing timelocks (as suggested in the application) are prior art (=
Decker-Wattenhofer 2015), and in any case any implementation will most like=
ly use an &#39;invalidation tree&#39; relative locktime backup mechanism fo=
r open-ended UTXOs.=C2=A0</div><div>4. The patent application has not been =
granted (it was made in May 2017) and the international search report rejec=
ted it on the grounds of prior art.=C2=A0</div><div><br></div><div>Tom</div=
></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr"=
>On Tue, Mar 31, 2020 at 11:36 AM David A. Harding &lt;<a href=3D"mailto:da=
ve@dtrt.org" target=3D"_blank">dave@dtrt.org</a>&gt; wrote:<br></div><block=
quote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1=
px solid rgb(204,204,204);padding-left:1ex">On Wed, Mar 25, 2020 at 01:52:1=
0PM +0000, Tom Trevethan via bitcoin-dev wrote:<br>
&gt; Hi all,<br>
&gt; <br>
&gt; We are starting to work on an implementation of the statechains concep=
t (<br>
&gt; <a href=3D"https://medium.com/@RubenSomsen/statechains-non-custodial-o=
ff-chain-bitcoin-transfer-1ae4845a4a39" rel=3D"noreferrer" target=3D"_blank=
">https://medium.com/@RubenSomsen/statechains-non-custodial-off-chain-bitco=
in-transfer-1ae4845a4a39</a>),<br>
&gt;<br>
&gt; [...]<br>
&gt; There are two main modifications we are looking at:<br>
&gt; [...]<br>
&gt; <br>
&gt; 2. Replacing the 2-of-2 multisig output (paying to statechain entity S=
E key<br>
&gt; and transitory key) with a single P2(W)PKH output where the public key=
<br>
&gt; shared between the SE and the current owner. The SE and the current ow=
ner<br>
&gt; can then sign with a 2-of-2 ECDSA MPC. <br>
<br>
Dr. Trevethan,<br>
<br>
Would you be able to explain how your proposal to use statechains with<br>
2P-ECDSA relates to your patent assigned to nChain Holdings for &quot;Secur=
e<br>
off-chain blockchain transactions&quot;?[1]=C2=A0 <br>
<br>
=C2=A0 =C2=A0 [1] <a href=3D"https://patents.google.com/patent/US2020007446=
4A1" rel=3D"noreferrer" target=3D"_blank">https://patents.google.com/patent=
/US20200074464A1</a><br>
<br>
Here are some excerpts from the application that caught my attention in<br>
the context of statechains in general and your proposal to this list in<br>
particular:<br>
<br>
&gt; an exchange platform that is trusted to implement and operate the<br>
&gt; transaction protocol, without requiring an on-chain transaction. The<b=
r>
&gt; off-chain transactions enable one computer system to generate multiple=
<br>
&gt; transactions that are recordable to a blockchain in different<br>
&gt; circumstances<br>
&gt;<br>
&gt; [...]<br>
&gt;<br>
&gt; at least some of the off-chain transactions are valid for recording on=
<br>
&gt; the blockchain even in the event of a catastrophic failure of the<br>
&gt; exchange (e.g., exchange going permanently off-line or loosing key<br>
&gt; shares).<br>
&gt;<br>
&gt; [...]<br>
&gt;<br>
&gt; there may be provided a computer readable storage medium including a<b=
r>
&gt; two-party elliptic curve digital signature algorithm (two-party ECDSA)=
<br>
&gt; script comprising computer executable instructions which, when<br>
&gt; executed, configure a processor to perform functions of a two-party<br=
>
&gt; elliptic curve digital signature algorithm described herein.<br>
&gt;<br>
&gt; [...]<br>
&gt;<br>
&gt; In this instance the malicious actor would then also have to collude<b=
r>
&gt; with a previous owner of the funds to recreate the full key. Because<b=
r>
&gt; an attack requires either the simultaneous theft of both exchange and<=
br>
&gt; depositor keys or collusion with previous legitimate owners of funds,<=
br>
&gt; the opportunities for a malicious attacker to compromise the exchange<=
br>
&gt; platform are limited.<br>
<br>
Thank you,<br>
<br>
-Dave<br>
</blockquote></div>
</blockquote></div>
_______________________________________________<br>
bitcoin-dev mailing list<br>
<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" target=3D"_blank">=
bitcoin-dev@lists.linuxfoundation.org</a><br>
<a href=3D"https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" =
rel=3D"noreferrer" target=3D"_blank">https://lists.linuxfoundation.org/mail=
man/listinfo/bitcoin-dev</a><br>
</blockquote></div>

--0000000000006ba3f005a265887f--