Skip to content

Commit a61ac72

Browse files
author
Max Hillebrand
authored
change "tumbler" to "server"
also fix alignment
1 parent 617ee24 commit a61ac72

File tree

1 file changed

+28
-29
lines changed

1 file changed

+28
-29
lines changed

md/partially-blind-swap.md

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,44 @@ Partially Blind Atomic Swap Using Adaptor Signatures
22
===========================
33

44
In this scheme one of the participants of the swap does not learn which coins
5-
are being swapped. For example if Alice as a tumbler service provider engages in
6-
a partially blind atomic swap with the users Bob and Carol, the tumbler would not
7-
be able to determine if a swapped output belongs to Bob or Carol (assuming the
8-
transaction amounts are identical or confidential). This property is very
9-
similar to [TumbleBit](https://eprint.iacr.org/2016/575.pdf) but in the form of
10-
a [scriptlessscript](https://github.com/apoelstra/scriptless-scripts/blob/master/md/atomic-swap.md)
5+
are being swapped. For example if service provider engages in a partially blind
6+
atomic swap with the users Bob and Carol, the server would not be able to
7+
determine if a swapped output belongs to Bob or Carol (assuming the transaction
8+
amounts are identical or confidential). This property is very similar to
9+
[TumbleBit](https://eprint.iacr.org/2016/575.pdf) but in the form of a [scriptlessscript](https://github.com/apoelstra/scriptless-scripts/blob/master/md/atomic-swap.md)
1110
and therefore purely in the elliptic curve discrete logarithm setting.
1211

1312
The basic idea is that the discrete logarithm of the auxiliary point `T` in the
1413
adaptor signature is not chosen uniformly at random by the server. Instead, the user
1514
computes `T = t*G` where `t` is a [blind Schnorr signature](https://blog.cryptographyengineering.com/a-note-on-blind-signature-schemes/)
16-
of the tumbler over a transaction spending the funding transaction without knowing
15+
of the server over a transaction spending the funding transaction without knowing
1716
`t` (similar to [Discreet Log Contracts](https://adiabat.github.io/dlc.pdf)).
1817

1918
Protocol description
2019
---
21-
Assume the tumbler has a permanent public key `A = a*G`, ephemeral pubkey `A1 = A +
20+
Assume the server has a permanent public key `A = a*G`, ephemeral pubkey `A1 = A +
2221
h*G` where `h` is a tweak that is known to Bob, and ephemeral pubkey `A2` which
23-
has a secret key known only to the tumbler and doesn't have to be derived from `A`.
22+
has a secret key known only to the server and doesn't have to be derived from `A`.
2423
Bob has two pubkeys `B1 = b1*G` and `B2 = b2*G` and `H` is a cryptographic hash
2524
function. Public key aggregation in "2-of-2" scripts is achieved with [MuSig](https://eprint.iacr.org/2018/068.pdf)
2625
and the signature scheme is adapted from [Bellare-Neven](https://cseweb.ucsd.edu/~mihir/papers/multisignatures-ccs.pdf).
27-
The partially blind atomic swap protocol with Alice as tumbler and Bob as a user
26+
The partially blind atomic swap protocol with the server and Bob as a user
2827
works as follows.
2928

3029
1. Setup
3130

32-
* Bob anonymously asks the tumbler to put coins into a key aggregated output
31+
* Bob anonymously asks the server to put coins into a key aggregated output
3332
O1 with public key `P1 = H(A1,B1,A1)*A1 + H(A1,B1,B1)*B1`.
3433
* Bob puts coins into a key aggregated output O2 with `P2 = H(A2,B2,A2)*A2 +
35-
H(A2,B2,B2)*B2`. As usual, before sending coins tumbler and Bob agree on
34+
H(A2,B2,B2)*B2`. As usual, before sending coins server and Bob agree on
3635
timelocked refund transactions in case one party disappears.
3736
2. Blind signing
3837

3938
Bob creates a transaction `tx_B` spending O1. Then Bob creates an auxiliary
4039
point `T = t*G` where `t` is a Schnorr signature over `tx_B` in the
4140
following way:
4241

43-
* Bob asks the tumbler for nonce `Ra = ka*G`
42+
* Bob asks the server for nonce `Ra = ka*G`
4443
* Bob creates nonce `Rb = kb*G`
4544
* Bob computes
4645
* the combined nonce `R = Ra+Rb`
@@ -51,21 +50,21 @@ works as follows.
5150
* the challenge `c'` for `A1` as part of `P1`: `c' = c1*H(A1,B1,A1)`
5251
* the blinded challenge `c = c'+beta`
5352
* and the blinded signature of A times `G`: `T = R + c*A`
54-
* Bob sends `c` to the tumbler
55-
* The tumbler replies with an adaptor signature over `tx_A` spending `O2`
53+
* Bob sends `c` to the server
54+
* The server replies with an adaptor signature over `tx_A` spending `O2`
5655
with auxiliary point `T = t*G, t = ka + c*a` where `a` is the discrete
5756
logarithm of permanent key `A`.
5857
3. Swap
5958

60-
* Bob gives the tumbler his contribution to the signature over `tx_A`.
61-
* The tumbler adds Bob's contribution to her own signature and uses it to take
59+
* Bob gives the server his contribution to the signature over `tx_A`.
60+
* The server adds Bob's contribution to her own signature and uses it to take
6261
her coins out of O2.
6362
* Due to previously receiving an adaptor signature Bob learns `t` from step (2).
6463
4. Unblinding
6564

66-
* Bob unblinds the tumbler's blind signature `t` as `t' = t + alpha + c'*h` where
65+
* Bob unblinds the server's blind signature `t` as `t' = t + alpha + c'*h` where
6766
`c'` is the unblinded challenge `h` is the tweak for `A1`. This results in a
68-
regular signature `(R', t')` of the tumbler (`A1`) over `tx_B`.
67+
regular signature `(R', t')` of the server (`A1`) over `tx_B`.
6968
* Bob adds his contribution to `t'` completing `(R', s), s = t' + kb +
7069
c1*H(A1,B1,B1)*b1` which is a valid signature over `tx_B` spending O1:
7170
```
@@ -80,16 +79,16 @@ works as follows.
8079
+------------+ (R', s) +------------+
8180
| O1 +----------->| ...|
8281
+------------+ +------------+
83-
the tumbler's setup tx tx_B
82+
the server's setup tx tx_B
8483
8584
+------------+ +------------+
8685
| O2 +----------->| ...|
8786
+------------+ +------------+
8887
Bob's setup tx tx_A
8988
```
9089
91-
As a result, the tumbler can not link Bob's original coins and his new coins.
92-
From the tumbler's perspective `tx_B` could have been just as well the result
90+
As a result, the server can not link Bob's original coins and his new coins.
91+
From the server's perspective `tx_B` could have been just as well the result
9392
of a swap with someone else.
9493
9594
Blind Schnorr signatures suffer from a vulnerability known as "parallel attack"
@@ -105,18 +104,18 @@ challenge.
105104
A simpler scheme that would be broken by Aggregated Signatures
106105
---
107106
Note that Bob can get a signature of A over anything including arbitrary
108-
messages. Therefore, the tumbler must only use fresh ephemeral keys `A1` when
107+
messages. Therefore, the server must only use fresh ephemeral keys `A1` when
109108
creating outputs. This complicates the protocol because at the same time the
110-
tumbler must not be able to determine for which exact input she signs. As a
109+
server must not be able to determine for which exact input she signs. As a
111110
result, It's Bob's job to apply tweak `h` to convert a signature of `A` to `A1`.
112111
113-
A simpler protocol where the tumbler uses `A` instead of `A1` is broken by
112+
A simpler protocol where the server uses `A` instead of `A1` is broken by
114113
aggregated signatures because it allows spending multiple inputs with a single
115-
signature. If Bob creates many funding txs with the tumbler, he can create a
116-
tx spending all of them, and prepares a message for the tumbler to sign which is
117-
her part of the aggregate signature of all the inputs. The tumbler just dumbly
114+
signature. If Bob creates many funding txs with the server, he can create a
115+
tx spending all of them, and prepares a message for the server to sign which is
116+
her part of the aggregate signature of all the inputs. The server just dumbly
118117
signs any blinded message, so can't decide if it's an aggregated sig or not. For
119-
example Bob may send the tumbler a challenge for an aggregate signature covering
118+
example Bob may send the server a challenge for an aggregate signature covering
120119
output 1 with pubkeys `L1 = {A, B1}` and output 2 with pubkeys `L2 = {A, B2}` as
121120
`c'=H(P1, 0, R', tx_B)*H(L1,A) + H(P2, 1, R', tx_B)*H(L2,A)`.
122121

0 commit comments

Comments
 (0)