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

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