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

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