112-bring-back-pathlencoinweight.txt 7.4 KB

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