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