142-combine-intro-and-rend-points.txt 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. Filename: 142-combine-intro-and-rend-points.txt
  2. Title: Combine Introduction and Rendezvous Points
  3. Author: Karsten Loesing, Christian Wilms
  4. Created: 27-Jun-2008
  5. Status: Dead
  6. Change history:
  7. 27-Jun-2008 Initial proposal for or-dev
  8. 04-Jul-2008 Give first security property the new name "Responsibility"
  9. and change new cell formats according to rendezvous protocol
  10. version 3 draft.
  11. 19-Jul-2008 Added comment by Nick (but no solution, yet) that sharing of
  12. circuits between multiple clients is not supported by Tor.
  13. Overview:
  14. Establishing a connection to a hidden service currently involves two Tor
  15. relays, introduction and rendezvous point, and 10 more relays distributed
  16. over four circuits to connect to them. The introduction point is
  17. established in the mid-term by a hidden service to transfer introduction
  18. requests from client to the hidden service. The rendezvous point is set
  19. up by the client for a single hidden service request and actually
  20. transfers end-to-end encrypted application data between client and hidden
  21. service.
  22. There are some reasons for separating the two roles of introduction and
  23. rendezvous point: (1) Responsibility: A relay shall not be made
  24. responsible that it relays data for a certain hidden service; in the
  25. original design as described in [1] an introduction point relays no
  26. application data, and a rendezvous points neither knows the hidden
  27. service nor can it decrypt the data. (2) Scalability: The hidden service
  28. shall not have to maintain a number of open circuits proportional to the
  29. expected number of client requests. (3) Attack resistance: The effect of
  30. an attack on the only visible parts of a hidden service, its introduction
  31. points, shall be as small as possible.
  32. However, elimination of a separate rendezvous connection as proposed by
  33. Øverlier and Syverson [2] is the most promising approach to improve the
  34. delay in connection establishment. From all substeps of connection
  35. establishment extending a circuit by only a single hop is responsible for
  36. a major part of delay. Reducing on-demand circuit extensions from two to
  37. one results in a decrease of mean connection establishment times from 39
  38. to 29 seconds [3]. Particularly, eliminating the delay on hidden-service
  39. side allows the client to better observe progress of connection
  40. establishment, thus allowing it to use smaller timeouts. Proposal 114
  41. introduced new introduction keys for introduction points and provides for
  42. user authorization data in hidden service descriptors; it will be shown
  43. in this proposal that introduction keys in combination with new
  44. introduction cookies provide for the first security property
  45. responsibility. Further, eliminating the need for a separate introduction
  46. connection benefits the overall network load by decreasing the number of
  47. circuit extensions. After all, having only one connection between client
  48. and hidden service reduces the overall protocol complexity.
  49. Design:
  50. 1. Hidden Service Configuration
  51. Hidden services should be able to choose whether they would like to use
  52. this protocol. This might be opt-in for 0.2.1.x and opt-out for later
  53. major releases.
  54. 2. Contact Point Establishment
  55. When preparing a hidden service, a Tor client selects a set of relays to
  56. act as contact points instead of introduction points. The contact point
  57. combines both roles of introduction and rendezvous point as proposed in
  58. [2]. The only requirement for a relay to be picked as contact point is
  59. its capability of performing this role. This can be determined from the
  60. Tor version number that needs to be equal or higher than the first
  61. version that implements this proposal.
  62. The easiest way to implement establishment of contact points is to
  63. introduce v2 ESTABLISH_INTRO cells. By convention, the relay recognizes
  64. version 2 ESTABLISH_INTRO cells as requests to establish a contact point
  65. rather than an introduction point.
  66. V Format byte: set to 255 [1 octet]
  67. V Version byte: set to 2 [1 octet]
  68. KLEN Key length [2 octets]
  69. PK Public introduction key [KLEN octets]
  70. HS Hash of session info [20 octets]
  71. SIG Signature of above information [variable]
  72. The hidden service does not create a fixed number of contact points, like
  73. 3 in the current protocol. It uses a minimum of 3 contact points, but
  74. increases this number depending on the history of client requests within
  75. the last hour. The hidden service also increases this number depending on
  76. the frequency of failing contact points in order to defend against
  77. attacks on its contact points. When client authorization as described in
  78. proposal 121 is used, a hidden service can also use the number of
  79. authorized clients as first estimate for the required number of contact
  80. points.
  81. 3. Hidden Service Descriptor Creation
  82. A hidden service needs to issue a fresh introduction cookie for each
  83. established introduction point. By requiring clients to use this cookie
  84. in a later connection establishment, an introduction point cannot access
  85. the hidden service that it works for. Together with the fresh
  86. introduction key that was introduced in proposal 114, this reduces
  87. responsibility of a contact point for a specific hidden service.
  88. The v2 hidden service descriptor format contains an
  89. "intro-authentication" field that may contain introduction-point specific
  90. keys. The hidden service creates a random string, comparable to the
  91. rendezvous cookie, and includes it in the descriptor as introduction
  92. cookie for auth-type "1". By convention, clients recognize existence of
  93. auth-type 1 as possibility to connect to a hidden service via a contact
  94. point rather than an introduction point. Older clients that do not
  95. understand this new protocol simply ignore that cookie.
  96. 4. Connection Establishment
  97. When establishing a connection to a hidden service a client learns about
  98. the capability of using the new protocol from the hidden service
  99. descriptor. It may choose whether to use this new protocol or not,
  100. whereas older clients cannot understand the new capability and can only
  101. use the current protocol. Client using version 0.2.1.x should be able to
  102. opt-in for using the new protocol, which should change to opt-out for
  103. later major releases.
  104. When using the new capability the client creates a v2 INTRODUCE1 cell
  105. that extends an unversioned INTRODUCE1 cell by adding the content of an
  106. ESTABLISH_RENDEZVOUS cell. Further, the client sends this cell using the
  107. new cell type 41 RELAY_INTRODUCE1_VERSIONED to the introduction point,
  108. because unversioned and versioned INTRODUCE1 cells are indistinguishable:
  109. Cleartext
  110. V Version byte: set to 2 [1 octet]
  111. PK_ID Identifier for Bob's PK [20 octets]
  112. RC Rendezvous cookie [20 octets]
  113. Encrypted to introduction key:
  114. VER Version byte: set to 3. [1 octet]
  115. AUTHT The auth type that is supported [1 octet]
  116. AUTHL Length of auth data [2 octets]
  117. AUTHD Auth data [variable]
  118. RC Rendezvous cookie [20 octets]
  119. g^x Diffie-Hellman data, part 1 [128 octets]
  120. The cleartext part contains the rendezvous cookie that the contact point
  121. remembers just as a rendezvous point would do.
  122. The encrypted part contains the introduction cookie as auth data for the
  123. auth type 1. The rendezvous cookie is contained as before, but there is
  124. no further rendezvous point information, as there is no separate
  125. rendezvous point.
  126. 5. Rendezvous Establishment
  127. The contact point recognizes a v2 INTRODUCE1 cell with auth type 1 as a
  128. request to be used in the new protocol. It remembers the contained
  129. rendezvous cookie, replies to the client with an INTRODUCE_ACK cell
  130. (omitting the RENDEZVOUS_ESTABLISHED cell), and forwards the encrypted
  131. part of the INTRODUCE1 cell as INTRODUCE2 cell to the hidden service.
  132. 6. Introduction at Hidden Service
  133. The hidden services recognizes an INTRODUCE2 cell containing an
  134. introduction cookie as authorization data. In this case, it does not
  135. extend a circuit to a rendezvous point, but sends a RENDEZVOUS1 cell
  136. directly back to its contact point as usual.
  137. 7. Rendezvous at Contact Point
  138. The contact point processes a RENDEZVOUS1 cell just as a rendezvous point
  139. does. The only difference is that the hidden-service-side circuit is not
  140. exclusive for the client connection, but shared among multiple client
  141. connections.
  142. [Tor does not allow sharing of a single circuit among multiple client
  143. connections easily. We need to think about a smart and efficient way to
  144. implement this. Comment by Nick. -KL]
  145. Security Implications:
  146. (1) Responsibility
  147. One of the original reasons for the separation of introduction and
  148. rendezvous points is that a relay shall not be made responsible that it
  149. relays data for a certain hidden service. In the current design an
  150. introduction point relays no application data and a rendezvous points
  151. neither knows the hidden service nor can it decrypt the data.
  152. This property is also fulfilled in this new design. A contact point only
  153. learns a fresh introduction key instead of the hidden service key, so
  154. that it cannot recognize a hidden service. Further, the introduction
  155. cookie, which is unknown to the contact point, prevents it from accessing
  156. the hidden service itself. The only way for a contact point to access a
  157. hidden service is to look up whether it is contained in the descriptors
  158. of known hidden services. A contact point cannot directly be made
  159. responsible for which hidden service it is working. In addition to that,
  160. it cannot learn the data that it transfers, because all communication
  161. between client and hidden service are end-to-end encrypted.
  162. (2) Scalability
  163. Another goal of the existing hidden service protocol is that a hidden
  164. service does not have to maintain a number of open circuits proportional
  165. to the expected number of client requests. The rationale behind this is
  166. better scalability.
  167. The new protocol eliminates the need for a hidden service to extend
  168. circuits on demand, which has a positive effect on circuits establishment
  169. times and overall network load. The solution presented here to establish
  170. a number of contact points proportional to the history of connection
  171. requests reduces the number of circuits to a minimum number that fits the
  172. hidden service's needs.
  173. (3) Attack resistance
  174. The third goal of separating introduction and rendezvous points is to
  175. limit the effect of an attack on the only visible parts of a hidden
  176. service which are the contact points in this protocol.
  177. In theory, the new protocol is more vulnerable to this attack. An
  178. attacker who can take down a contact point does not only eliminate an
  179. access point to the hidden service, but also breaks current client
  180. connections to the hidden service using that contact point.
  181. Øverlier and Syverson proposed the concept of valet nodes as additional
  182. safeguard for introduction/contact points [4]. Unfortunately, this
  183. increases hidden service protocol complexity conceptually and from an
  184. implementation point of view. Therefore, it is not included in this
  185. proposal.
  186. However, in practice attacking a contact point (or introduction point) is
  187. not as rewarding as it might appear. The cost for a hidden service to set
  188. up a new contact point and publish a new hidden service descriptor is
  189. minimal compared to the efforts necessary for an attacker to take a Tor
  190. relay down. As a countermeasure to further frustrate this attack, the
  191. hidden service raises the number of contact points as a function of
  192. previous contact point failures.
  193. Further, the probability of breaking client connections due to attacking
  194. a contact point is minimal. It can be assumed that the probability of one
  195. of the other five involved relays in a hidden service connection failing
  196. or being shut down is higher than that of a successful attack on a
  197. contact point.
  198. (4) Resistance against Locating Attacks
  199. Clients are no longer able to force a hidden service to create or extend
  200. circuits. This further reduces an attacker's capabilities of locating a
  201. hidden server as described by Øverlier and Syverson [5].
  202. Compatibility:
  203. The presented protocol does not raise compatibility issues with current
  204. Tor versions. New relay versions support both, the existing and the
  205. proposed protocol as introduction/rendezvous/contact points. A contact
  206. point acts as introduction point simultaneously. Hidden services and
  207. clients can opt-in to use the new protocol which might change to opt-out
  208. some time in the future.
  209. References:
  210. [1] Roger Dingledine, Nick Mathewson, and Paul Syverson, Tor: The
  211. Second-Generation Onion Router. In the Proceedings of the 13th USENIX
  212. Security Symposium, August 2004.
  213. [2] Lasse Øverlier and Paul Syverson, Improving Efficiency and Simplicity
  214. of Tor Circuit Establishment and Hidden Services. In the Proceedings of
  215. the Seventh Workshop on Privacy Enhancing Technologies (PET 2007),
  216. Ottawa, Canada, June 2007.
  217. [3] Christian Wilms, Improving the Tor Hidden Service Protocol Aiming at
  218. Better Performance, diploma thesis, June 2008, University of Bamberg.
  219. [4] Lasse Øverlier and Paul Syverson, Valet Services: Improving Hidden
  220. Servers with a Personal Touch. In the Proceedings of the Sixth Workshop
  221. on Privacy Enhancing Technologies (PET 2006), Cambridge, UK, June 2006.
  222. [5] Lasse Øverlier and Paul Syverson, Locating Hidden Servers. In the
  223. Proceedings of the 2006 IEEE Symposium on Security and Privacy, May 2006.