1 Filename: 112-bring-back-pathlencoinweight.txt
2 Title: Bring Back Pathlen Coin Weight
11 The idea is that users should be able to choose a weight which
12 probabilistically chooses their path lengths to be 2 or 3 hops. This
13 weight will essentially be a biased coin that indicates an
14 additional hop (beyond 2) with probability P. The user should be
15 allowed to choose 0 for this weight to always get 2 hops and 1 to
18 This value should be modifiable from the controller, and should be
19 available from Vidalia.
24 The Tor network is slow and overloaded. Increasingly often I hear
25 stories about friends and friends of friends who are behind firewalls,
26 annoying censorware, or under surveillance that interferes with their
27 productivity and Internet usage, or chills their speech. These people
28 know about Tor, but they choose to put up with the censorship because
29 Tor is too slow to be usable for them. In fact, to download a fresh,
30 complete copy of levine-timing.pdf for the Anonymity Implications
31 section of this proposal over Tor took me 3 tries.
33 There are many ways to improve the speed problem, and of course we
34 should and will implement as many as we can. Johannes's GSoC project
35 and my reputation system are longer term, higher-effort things that
36 will still provide benefit independent of this proposal.
38 However, reducing the path length to 2 for those who do not need the
39 (questionable) extra anonymity 3 hops provide not only improves
40 their Tor experience but also reduces their load on the Tor network by
41 33%, and can be done in less than 10 lines of code. That's not just
42 Win-Win, it's Win-Win-Win.
44 Furthermore, when blocking resistance measures insert an extra relay
45 hop into the equation, 4 hops will certainly be completely unusable
46 for these users, especially since it will be considerably more
47 difficult to balance the load across a dark relay net than balancing
48 the load on Tor itself (which today is still not without its flaws).
51 Anonymity Implications:
53 It has long been established that timing attacks against mixed
54 networks are extremely effective, and that regardless of path
55 length, if the adversary has compromised your first and last
56 hop of your path, you can assume they have compromised your
57 identity for that connection.
59 In [1], it is demonstrated that for all but the slowest, lossiest
60 networks, error rates for false positives and false negatives were
61 very near zero. Only for constant streams of traffic over slow and
62 (more importantly) extremely lossy network links did the error rate
63 hit 20%. For loss rates typical to the Internet, even the error rate
64 for slow nodes with constant traffic streams was 13%.
66 When you take into account that most Tor streams are not constant,
67 but probably much more like their "HomeIP" dataset, which consists
68 mostly of web traffic that exists over finite intervals at specific
69 times, error rates drop to fractions of 1%, even for the "worst"
72 Therefore, the user has little benefit from the extra hop, assuming
73 the adversary does timing correlation on their nodes. The real
74 protection is the probability of getting both the first and last hop,
75 and this is constant whether the client chooses 2 hops, 3 hops, or 42.
77 Partitioning attacks form another concern. Since Tor uses telescoping
78 to build circuits, it is possible to tell a user is constructing only
79 two hop paths at the entry node. It is questionable if this data is
80 actually worth anything though, especially if the majority of users
81 have easy access to this option, and do actually choose their path
82 lengths semi-randomly.
84 Nick has postulated that exits may also be able to tell that you are
85 using only 2 hops by the amount of time between sending their
86 RELAY_CONNECTED cell and the first bit of RELAY_DATA traffic they
87 see from the OP. I doubt that they will be able to make much use
88 of this timing pattern, since it will likely vary widely depending
89 upon the type of node selected for that first hop, and the user's
90 connection rate to that first hop. It is also questionable if this
91 data is worth anything, especially if many users are using this
92 option (and I imagine many will).
94 Perhaps most seriously, two hop paths do allow malicious guards
95 to easily fail circuits if they do not extend to their colluding peers
96 for the exit hop. Since guards can detect the number of hops in a
97 path, they could always fail the 3 hop circuits and focus on
98 selectively failing the two hop ones until a peer was chosen.
100 I believe currently guards are rotated if circuits fail, which does
101 provide some protection, but this could be changed so that an entry
102 guard is completely abandoned after a certain ratio of extend or
103 general circuit failures with respect to non-failed circuits. This
104 could possibly be gamed to increase guard turnover, but such a game
105 would be much more noticeable than an individual guard failing circuits,
106 though, since it would affect all clients, not just those who chose
110 Why not fix Pathlen=2?:
112 The main reason I am not advocating that we always use 2 hops is that
113 in some situations, timing correlation evidence by itself may not be
114 considered as solid and convincing as an actual, uninterrupted, fully
115 traced path. Are these timing attacks as effective on a real network
116 as they are in simulation? Would an extralegal adversary or authoritarian
117 government even care? In the face of these situation-dependent unknowns,
118 it should be up to the user to decide if this is a concern for them or not.
120 It should probably also be noted that even a false positive
121 rate of 1% for a 200k concurrent-user network could mean that for a
122 given node, a given stream could be confused with something like 10
123 users, assuming ~200 nodes carry most of the traffic (ie 1000 users
124 each). Though of course to really know for sure, someone needs to do
125 an attack on a real network, unfortunately.
130 new_route_len() can be modified directly with a check of the
131 PathlenCoinWeight option (converted to percent) and a call to
132 crypto_rand_int(0,100) for the weighted coin.
134 The entry_guard_t structure could have num_circ_failed and
135 num_circ_succeeded members such that if it exceeds N% circuit
136 extend failure rate to a second hop, it is removed from the entry list.
137 N should be sufficiently high to avoid churn from normal Tor circuit
138 failure as determined by TorFlow scans.
140 The Vidalia option should be presented as a boolean, to minimize confusion
141 for the user. Something like a radiobutton with:
143 * "I use Tor for Censorship Resistance, not Anonymity. Speed is more
144 important to me than Anonymity."
145 * "I use Tor for Anonymity. I need extra protection at the cost of speed."
147 and then some explanation in the help for exactly what this means, and
148 the risks involved with eliminating the adversary's need for timing attacks
149 wrt to false positives, etc.
153 Phase one: Experiment with the proper ratio of circuit failures
154 used to expire garbage or malicious guards via TorFlow.
156 Phase two: Re-enable config and modify new_route_len() to add an
157 extra hop if coin comes up "heads".
159 Phase three: Make radiobutton in Vidalia, along with help entry
160 that explains in layman's terms the risks involved.
163 [1] http://www.cs.umass.edu/~mwright/papers/levine-timing.pdf