121-hidden-service-authentication.txt 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641
  1. Filename: 121-hidden-service-authentication.txt
  2. Title: Hidden Service Authentication
  3. Version: $Revision$
  4. Last-Modified: $Date$
  5. Author: Tobias Kamm, Thomas Lauterbach, Karsten Loesing, Ferdinand Rieger,
  6. Christoph Weingarten
  7. Created: 10-Sep-2007
  8. Status: Open
  9. Change history:
  10. 26-Sep-2007 Initial proposal for or-dev
  11. 08-Dec-2007 Incorporated comments by Nick posted to or-dev on 10-Oct-2007
  12. 15-Dec-2007 Rewrote complete proposal for better readability, modified
  13. authentication protocol, merged in personal notes
  14. 24-Dec-2007 Replaced misleading term "authentication" by "authorization"
  15. and added some clarifications (comments by Sven Kaffille)
  16. 28-Apr-2008 Updated most parts of the concrete authorization protocol
  17. Overview:
  18. This proposal deals with a general infrastructure for performing
  19. authorization (not necessarily implying authentication) of requests to
  20. hidden services at three points: (1) when downloading and decrypting
  21. parts of the hidden service descriptor, (2) at the introduction point,
  22. and (3) at Bob's Tor client before contacting the rendezvous point. A
  23. service provider will be able to restrict access to his service at these
  24. three points to authorized clients only. Further, the proposal contains a
  25. first instance of an authorization protocol for the presented
  26. infrastructure.
  27. This proposal is based on v2 hidden service descriptors as described in
  28. proposal 114 and introduced in version 0.2.0.10-alpha.
  29. The proposal is structured as follows: The next section motivates the
  30. integration of authorization mechanisms in the hidden service protocol.
  31. Then we describe a general infrastructure for authorization in hidden
  32. services, followed by a specific authorization protocol for this
  33. infrastructure. At the end we discuss a number of attacks and non-attacks
  34. as well as compatibility issues.
  35. Motivation:
  36. The major part of hidden services does not require client authorization
  37. now and won't do so in the future. To the contrary, many clients would
  38. not want to be (pseudonymously) identifiable by the service (though this
  39. is unavoidable to some extent), but rather use the service
  40. anonymously. These services are not addressed by this proposal.
  41. However, there may be certain services which are intended to be accessed
  42. by a limited set of clients only. A possible application might be a
  43. wiki or forum that should only be accessible for a closed user group.
  44. Another, less intuitive example might be a real-time communication
  45. service, where someone provides a presence and messaging service only to
  46. his buddies. Finally, a possible application would be a personal home
  47. server that should be remotely accessed by its owner.
  48. Performing authorization for a hidden service within the Tor network, as
  49. proposed here, offers a range of advantages compared to allowing all
  50. client connections in the first instance and deferring authorization to
  51. the transported protocol:
  52. (1) Reduced traffic: Unauthorized requests would be rejected as early as
  53. possible, thereby reducing the overall traffic in the network generated
  54. by establishing circuits and sending cells.
  55. (2) Better protection of service location: Unauthorized clients could not
  56. force Bob to create circuits to their rendezvous points, thus preventing
  57. the attack described by Øverlier and Syverson in their paper "Locating
  58. Hidden Servers" even without the need for guards.
  59. (3) Hiding activity: Apart from performing the actual authorization, a
  60. service provider could also hide the mere presence of his service from
  61. unauthorized clients when not providing hidden service descriptors to
  62. them, rejecting unauthorized requests already at the introduction
  63. point (ideally without leaking presence information at any of these
  64. points), or not answering unauthorized introduction requests.
  65. (4) Better protection of introduction points: When providing hidden
  66. service descriptors to authorized clients only and encrypting the
  67. introduction points as described in proposal 114, the introduction points
  68. would be unknown to unauthorized clients and thereby protected from DoS
  69. attacks.
  70. (5) Protocol independence: Authorization could be performed for all
  71. transported protocols, regardless of their own capabilities to do so.
  72. (6) Ease of administration: A service provider running multiple hidden
  73. services would be able to configure access at a single place uniformly
  74. instead of doing so for all services separately.
  75. (7) Optional QoS support: Bob could adapt his node selection algorithm
  76. for building the circuit to Alice's rendezvous point depending on a
  77. previously guaranteed QoS level, thus providing better latency or
  78. bandwidth for selected clients.
  79. A disadvantage of performing authorization within the Tor network is
  80. that a hidden service cannot make use of authorization data in
  81. the transported protocol. Tor hidden services were designed to be
  82. independent of the transported protocol. Therefore it's only possible to
  83. either grant or deny access to the whole service, but not to specific
  84. resources of the service.
  85. Authorization often implies authentication, i.e. proving one's identity.
  86. However, when performing authorization within the Tor network, untrusted
  87. points should not gain any useful information about the identities of
  88. communicating parties, neither server nor client. A crucial challenge is
  89. to remain anonymous towards directory servers and introduction points.
  90. However, trying to hide identity from the hidden service is a futile
  91. task, because a client would never know if he is the only authorized
  92. client and therefore perfectly identifiable. Therefore, hiding client
  93. identity from the hidden service is not aimed by this proposal.
  94. The current implementation of hidden services does not provide any kind
  95. of authorization. The hidden service descriptor version 2, introduced by
  96. proposal 114, was designed to use a descriptor cookie for downloading and
  97. decrypting parts of the descriptor content, but this feature is not yet
  98. in use. Further, most relevant cell formats specified in rend-spec
  99. contain fields for authorization data, but those fields are neither
  100. implemented nor do they suffice entirely.
  101. Details:
  102. 1. General infrastructure for authorization to hidden services
  103. We spotted three possible authorization points in the hidden service
  104. protocol:
  105. (1) when downloading and decrypting parts of the hidden service
  106. descriptor,
  107. (2) at the introduction point, and
  108. (3) at Bob's Tor client before contacting the rendezvous point.
  109. The general idea of this proposal is to allow service providers to
  110. restrict access to some or all of these points to authorized clients
  111. only.
  112. 1.1. Client authorization at directory
  113. Since the implementation of proposal 114 it is possible to combine a
  114. hidden service descriptor with a so-called descriptor cookie. If done so,
  115. the descriptor cookie becomes part of the descriptor ID, thus having an
  116. effect on the storage location of the descriptor. Someone who has learned
  117. about a service, but is not aware of the descriptor cookie, won't be able
  118. to determine the descriptor ID and download the current hidden service
  119. descriptor; he won't even know whether the service has uploaded a
  120. descriptor recently. Descriptor IDs are calculated as follows (see
  121. section 1.2 of rend-spec for the complete specification of v2 hidden
  122. service descriptors):
  123. descriptor-id =
  124. H(service-id | H(time-period | descriptor-cookie | replica))
  125. Currently, service-id is equivalent to permanent-id which is calculated
  126. as in the following formula. But in principle it could be any public
  127. key.
  128. permanent-id = H(permanent-key)[:10]
  129. The second purpose of the descriptor cookie is to encrypt the list of
  130. introduction points, including optional authorization data. Hence, the
  131. hidden service directories won't learn any introduction information from
  132. storing a hidden service descriptor. This feature is implemented but
  133. unused at the moment, so that this proposal will harness the advantages
  134. of proposal 114.
  135. The descriptor cookie can be used for authorization by keeping it secret
  136. from everyone but authorized clients. A service could then decide whether
  137. to publish hidden service descriptors using that descriptor cookie later
  138. on. An authorized client being aware of the descriptor cookie would be
  139. able to download and decrypt the hidden service descriptor.
  140. The number of concurrently used descriptor cookies for one hidden service
  141. is not restricted. A service could use a single descriptor cookie for all
  142. users, a distinct cookie per user, or something in between, like one
  143. cookie per group of users. It is up to the specific protocol and how it
  144. is applied by a service provider.
  145. Although this part of the proposal is meant to describe a general
  146. infrastructure for authorization, changing the way of using the
  147. descriptor cookie to look up hidden service descriptors, e.g. applying
  148. some sort of asymmetric crypto system, would require in-depth changes
  149. that would be incompatible to v2 hidden service descriptors. On the
  150. contrary, using another key for en-/decrypting the introduction point
  151. part of a hidden service descriptor, e.g. a different symmetric key or
  152. asymmetric encryption, would be easy to implement and compatible to v2
  153. hidden service descriptors as understood by hidden service directories
  154. (clients and servers would have to be upgraded anyway for using the new
  155. features).
  156. 1.2. Client authorization at introduction point
  157. The next possible authorization point after downloading and decrypting
  158. a hidden service descriptor is the introduction point. It may be important
  159. for authorization, because it bears the last chance of hiding presence
  160. of a hidden service from unauthorized clients. Further, performing
  161. authorization at the introduction point might reduce traffic in the
  162. network, because unauthorized requests would not be passed to the
  163. hidden service. This applies to those clients who are aware of a
  164. descriptor cookie and thereby of the hidden service descriptor, but do
  165. not have authorization data to pass the introduction point or access the
  166. service (such a situation might occur when authorization data for
  167. authorization at the directory is not issued on a per-user base as
  168. opposed to authorization data for authorization at the introduction
  169. point).
  170. It is important to note that the introduction point must be considered
  171. untrustworthy, and therefore cannot replace authorization at the hidden
  172. service itself. Nor should the introduction point learn any sensitive
  173. identifiable information from either server or client.
  174. In order to perform authorization at the introduction point, three
  175. message formats need to be modified: (1) v2 hidden service descriptors,
  176. (2) ESTABLISH_INTRO cells, and (3) INTRODUCE1 cells.
  177. A v2 hidden service descriptor needs to contain authorization data that
  178. is introduction-point-specific and sometimes also authorization data
  179. that is introduction-point-independent. Therefore, v2 hidden service
  180. descriptors as specified in section 1.2 of rend-spec already contain two
  181. reserved fields "intro-authorization" and "service-authorization"
  182. (originally, the names of these fields were "...-authentication")
  183. containing an authorization type number and arbitrary authorization
  184. data. We propose that authorization data consists of base64 encoded
  185. objects of arbitrary length, surrounded by "-----BEGIN MESSAGE-----" and
  186. "-----END MESSAGE-----". This will increase the size of hidden service
  187. descriptors, which however is possible, as there is no strict upper
  188. limit.
  189. The current ESTABLISH_INTRO cells as described in section 1.3 of
  190. rend-spec do not contain either authorization data or version
  191. information. Therefore, we propose a new version 1 of the ESTABLISH_INTRO
  192. cells adding these two issues as follows:
  193. V Format byte: set to 255 [1 octet]
  194. V Version byte: set to 1 [1 octet]
  195. KL Key length [2 octets]
  196. PK Bob's public key [KL octets]
  197. HS Hash of session info [20 octets]
  198. AUTHT The auth type that is supported [1 octet]
  199. AUTHL Length of auth data [2 octets]
  200. AUTHD Auth data [variable]
  201. SIG Signature of above information [variable]
  202. From the format it is possible to determine the maximum allowed size for
  203. authorization data: given the fact that cells are 512 octets long, of
  204. which 498 octets are usable (see section 6.1 of tor-spec), and assuming
  205. 1024 bit = 128 octet long keys, there are 215 octets left for
  206. authorization data. Hence, authorization protocols are bound to use no
  207. more than these 215 octets, regardless of the number of clients that
  208. shall be authenticated at the introduction point. Otherwise, one would
  209. need to send multiple ESTABLISH_INTRO cells or split them up, what we do
  210. not specify here.
  211. In order to understand a v1 ESTABLISH_INTRO cell, the implementation of
  212. a relay must have a certain Tor version, which would probably be some
  213. 0.2.1.x. Hidden services need to be able to distinguish relays being
  214. capable of understanding the new v1 cell formats and perform
  215. authorization. We propose to use the version number that is contained in
  216. networkstatus documents to find capable introduction points.
  217. The current INTRODUCE1 cells as described in section 1.8 of rend-spec is
  218. not designed to carry authorization data and has no version number, too.
  219. We propose the following version 1 of INTRODUCE1 cells:
  220. Cleartext
  221. V Version byte: set to 1 [1 octet]
  222. PK_ID Identifier for Bob's PK [20 octets]
  223. AUTHT The auth type that is supported [1 octet]
  224. AUTHL Length of auth data [2 octets]
  225. AUTHD Auth data [variable]
  226. Encrypted to Bob's PK:
  227. (RELAY_INTRODUCE2 cell)
  228. The maximum length of contained authorization data depends on the length
  229. of the contained INTRODUCE2 cell. A calculation follows below when
  230. describing the INTRODUCE2 cell format we propose to use.
  231. Unfortunately, v0 INTRODUCE1 cells consist only of a fixed-size,
  232. seemingly random PK_ID, followed by the encrypted INTRODUCE2 cell. This
  233. makes it impossible to distinguish v0 INTRODUCE1 cells from any later
  234. format. In particular, it is not possible to introduce some kind of
  235. format and version byte for newer versions of this cell. That's probably
  236. where the comment "[XXX011 want to put intro-level auth info here, but no
  237. version. crap. -RD]" that was part of rend-spec some time ago comes from.
  238. Processing of v1 INTRODUCE1 cells therefore requires knowledge about the
  239. context in which they are used. As a result, we propose that when
  240. receiving a v1 ESTABLISH_INTRO cell, an introduction point only accepts
  241. v1 INTRODUCE1 cells later on. Hence, the same introduction point cannot
  242. be used to accept both v0 and v1 INTRODUCE1 cells for the same service.
  243. (Another solution would be to distinguish v0 and v1 INTRODUCE1 cells by
  244. their size, as v0 INTRODUCE1 cells can only have specific cell sizes,
  245. depending on the version of the contained INTRODUCE2 cell; however, this
  246. approach does not appear very clean.)
  247. 1.3. Client authorization at hidden service
  248. The time when a hidden service receives an INTRODUCE2 cell constitutes
  249. the last possible authorization point during the hidden service
  250. protocol. Performing authorization here is easier than at the other two
  251. authorization points, because there are no possibly untrusted entities
  252. involved.
  253. In general, a client that is successfully authorized at the introduction
  254. point should be granted access at the hidden service, too. Otherwise, the
  255. client would receive a positive INTRODUCE_ACK cell from the introduction
  256. point and conclude that it may connect to the service, but the request
  257. will be dropped without notice. This would appear as a failure to
  258. clients. Therefore, the number of cases in which a client successfully
  259. passes the introduction point, but fails at the hidden service should be
  260. zero. However, this does not lead to the conclusion, that the
  261. authorization data used at the introduction point and the hidden service
  262. must be the same, but only that both authorization data should lead to
  263. the same authorization result.
  264. Authorization data is transmitted from client to server via an
  265. INTRODUCE2 cell that is forwarded by the introduction point. There are
  266. versions 0 to 2 specified in section 1.8 of rend-spec, but none of these
  267. contains fields for carrying authorization data. We propose a slightly
  268. modified version of v3 INTRODUCE2 cells that is specified in section
  269. 1.8.1 and which is not implemented as of December 2007. In contrast to
  270. the specified v3 we avoid specifying (and implementing) IPv6 capabilities,
  271. because Tor relays will be required to support IPv4 addresses for a long
  272. time in the future, so that this seems unnecessary at the moment. The
  273. proposed format of v3 INTRODUCE2 cells is as follows:
  274. VER Version byte: set to 3. [1 octet]
  275. AUTHT The auth type that is supported [1 octet]
  276. AUTHL Length of auth data [2 octets]
  277. AUTHD Auth data [variable]
  278. IP Rendezvous point's address [4 octets]
  279. PORT Rendezvous point's OR port [2 octets]
  280. ID Rendezvous point identity ID [20 octets]
  281. KLEN Length of onion key [2 octets]
  282. KEY Rendezvous point onion key [KLEN octets]
  283. RC Rendezvous cookie [20 octets]
  284. g^x Diffie-Hellman data, part 1 [128 octets]
  285. The maximum possible length of authorization data is related to the
  286. enclosing INTRODUCE1 cell. A v3 INTRODUCE2 cell with
  287. 1024 bit = 128 octets long public keys without any authorization data
  288. occupies 306 octets (AUTHL is only used when AUTHT has a value != 0),
  289. plus 58 octets for hybrid public key encryption (see
  290. section 5.1 of tor-spec on hybrid encryption of CREATE cells). The
  291. surrounding v1 INTRODUCE1 cell requires 24 octets. This leaves only 110
  292. of the 498 available octets free, which must be shared between
  293. authorization data to the introduction point _and_ to the hidden
  294. service.
  295. When receiving a v3 INTRODUCE2 cell, Bob checks whether a client has
  296. provided valid authorization data to him. He will only then build a
  297. circuit to the provided rendezvous point and otherwise will drop the
  298. cell.
  299. There might be several attacks based on the idea of replaying existing
  300. cells to the hidden service. In particular, someone (the introduction
  301. point or an evil authenticated client) might replay valid INTRODUCE2
  302. cells to make the hidden service build an arbitrary number of circuits to
  303. (maybe long gone) rendezvous points. Therefore, we propose that hidden
  304. services maintain a history of received INTRODUCE2 cells within the last
  305. hour and only accept INTRODUCE2 cells matching the following rules:
  306. (1) a maximum of 3 cells coming from the same client and containing the
  307. same rendezvous cookie, and
  308. (2) a maximum of 10 cells coming from the same client with different
  309. rendezvous cookies.
  310. This allows a client to retry connection establishment using the same
  311. rendezvous point for 3 times and a total number of 10 connection
  312. establishments (not requests in the transported protocol) per hour.
  313. 1.4. Summary of authorization data fields
  314. In summary, the proposed descriptor format and cell formats provide the
  315. following fields for carrying authorization data:
  316. (1) The v2 hidden service descriptor contains:
  317. - a descriptor cookie that is used for the lookup process, and
  318. - an arbitrary encryption schema to ensure authorization to access
  319. introduction information (currently symmetric encryption with the
  320. descriptor cookie).
  321. (2) For performing authorization at the introduction point we can use:
  322. - the fields intro-authorization and service-authorization in
  323. hidden service descriptors,
  324. - a maximum of 215 octets in the ESTABLISH_INTRO cell, and
  325. - one part of 110 octets in the INTRODUCE1 cell.
  326. (3) For performing authorization at the hidden service we can use:
  327. - the fields intro-authorization and service-authorization in
  328. hidden service descriptors,
  329. - the other part of 110 octets in the INTRODUCE2 cell.
  330. It will also still be possible to access a hidden service without any
  331. authorization or only use a part of the authorization infrastructure.
  332. However, this requires to consider all parts of the infrastructure. For
  333. example, authorization at the introduction point relying on confidential
  334. intro-authorization data transported in the hidden service descriptor
  335. cannot be performed without using an encryption schema for introduction
  336. information.
  337. 1.5. Managing authorization data at servers and clients
  338. In order to provide authorization data at the hidden server and the
  339. authenticated clients, we propose to use files---either the tor
  340. configuration file or separate files. The exact format of these special
  341. files depends on the authorization protocol used.
  342. Currently, rend-spec contains the proposition to encode client-side
  343. authorization data in the URL, like in x.y.z.onion. This was never used
  344. and is also a bad idea, because in case of HTTP the requested URL may be
  345. contained in the Host and Referer fields.
  346. 2. An authorization protocol based on group and user passwords
  347. In the following we discuss an authorization protocol for the proposed
  348. authorization architecture that performs authorization at the directory
  349. and the hidden service, but not at the introduction point.
  350. The protocol relies on a distinct asymmetric (client-key) and a
  351. symmetric key (descriptor-cookie) for
  352. each client. The asymmetric key replaces the service's permanent key and
  353. the symmetric key is used as descriptor cookie as described above.
  354. 2.1. Client authorization at directory
  355. The symmetric key of 128 bits length is used as descriptor cookie for
  356. publishing/fetching
  357. hidden service descriptors and for encrypting/decrypting the contained
  358. introduction points. Further, the asymmetric key replaces the service's
  359. permanent key that is used to encode and sign a v2 hidden service descriptor.
  360. The result is a v2 hidden service descriptor with the following format:
  361. descriptor-id =
  362. H(H(client-key)[:10] | H(time-period | descriptor-cookie | replica))
  363. descriptor-content = {
  364. descriptor-id,
  365. version,
  366. client-key,
  367. H(time-period | descriptor-cookie | replica),
  368. timestamp,
  369. protocol-versions,
  370. { introduction-points } encrypted with descriptor-cookie
  371. } signed with private-key
  372. Whenever a
  373. server decides to remove authorization for a client, he can simply stop
  374. publishing hidden service descriptors using the descriptor cookie.
  375. The fact that there needs to be a separate
  376. hidden service descriptor for each user leads to a large number of
  377. such descriptors. However, this is the only way for a service
  378. provider to remove a client's authorization without remains. We assume
  379. that distributing the directory of hidden service descriptors as
  380. implemented by proposal 114 provides the necessary scalability to do so.
  381. 2.2. Client authorization at introduction point
  382. There is no need to perform authorization at the introduction point in
  383. this protocol. Only authorized clients can decrypt the introduction
  384. point part of a hidden service descriptor. This contains the
  385. introduction key that was introduced by proposal 114 and that is required
  386. to get an INTRODUCE1 cell passed at the introduction point.
  387. 2.3. Client authorization at hidden service
  388. Authorization at the hidden service also makes use of the
  389. descriptor cookie. The client include this descriptor cookie,
  390. in INTRODUCE2 cells that it sends to the server.
  391. The server compares authorization data of incoming INTRODUCE2 cells with
  392. the locally stored value that it would expect. The authorization type
  393. number of this protocol for INTRODUCE2 cells is "1".
  394. 2.4. Providing authorization data
  395. The Tor client of a hidden service needs to know the client keys
  396. and descriptor cookies of all authorized clients. We decided to
  397. create a new configuration option that specifies a comma-separated list
  398. of human-readable client names:
  399. HiddenServiceAuthorizeClient client-name,client-name,...
  400. When a hidden service is configured, the client keys and descriptor
  401. cookies for all configured client names are either read from a file
  402. or generated and appended to that file. The file format is:
  403. "client-name" human-readable client identifier NL
  404. "descriptor-cookie" 128-bit key ^= 22 base64 chars NL
  405. "client-key" NL a public key in PEM format
  406. On client side, we propose to add a new configuration option that
  407. contains a service name, the service identifier (H(client-key)[:10]),
  408. and the descriptor cookie that are required to access a hidden service.
  409. The configuration option has the following syntax:
  410. HidServAuth service-name service-address descriptor-cookie
  411. Whenever the user tries to access the given onion address, the given
  412. descriptor cookie is used for authorization.
  413. Security implications:
  414. In the following we want to discuss possible attacks by dishonest
  415. entities in the presented infrastructure and specific protocol. These
  416. security implications would have to be verified once more when adding
  417. another protocol. The dishonest entities (theoretically) include the
  418. hidden server itself, the authenticated clients, hidden service directory
  419. nodes, introduction points, and rendezvous points. The relays that are
  420. part of circuits used during protocol execution, but never learn about
  421. the exchanged descriptors or cells by design, are not considered.
  422. Obviously, this list makes no claim to be complete. The discussed attacks
  423. are sorted by the difficulty to perform them, in ascending order,
  424. starting with roles that everyone could attempt to take and ending with
  425. partially trusted entities abusing the trust put in them.
  426. (1) A hidden service directory could attempt to conclude presence of a
  427. server from the existence of a locally stored hidden service descriptor:
  428. This passive attack is possible only for a single client-service
  429. relation, because descriptors need to contain a
  430. publicly visible signature of the server using the client key
  431. A possible protection
  432. would be to increase the number of hidden service directories in the
  433. network.
  434. (2) A hidden service directory could try to break the descriptor cookies
  435. of locally stored descriptors: This attack can be performed offline. The
  436. only useful countermeasure against it might be using safe passwords that
  437. are generated by Tor.
  438. (3) An introduction point could try to identify the pseudonym of the
  439. hidden service on behalf of which it operates: This is impossible by
  440. design, because the service uses a fresh public key for every
  441. establishment of an introduction point (see proposal 114) and the
  442. introduction point receives a fresh introduction cookie, so that there is
  443. no identifiable information about the service that the introduction point
  444. could learn. The introduction point cannot even tell if client accesses
  445. belong to the same client or not, nor can it know the total number of
  446. authorized clients. The only information might be the pattern of
  447. anonymous client accesses, but that is hardly enough to reliably identify
  448. a specific service.
  449. (4) An introduction point could want to learn the identities of accessing
  450. clients: This is also impossible by design, because all clients use the
  451. same introduction cookie for authorization at the introduction point.
  452. (5) An introduction point could try to replay a correct INTRODUCE1 cell
  453. to other introduction points of the same service, e.g. in order to force
  454. the service to create a huge number of useless circuits: This attack is
  455. not possible by design, because INTRODUCE1 cells are encrypted using a
  456. freshly created introduction key that is only known to authorized
  457. clients.
  458. (6) An introduction point could attempt to replay a correct INTRODUCE2
  459. cell to the hidden service, e.g. for the same reason as in the last
  460. attack: This attack is very limited by the fact that a server will only
  461. accept 3 INTRODUCE2 cells containing the same rendezvous cookie and drop
  462. all further replayed cells.
  463. (7) An introduction point could block client requests by sending either
  464. positive or negative INTRODUCE_ACK cells back to the client, but without
  465. forwarding INTRODUCE2 cells to the server: This attack is an annoyance
  466. for clients, because they might wait for a timeout to elapse until trying
  467. another introduction point. However, this attack is not introduced by
  468. performing authorization and it cannot be targeted towards a specific
  469. client. A countermeasure might be for the server to periodically perform
  470. introduction requests to his own service to see if introduction points
  471. are working correctly.
  472. (8) The rendezvous point could attempt to identify either server or
  473. client: This remains impossible as it was before, because the
  474. rendezvous cookie does not contain any identifiable information.
  475. (9) An authenticated client could swamp the server with valid INTRODUCE1
  476. and INTRODUCE2 cells, e.g. in order to force the service to create
  477. useless circuits to rendezvous points; as opposed to an introduction
  478. point replaying the same INTRODUCE2 cell, a client could include a new
  479. rendezvous cookie for every request: The countermeasure for this attack
  480. is the restriction to 10 connection establishments per client and hour.
  481. Compatibility:
  482. An implementation of this proposal would require changes to hidden
  483. servers and clients to process authorization data and encode and
  484. understand the new formats. However, both servers and clients would
  485. remain compatible to regular hidden services without authorization.
  486. Implementation:
  487. The implementation of this proposal can be divided into a number of
  488. changes to hidden service and client side. There are no
  489. changes necessary on directory, introduction, or rendezvous nodes. All
  490. changes are marked with either [service] or [client] do denote on which
  491. side they need to be made.
  492. /1/ Configure client authorization [service]
  493. - Parse configuration option HiddenServiceAuthorizeClient containing
  494. authorized client names.
  495. - Load previously created client keys and descriptor cookies.
  496. - Generate missing client keys and descriptor cookies, add them to
  497. client_keys file.
  498. - Rewrite the hostname file.
  499. - Keep client keys and descriptor cookies of authorized clients in
  500. memory.
  501. [- In case of reconfiguration, mark which client authorizations were
  502. added and whether any were removed. This can be used later when
  503. deciding whether to rebuild introduction points and publish new
  504. hidden service descriptors. Not implemented yet.]
  505. /2/ Publish hidden service descriptors [service]
  506. - Create and upload hidden service descriptors for all authorized
  507. clients.
  508. [- See /1/ for the case of reconfiguration.]
  509. /3/ Configure permission for hidden services [client]
  510. - Parse configuration option HidServAuth containing service
  511. authorization, store authorization data in memory.
  512. /5/ Fetch hidden service descriptors [client]
  513. - Look up client authorization upon receiving a hidden service request.
  514. - Request hidden service descriptor ID including client key and
  515. descriptor cookie. Only request v2 descriptors, no v0.
  516. /6/ Process hidden service descriptor [client]
  517. - Decrypt introduction points with descriptor cookie.
  518. /7/ Create introduction request [client]
  519. - Include descriptor cookie in INTRODUCE2 cell to introduction point.
  520. - Pass descriptor cookie around between involved connections and
  521. circuits.
  522. /8/ Process introduction request [service]
  523. - Read descriptor cookie from INTRODUCE2 cell.
  524. - Check whether descriptor cookie is authorized for access, including
  525. checking access counters.
  526. - Log access for accountability.