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
|
Return-Path: <ZmnSCPxj@protonmail.com>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
[172.17.192.35])
by mail.linuxfoundation.org (Postfix) with ESMTPS id 8CC6BC6D
for <bitcoin-dev@lists.linuxfoundation.org>;
Wed, 8 May 2019 04:37:43 +0000 (UTC)
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6
Received: from mail-40136.protonmail.ch (mail-40136.protonmail.ch
[185.70.40.136])
by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 7C4EB1FB
for <bitcoin-dev@lists.linuxfoundation.org>;
Wed, 8 May 2019 04:37:42 +0000 (UTC)
Date: Wed, 08 May 2019 04:37:37 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
s=default; t=1557290259;
bh=WIb3iMAHnO3YQLT/XerHmBsuT+Efok/uT2B9b4xNJYE=;
h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:
Feedback-ID:From;
b=w1aFkfkvvMFE9QjptoJIcFGrLjxR/NBg+sjuBTOHHuX9noihnKxCq7+fWYZ+f9/uU
xReyqPmlH/01yboQStn41R9UjJz1sTx8FFZsZKSS+Om+++8LF4lSY/I3WuSLNeIrmP
YqYMXxPWUFwmLHSn2w2sKQzwpY5nqg3mFtrb+ebM=
To: Sjors Provoost <sjors@sprovoost.nl>,
Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
From: ZmnSCPxj <ZmnSCPxj@protonmail.com>
Reply-To: ZmnSCPxj <ZmnSCPxj@protonmail.com>
Message-ID: <2OTGF_pw4RyRk4r84XkFrxdU-wz8m0iRr469ZvlBitshF7K8arSwXkaxdmL-GjTatYbU8DcgWO2zzM2u3EZ3hhjsCUeKHWu0prFoSUmeRUs=@protonmail.com>
In-Reply-To: <34827F16-9061-4317-B91F-250734850EE6@sprovoost.nl>
References: <CAPg+sBg6Gg8b7hPogC==fehY3ZTHHpQReqym2fb4XXWFpMM-pQ@mail.gmail.com>
<201905062017.11396.luke@dashjr.org>
<34827F16-9061-4317-B91F-250734850EE6@sprovoost.nl>
Feedback-ID: el4j0RWPRERue64lIQeq9Y2FP-mdB86tFqjmrJyEPR9VAtMovPEo9tvgA0CrTsSHJeeyPXqnoAu6DN-R04uJUg==:Ext:ProtonMail
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, FROM_LOCAL_NOVOWEL,
RCVD_IN_DNSWL_LOW 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: Thu, 09 May 2019 14:49:07 +0000
Cc: Pieter Wuille <pieter.wuille@gmail.com>
Subject: Re: [bitcoin-dev] Taproot proposal
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.12
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: Wed, 08 May 2019 04:37:43 -0000
Good morning Sjors,
Sent with ProtonMail Secure Email.
=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original Me=
ssage =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90
On Wednesday, May 8, 2019 4:42 AM, Sjors Provoost via bitcoin-dev <bitcoin-=
dev@lists.linuxfoundation.org> wrote:
> Hey Pieter,
>
> I think this is a reasonable collection of changes that make sense in com=
bination. Some initial feedback and questions.
>
> From the BIP:
>
> > If one or more of the spending conditions consist of just a single key =
(after aggregation),
> > he most likely one should be made the internal key. If no such conditio=
n exists, it may
> > be worthwhile adding one that consists of an aggregation of all keys pa=
rticipating in all
> > scripts combined; effectively adding an "everyone agrees" branch. If th=
at is inacceptable,
> > pick as internal key a point with unknown discrete logarithm (TODO).
>
> I assume Luke Dashjr referred to the above when saying:
>
> > Is there any way to use the Taproot construct here while retaining exte=
rnal
> > script limitations that the involved party(ies) cannot agree to overrid=
e?
> > For example, it is conceivable that one might wish to have an unconditi=
onal
> > CLTV enforced in all circumstances.
>
> One reason why someone would want to avoid a "everone agrees" branch, is =
duress (or self-discipline, or limiting powers of a trustee). In particular=
with respect to time-locks.
>
> Can this "unknown discrete logarithm" be made provably unknown, so all si=
gners are assured of this property? Bonus points if the outside world can't=
tell. The exact mechanism could be outside the scope of the BIP, but knowi=
ng that it's possible is useful.
As I understand it, it is possible to take some random data, hash it with S=
HA256 and acquire a 256-bit number.
Then treat that number as an X coordinate (or is it Y...), and see if there=
exists a point on the secp256k1 curve at that coordinate.
If not, try another random data, or just hash the same number again.
As I understand it, about half the possible X coordinates will have a point=
on the curve.
I believe this is the "hash to a point" technique.
The scalar behind the above point cannot be known, unless either the hash f=
unction is broken, or ECDLP is broken.
(perhaps a better cryptographer can give the proper qualifications, any cor=
rections, and etc etc)
As the point is just an arbitrary point on the curve, it is unknown to the =
rest of the world whether somebody knows the scalar, or nobody knows.
>
> Perhaps Lightning devs have an opinion on "everyone agrees" with respect =
to hash pre-images. I suspect there is no benefit in guaranteeing that a pr=
e-image must be revealed or a timeout must be waited for and there's no way=
around that condition.
The "everyone agrees" branch in Lightning is basically the "cooperative clo=
se" of the channel.
So it is not likely we will need an "everyone agrees" branch in the actual =
HTLCs we transfer *within* the channel.
So if we need to use hashes still, we will likely use the "hash to a point"=
technique above.
Or just use pubkeys given by both participants, that should be enough to en=
sure the "everyone agrees" branch is never taken if we write our software s=
uch that we never agree to sign with it (i.e. just get points from both sid=
es and MuSig them; then each side can just erase the scalar generating it f=
rom memory and whatever caches exist on the system; a node might even just =
generate a single random point from a scalar it subsequently erases, and ju=
st use some non-hardened derivation path from that for every HTLC it has to=
make).
This technique is "sufficiently provably unknown" since each participant kn=
ows that it deliberately erased the only means of knowing the complete disc=
rete log by erasing its share.
In short, "everyone agrees" is trivially easy to make "nobody can agree" by=
a single participant never agreeing to let itself be ripped off.
Do note that it is likely Lightning will eventually switch to using payment=
points/scalars instead of hashes/preimages.
This will allow us to have path decorrelation, both within a route, and in =
multiple routes of the same payment.
This is enabled by Schnorr, as this requires Scriptless Script.
(granted 2p-ECDSA also enables Scriptless Script, but we decided to wait fo=
r Schnorr to hit base layer instead)
This means we would be using the "everyone agrees" path only, with everyone=
agreeing to first create a `nLockTime` backout tx, then everyone agreeing =
to create a transaction where one side has knowledge of a secret scalar tha=
t is learned by the other side upon completion of the signature.
Regards,
ZmnSCPxj
|