1 | ********************** |
---|
2 | Magic Wormhole Invites |
---|
3 | ********************** |
---|
4 | |
---|
5 | Magic Wormhole |
---|
6 | ============== |
---|
7 | |
---|
8 | `magic wormhole`_ is a server and a client which together use Password |
---|
9 | Authenticated Key Exchange (PAKE) to use a short code to establish a |
---|
10 | secure channel between two computers. These codes are one-time use and |
---|
11 | an attacker gets at most one "guess", thus allowing low-entropy codes |
---|
12 | to be used. |
---|
13 | |
---|
14 | .. _magic wormhole: https://github.com/warner/magic-wormhole#design |
---|
15 | |
---|
16 | |
---|
17 | Invites and Joins |
---|
18 | ================= |
---|
19 | |
---|
20 | Inside Tahoe-LAFS we are using a channel created using `magic |
---|
21 | wormhole`_ to exchange configuration and the secret fURL of the |
---|
22 | Introducer with new clients. |
---|
23 | |
---|
24 | This is a two-part process. Alice runs a grid and wishes to have her |
---|
25 | friend Bob use it as a client. She runs ``tahoe invite bob`` which |
---|
26 | will print out a short "wormhole code" like ``2-unicorn-quiver``. You |
---|
27 | may also include some options for total, happy and needed shares if |
---|
28 | you like. |
---|
29 | |
---|
30 | Alice then transmits this one-time secret code to Bob. Alice must keep |
---|
31 | her command running until Bob has done his step as it is waiting until |
---|
32 | a secure channel is established before sending the data. |
---|
33 | |
---|
34 | Bob then runs ``tahoe create-client --join <secret code>`` with any |
---|
35 | other options he likes. This will "use up" the code establishing a |
---|
36 | secure session with Alice's computer. If an attacker tries to guess |
---|
37 | the code, they get only once chance to do so (and then Bob's side will |
---|
38 | fail). Once Bob's computer has connected to Alice's computer, the two |
---|
39 | computers performs the protocol described below, resulting in some |
---|
40 | JSON with the Introducer fURL, nickname and any other options being |
---|
41 | sent to Bob's computer. The ``tahoe create-client`` command then uses |
---|
42 | these options to set up Bob's client. |
---|
43 | |
---|
44 | |
---|
45 | |
---|
46 | Tahoe-LAFS Secret Exchange |
---|
47 | ========================== |
---|
48 | |
---|
49 | The protocol that the Alice (the one doing the invite) and Bob (the |
---|
50 | one being invited) sides perform once a magic wormhole secure channel |
---|
51 | has been established goes as follows: |
---|
52 | |
---|
53 | Alice and Bob both immediately send an "abilities" message as |
---|
54 | JSON. For Alice this is ``{"abilities": {"server-v1": {}}}``. For Bob, |
---|
55 | this is ``{"abilities": {"client-v1": {}}}``. |
---|
56 | |
---|
57 | After receiving the message from the other side and confirming the |
---|
58 | expected protocol, Alice transmits the configuration JSON:: |
---|
59 | |
---|
60 | { |
---|
61 | "needed": 3, |
---|
62 | "total": 10, |
---|
63 | "happy": 7, |
---|
64 | "nickname": "bob", |
---|
65 | "introducer": "pb://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx@example.com:41505/yyyyyyyyyyyyyyyyyyyyyyy" |
---|
66 | } |
---|
67 | |
---|
68 | Both sides then disconnect. |
---|
69 | |
---|
70 | As you can see, there is room for future revisions of the protocol but |
---|
71 | as of yet none have been sketched out. |
---|