]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/blob - docs/convergence-secret.rst
Make tests work with both Nevow 0.11 and 0.12
[tahoe-lafs/tahoe-lafs.git] / docs / convergence-secret.rst
1 .. -*- coding: utf-8-with-signature -*-
2
3 What Is It?
4 -----------
5
6 The identifier of a file (also called the "capability" to a file) is derived
7 from two pieces of information when the file is uploaded: the content of the
8 file and the upload client's "convergence secret". By default, the
9 convergence secret is randomly generated by the client when it first starts
10 up, then stored in the client's base directory (<Tahoe's node
11 dir>/private/convergence) and re-used after that. So the same file content
12 uploaded from the same client will always have the same cap. Uploading the
13 file from a different client with a different convergence secret would result
14 in a different cap -- and in a second copy of the file's contents stored on
15 the grid. If you want files you upload to converge (also known as
16 "deduplicate") with files uploaded by someone else, just make sure you're
17 using the same convergence secret when you upload files as them.
18
19 The advantages of deduplication should be clear, but keep in mind that the
20 convergence secret was created to protect confidentiality. There are two
21 attacks that can be used against you by someone who knows the convergence
22 secret you use.
23
24 The first one is called the "Confirmation-of-a-File Attack". Someone who
25 knows the convergence secret that you used when you uploaded a file, and who
26 has a copy of that file themselves, can check whether you have a copy of that
27 file. This is usually not a problem, but it could be if that file is, for
28 example, a book or movie that is banned in your country.
29
30 The second attack is more subtle. It is called the
31 "Learn-the-Remaining-Information Attack". Suppose you've received a
32 confidential document, such as a PDF from your bank which contains many pages
33 of boilerplate text as well as containing your bank account number and
34 balance. Someone who knows your convergence secret can generate a file with
35 all of the boilerplate text (perhaps they would open an account with the same
36 bank so they receive the same document with their account number and
37 balance). Then they can try a "brute force search" to find your account
38 number and your balance.
39
40 The defense against these attacks is that only someone who knows the
41 convergence secret that you used on each file can perform these attacks on
42 that file.
43
44 Both of these attacks and the defense are described in more detail in `Drew
45 Perttula's Hack Tahoe-LAFS Hall Of Fame entry`_
46
47 .. _`Drew Perttula's Hack Tahoe-LAFS Hall Of Fame entry`:
48    https://tahoe-lafs.org/hacktahoelafs/drew_perttula.html
49
50 What If I Change My Convergence Secret?
51 ---------------------------------------
52
53 All your old file capabilities will still work, but the new data that you
54 upload will not be deduplicated with the old data. If you upload all of the
55 same things to the grid, you will end up using twice the space until garbage
56 collection kicks in (if it's enabled). Changing the convergence secret that a
57 storage client uses for uploads can be though of as moving the client to a
58 new "deduplication domain".
59
60 How To Use It
61 -------------
62
63 To enable deduplication between different clients, **securely** copy the
64 convergence secret file from one client to all the others.
65
66 For example, if you are on host A and have an account on host B and you have
67 scp installed, run:
68
69   *scp ~/.tahoe/private/convergence
70   my_other_account@B:.tahoe/private/convergence*
71
72 If you have two different clients on a single computer, say one for each
73 disk, you would do:
74
75   *cp /tahoe1/private/convergence /tahoe2/private/convergence*
76
77 After you change the convergence secret file, you must restart the client
78 before it will stop using the old one and read the new one from the file.