121-hidden-service-authentication.txt 32 KB

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