112-bring-back-pathlencoinweight.txt 7.4 KB

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