tor-design.tex 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804
  1. \documentclass[times,10pt,twocolumn]{article}
  2. \usepackage{latex8}
  3. %\usepackage{times}
  4. \usepackage{url}
  5. \usepackage{graphics}
  6. \usepackage{amsmath}
  7. \pagestyle{empty}
  8. \renewcommand\url{\begingroup \def\UrlLeft{<}\def\UrlRight{>}\urlstyle{tt}\Url}
  9. \newcommand\emailaddr{\begingroup \def\UrlLeft{<}\def\UrlRight{>}\urlstyle{tt}\Url}
  10. % If an URL ends up with '%'s in it, that's because the line *in the .bib/.tex
  11. % file* is too long, so break it there (it doesn't matter if the next line is
  12. % indented with spaces). -DH
  13. %\newif\ifpdf
  14. %\ifx\pdfoutput\undefined
  15. % \pdffalse
  16. %\else
  17. % \pdfoutput=1
  18. % \pdftrue
  19. %\fi
  20. \newenvironment{tightlist}{\begin{list}{$\bullet$}{
  21. \setlength{\itemsep}{0mm}
  22. \setlength{\parsep}{0mm}
  23. % \setlength{\labelsep}{0mm}
  24. % \setlength{\labelwidth}{0mm}
  25. % \setlength{\topsep}{0mm}
  26. }}{\end{list}}
  27. \begin{document}
  28. %% Use dvipdfm instead. --DH
  29. %\ifpdf
  30. % \pdfcompresslevel=9
  31. % \pdfpagewidth=\the\paperwidth
  32. % \pdfpageheight=\the\paperheight
  33. %\fi
  34. \title{Tor: Design of a Next-Generation Onion Router}
  35. %\author{Anonymous}
  36. %\author{Roger Dingledine \\ The Free Haven Project \\ arma@freehaven.net \and
  37. %Nick Mathewson \\ The Free Haven Project \\ nickm@freehaven.net \and
  38. %Paul Syverson \\ Naval Research Lab \\ syverson@itd.nrl.navy.mil}
  39. \maketitle
  40. \thispagestyle{empty}
  41. \begin{abstract}
  42. We present Tor, a connection-based low-latency anonymous communication
  43. system. It is intended as an update and replacement for onion routing
  44. and addresses many limitations in the original onion routing design.
  45. Tor works in a real-world Internet environment,
  46. requires little synchronization or coordination between nodes, and
  47. protects against known anonymity-breaking attacks as well
  48. as or better than other systems with similar design parameters.
  49. \end{abstract}
  50. %\begin{center}
  51. %\textbf{Keywords:} anonymity, peer-to-peer, remailer, nymserver, reply block
  52. %\end{center}
  53. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  54. \Section{Overview}
  55. \label{sec:intro}
  56. Onion routing is a distributed overlay network designed to anonymize
  57. low-latency TCP-based applications such as web browsing, secure shell,
  58. and instant messaging. Users choose a path through the network and
  59. build a \emph{virtual circuit}, in which each node in the path knows its
  60. predecessor and successor, but no others. Traffic flowing down the circuit
  61. is sent in fixed-size \emph{cells}, which are unwrapped by a symmetric key
  62. at each node, revealing the downstream node. The original onion routing
  63. project published several design and analysis papers
  64. \cite{or-jsac98,or-discex00,or-ih96,or-pet00}. While there was briefly
  65. a wide area onion routing network,
  66. the only long-running and publicly accessible
  67. implementation was a fragile proof-of-concept that ran on a single
  68. machine. Many critical design and deployment issues were never implemented,
  69. and the design has not been updated in several years.
  70. Here we describe Tor, a protocol for asynchronous, loosely
  71. federated onion routers that provides the following improvements over
  72. the old onion routing design:
  73. \begin{tightlist}
  74. \item \textbf{Perfect forward secrecy:} The original onion routing
  75. design is vulnerable to a single hostile node recording traffic and later
  76. forcing successive nodes in the circuit to decrypt it. Rather than using
  77. onions to lay the circuits, Tor uses an incremental or \emph{telescoping}
  78. path-building design, where the initiator negotiates session keys with
  79. each successive hop in the circuit. Onion replay detection is no longer
  80. necessary, and the network as a whole is more reliable to boot, since
  81. the initiator knows which hop failed and can try extending to a new node.
  82. \item \textbf{Applications talk to the onion proxy via Socks:}
  83. The original onion routing design required a separate proxy for each
  84. supported application protocol, resulting in a lot of extra code (most
  85. of which was never written) and also meaning that a lot of TCP-based
  86. applications were not supported. Tor uses the unified and standard Socks
  87. \cite{socks4,socks5} interface, allowing us to support any TCP-based
  88. program without modification.
  89. \item \textbf{Many applications can share one circuit:} The original
  90. onion routing design built one circuit for each request. Aside from the
  91. performance issues of doing public key operations for every request, it
  92. also turns out that regular communications patterns mean building lots
  93. of circuits, which can endanger anonymity.
  94. The very first onion routing design \cite{or-ih96} protected against
  95. this to some extent by hiding network access behind an onion
  96. router/firewall that was also forwarding traffic from other nodes.
  97. However, even if this meant complete protection, many users can
  98. benefit from onion routing for which neither running one's own node
  99. nor such firewall configurations are adequately convenient to be
  100. feasible. Those users, especially if they engage in certain unusual
  101. communication behaviors, may be identifiable \cite{wright03}. To
  102. complicate the possibility of such attacks Tor multiplexes many
  103. connections down each circuit, but still rotates the circuit
  104. periodically to avoid too much linkability from requests on a single
  105. circuit.
  106. \item \textbf{No mixing or traffic shaping:} The original onion routing
  107. design called for full link padding both between onion routers and between
  108. onion proxies (that is, users) and onion routers \cite{or-jsac98}. The
  109. later analysis paper \cite{or-pet00} suggested \emph{traffic shaping}
  110. to provide similar protection but use less bandwidth, but did not go
  111. into detail. However, recent research \cite{econymics} and deployment
  112. experience \cite{freedom21-security} indicate that this level of resource
  113. use is not practical or economical; and even full link padding is still
  114. vulnerable to active attacks \cite{defensive-dropping}.
  115. %[An upcoming FC04 paper. I'll add a cite when it's out. -RD]
  116. \item \textbf{Leaky pipes:} Through in-band signalling within the
  117. circuit, Tor initiators can direct traffic to nodes partway down the
  118. circuit. This allows for long-range padding to frustrate traffic
  119. shape and volume attacks at the initiator \cite{defensive-dropping},
  120. but because circuits are used by more than one application, it also
  121. allows traffic to exit the circuit from the middle -- thus
  122. frustrating traffic shape and volume attacks based on observing exit
  123. points.
  124. %Or something like that. hm. Tone this down maybe? Or support it. -RD
  125. %How's that? -PS
  126. \item \textbf{Congestion control:} Earlier anonymity designs do not
  127. address traffic bottlenecks. Unfortunately, typical approaches to load
  128. balancing and flow control in overlay networks involve inter-node control
  129. communication and global views of traffic. Our decentralized ack-based
  130. congestion control maintains reasonable anonymity while allowing nodes
  131. at the edges of the network to detect congestion or flooding attacks
  132. and send less data until the congestion subsides.
  133. \item \textbf{Directory servers:} Rather than attempting to flood
  134. link-state information through the network, which can be unreliable and
  135. open to partitioning attacks or outright deception, Tor takes a simplified
  136. view towards distributing link-state information. Certain more trusted
  137. onion routers also serve as directory servers; they provide signed
  138. \emph{directories} describing all routers they know about, and which
  139. are currently up. Users periodically download these directories via HTTP.
  140. \item \textbf{End-to-end integrity checking:} Without integrity checking
  141. on traffic going through the network, an onion router can change the
  142. contents of cells as they pass by, e.g. by redirecting a connection on
  143. the fly so it connects to a different webserver, or by tagging encrypted
  144. traffic and looking for traffic at the network edges that has been
  145. tagged \cite{minion-design}.
  146. \item \textbf{Robustness to node failure:} router twins
  147. \item \textbf{Exit policies:}
  148. Tor provides a consistent mechanism for each node to specify and
  149. advertise an exit policy.
  150. \item \textbf{Rendezvous points:}
  151. location-protected servers
  152. \end{tightlist}
  153. We review previous work in Section \ref{sec:background}, describe
  154. our goals and assumptions in Section \ref{sec:assumptions},
  155. and then address the above list of improvements in Sections
  156. \ref{sec:design}-\ref{sec:maintaining-anonymity}. We then summarize
  157. how our design stands up to known attacks, and conclude with a list of
  158. open problems.
  159. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  160. \Section{Background and threat model}
  161. \label{sec:background}
  162. \SubSection{Related work}
  163. \label{sec:related-work}
  164. Modern anonymity designs date to Chaum's Mix-Net\cite{chaum-mix} design of
  165. 1981. Chaum proposed hiding sender-recipient connections by wrapping
  166. messages in several layers of public key cryptography, and relaying them
  167. through a path composed of Mix servers. Mix servers in turn decrypt, delay,
  168. and re-order messages, before relay them along the path towards their
  169. destinations.
  170. Subsequent relay-based anonymity designs have diverged in two
  171. principal directions. Some have attempted to maximize anonymity at
  172. the cost of introducing comparatively large and variable latencies,
  173. for example, Babel\cite{babel}, Mixmaster\cite{mixmaster-spec}, and
  174. Mixminion\cite{minion-design}. Because of this
  175. decision, such \emph{high-latency} networks are well-suited for anonymous
  176. email, but introduce too much lag for interactive tasks such as web browsing,
  177. internet chat, or SSH connections.
  178. Tor belongs to the second category: \emph{low-latency} designs that
  179. attempt to anonymize interactive network traffic. Because such
  180. traffic tends to involve a relatively large numbers of packets, it is
  181. difficult to prevent an attacker who can eavesdrop entry and exit
  182. points from correlating packets entering the anonymity network with
  183. packets leaving it. Although some work has been done to frustrate
  184. these attacks, most designs protect primarily against traffic analysis
  185. rather than traffic confirmation \cite{or-jsac98}. One can pad and
  186. limit communication to a constant rate or at least to control the
  187. variation in traffic shape. This can have prohibitive bandwidth costs
  188. and/or performance limitations. One can also use a cascade (fixed
  189. shared route) with a relatively fixed set of users. This assumes a
  190. significant degree of agreement and provides an easier target for an active
  191. attacker since the endpoints are generally known. However, a practical
  192. network with both of these features has been run for many years
  193. (the Java Anon Proxy, aka Web MIXes, \cite{web-mix}).
  194. Another low latency design that was proposed independently and at
  195. about the same time as onion routing was PipeNet \cite{pipenet}.
  196. This provided anonymity protections that were stronger than onion routing's,
  197. but at the cost of allowing a single user to shut down the network simply
  198. by not sending. It was also never implemented or formally published.
  199. The simplest low-latency designs are single-hop proxies such as the
  200. Anonymizer \cite{anonymizer}, wherein a single trusted server removes
  201. identifying users' data before relaying it. These designs are easy to
  202. analyze, but require end-users to trust the anonymizing proxy.
  203. More complex are distributed-trust, channel-based anonymizing systems. In
  204. these designs, a user establishes one or more medium-term bidirectional
  205. end-to-end tunnels to exit servers, and uses those tunnels to deliver a
  206. number of low-latency packets to and from one or more destinations per
  207. tunnel. Establishing tunnels is comparatively expensive and typically
  208. requires public-key cryptography, whereas relaying packets along a tunnel is
  209. comparatively inexpensive. Because a tunnel crosses several servers, no
  210. single server can learn the user's communication partners.
  211. Systems such as earlier versions of Freedom and onion routing
  212. build the anonymous channel all at once (using an onion). Later
  213. designs of Freedom and onion routing as described herein build
  214. the channel in stages as does AnonNet
  215. \cite{anonnet}. Amongst other things, this makes perfect forward
  216. secrecy feasible.
  217. Some systems, such as Crowds \cite{crowds-tissec}, do not rely on the
  218. changing appearance of packets to hide the path; rather they employ
  219. mechanisms so that an intermediary cannot be sure when it is
  220. receiving from/sending to the ultimate initiator. There is no public-key
  221. encryption needed for Crowds, but the responder and all data are
  222. visible to all nodes on the path so that anonymity of connection
  223. initiator depends on filtering all identifying information from the
  224. data stream. Crowds is also designed only for HTTP traffic.
  225. Hordes \cite{hordes-jcs} is based on Crowds but also uses multicast
  226. responses to hide the initiator. Herbivore \cite{herbivore} and
  227. P5 \cite{p5} go even further requiring broadcast.
  228. They each use broadcast in very different ways, and tradeoffs are made to
  229. make broadcast more practical. Both Herbivore and P5 are designed primarily
  230. for communication between communicating peers, although Herbivore
  231. permits external connections by requesting a peer to serve as a proxy.
  232. Allowing easy connections to nonparticipating responders or recipients
  233. is a practical requirement for many users, e.g., to visit
  234. nonparticipating Web sites or to exchange mail with nonparticipating
  235. recipients.
  236. Distributed-trust anonymizing systems differ in how they prevent attackers
  237. from controlling too many servers and thus compromising too many user paths.
  238. Some protocols rely on a centrally maintained set of well-known anonymizing
  239. servers. Current Tor design falls into this category.
  240. Others (such as Tarzan and MorphMix) allow unknown users to run
  241. servers, while using a limited resource (DHT space for Tarzan; IP space for
  242. MorphMix) to prevent an attacker from owning too much of the network.
  243. Crowds uses a centralized ``blender'' to enforce Crowd membership
  244. policy. For small crowds it is suggested that familiarity with all
  245. members is adequate. For large diverse crowds, limiting accounts in
  246. control of any one party is more difficult:
  247. ``(e.g., the blender administrator sets up an account for a user only
  248. after receiving a written, notarized request from that user) and each
  249. account to one jondo, and by monitoring and limiting the number of
  250. jondos on any one net- work (using IP address), the attacker would be
  251. forced to launch jondos using many different identities and on many
  252. different networks to succeed'' \cite{crowds-tissec}.
  253. [XXX I'm considering the subsection as ended here for now. I'm leaving the
  254. following notes in case we want to revisit any of them. -PS]
  255. There are also many systems which are intended for anonymous
  256. and/or censorship resistant file sharing. [XXX Should we list all these
  257. or just say it's out of scope for the paper?
  258. eternity, gnunet, freenet, freehaven, publius, tangler, taz/rewebber]
  259. Channel-based anonymizing systems also differ in their use of dummy traffic.
  260. [XXX]
  261. Finally, several systems provide low-latency anonymity without channel-based
  262. communication. Crowds and [XXX] provide anonymity for HTTP requests; [...]
  263. [XXX Mention error recovery?]
  264. anonymizer%
  265. pipenet%
  266. freedom v1%
  267. freedom v2%
  268. onion routing v1%
  269. isdn-mixes%
  270. crowds%
  271. real-time mixes, web mixes%
  272. anonnet (marc rennhard's stuff)%
  273. morphmix%
  274. P5%
  275. gnunet%
  276. rewebbers%
  277. tarzan%
  278. herbivore%
  279. hordes%
  280. cebolla (?)%
  281. [XXX Close by mentioning where Tor fits.]
  282. \SubSection{Our threat model}
  283. \label{subsec:threat-model}
  284. Like all practical low-latency systems, Tor is broken against a global
  285. passive adversary, the most commonly assumed adversary for analysis of
  286. theoretical anonymous communication designs. The adversary we assume
  287. is weaker than global with respect to distribution, but it is not
  288. merely passive. We assume a threat model derived largely from that of
  289. \cite{or-pet00}.
  290. [XXX The following is cut in from the OR analysis paper from PET 2000.
  291. I've already changed it a little, but didn't get very far.
  292. And, much if not all will eventually
  293. go. But I thought it a useful starting point. -PS]
  294. The basic adversary components we consider are:
  295. \begin{description}
  296. \item[Observer:] can observe a connection (e.g., a sniffer on an
  297. Internet router), but cannot initiate connections.
  298. \item[Disrupter:] can delay (indefinitely) or corrupt traffic on a
  299. link.
  300. \item[Hostile initiator:] can initiate (destroy) connections with
  301. specific routes as well as varying the timing and content of traffic
  302. on the connections it creates.
  303. \item[Hostile responder:] can vary the traffic on the connections made
  304. to it including refusing them entirely, intentionally modifying what
  305. it sends and at what rate, and selectively closing them.
  306. \item[Compromised Tor-node:] can arbitrarily manipulate the connections
  307. under its control, as well as creating new connections (that pass
  308. through itself).
  309. \end{description}
  310. All feasible adversaries can be composed out of these basic
  311. adversaries. This includes combinations such as one or more
  312. compromised network nodes cooperating with disrupters of links on
  313. which those nodes are not adjacent, or such as combinations of hostile
  314. outsiders and observers. However, we are able to restrict our
  315. analysis of adversaries to just one class, the compromised Tor-node.
  316. We now justify this claim.
  317. Especially in light of our assumption that the network forms a clique,
  318. a hostile outsider can perform a subset of the actions that a
  319. compromised COR can do. Also, while a compromised COR cannot disrupt
  320. or observe a link unless it is adjacent to it, any adversary that
  321. replaces some or all observers and/or disrupters with a compromised
  322. COR adjacent to the relevant link is more powerful than the adversary
  323. it replaces. And, in the presence of adequate link padding or bandwidth
  324. limiting even collaborating observers can gain no useful information about
  325. connections within the network. They may be able to gain information
  326. by observing connections to the network (in the remote-COR configuration),
  327. but again this is less than what the COR to which such connection is made
  328. can learn. Thus, by considering adversaries consisting of
  329. collections of compromised CORs we cover the worst case of all
  330. combinations of basic adversaries. Our analysis focuses on this most
  331. capable adversary, one or more compromised CORs.
  332. The possible distributions of adversaries are
  333. \begin{itemize}
  334. \item{\bf single adversary}
  335. \item{\bf multiple adversary:} A fixed, randomly distributed subset of
  336. Tor-nodes is compromised.
  337. \item{\bf roving adversary:} A fixed-bound size subset of Tor-nodes is
  338. compromised at any one time. At specific intervals, other CORs can
  339. become compromised or uncompromised.
  340. \item{\bf global adversary:} All nodes are compromised.
  341. \end{itemize}
  342. Onion Routing provides no protection against a global adversary. If
  343. all the CORs are compromised, they can know exactly who is talking to
  344. whom. The content of what was sent will be revealed as it emerges
  345. from the OR network, unless it has been end-to-end encrypted outside the
  346. OR network. Even a firewall-to-firewall connection is exposed
  347. if, as assumed above, our goal is to hide which local-COR is talking to
  348. which local-COR.
  349. \SubSection{Known attacks against low-latency anonymity systems}
  350. \label{subsec:known-attacks}
  351. We discuss each of these attacks in more detail below, along with the
  352. aspects of the Tor design that provide defense. We provide a summary
  353. of the attacks and our defenses against them in Section \ref{sec:attacks}.
  354. Passive attacks:
  355. simple observation,
  356. timing correlation,
  357. size correlation,
  358. option distinguishability,
  359. Active attacks:
  360. key compromise,
  361. iterated subpoena,
  362. run recipient,
  363. run a hostile node,
  364. compromise entire path,
  365. selectively DOS servers,
  366. introduce timing into messages,
  367. directory attacks,
  368. tagging attacks
  369. \Section{Design goals and assumptions}
  370. \label{sec:assumptions}
  371. \subsection{Goals}
  372. % Are these really our goals? ;) -NM
  373. Like other low-latency anonymity designs, Tor seeks to frustrate
  374. attackers from linking communication partners, or from linking
  375. multiple communications to or from a single point. Within this
  376. overriding goal, however, several design considerations have directed
  377. Tor's evolution.
  378. First, we have tried to build a {\bf deployable} system. [XXX why?]
  379. This requirement precludes designs that are expensive to run (for
  380. example, by requiring more bandwidth than volunteers are easy to
  381. provide); designs that place a heavy liability burden on operators
  382. (for example, by allowing attackers to implicate operators in illegal
  383. activities); and designs that are difficult or expensive to implement
  384. (for example, by requiring kernel patches to many operating systems,
  385. or ).
  386. Second, the system must be {\bf usable}. A hard-to-use system has
  387. fewer users---and because anonymity systems hide users among users, a
  388. system with fewer users provides less anonymity. Thus, usability is
  389. not only a convenience, but is a security requirement for anonymity
  390. systems.
  391. Third, the protocol must be {\bf extensible}, so that it can serve as
  392. a test-bed for future research in low-latency anonymity systems.
  393. (Note that while an extensible protocol benefits researchers, there is
  394. a danger that differing choices of extensions will render users
  395. distinguishable. Thus, implementations should not permit different
  396. protocol extensions to coexist in a single deployed network.)
  397. The protocol's design and security parameters must be {\bf
  398. conservative}. Additional features impose implementation and
  399. complexity costs. [XXX Say that we don't want to try to come up with
  400. speculative solutions to problems we don't KNOW how to solve? -NM]
  401. [XXX mention something about robustness? But we really aren't that
  402. robust. We just assume that tunneled protocols tolerate connection
  403. loss. -NM]
  404. \subsection{Non-goals}
  405. In favoring conservative, deployable designs, we have explicitly
  406. deferred a number of goals---not because they are not desirable in
  407. anonymity systems---but because solving them is either solved
  408. elsewhere, or an area of active research without a generally accepted
  409. solution.
  410. Unlike Tarzan or Morphmix, Tor does not attempt to scale to completely
  411. decentralized peer-to-peer environments with thousands of short-lived
  412. servers.
  413. Tor does not claim to provide a definitive solution to end-to-end
  414. timing or intersection attacks for users who do not run their own
  415. Onion Routers.
  416. Tor does not provide ``protocol normalization'' like the Anonymizer,
  417. Privoxy, or XXX. In order to provide client indistinguishibility for
  418. complex and variable protocols such as HTTP, Tor must be layered with
  419. a proxy such as Privoxy or XXX. Similarly, Tor does not currently
  420. integrate tunneling for non-stream-based protocols; this too must be
  421. provided by an external service.
  422. Tor is not steganographic. It doesn't try to conceal which users are
  423. sending or receiving communications via Tor.
  424. \subsection{Assumptions}
  425. - Threat model
  426. - Mostly reliable nodes: not trusted.
  427. - Small group of trusted dirserv ops
  428. - Many users of diff bandwidth come and go.
  429. [XXX what else?]
  430. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  431. \Section{The Tor Design}
  432. \label{sec:design}
  433. \Section{Other design decisions}
  434. \SubSection{Exit policies and abuse}
  435. \label{subsec:exitpolicies}
  436. \SubSection{Directory Servers}
  437. \label{subsec:dir-servers}
  438. \Section{Rendezvous points: location privacy}
  439. \label{sec:rendezvous}
  440. Rendezvous points are a building block for \emph{location-hidden services}
  441. (aka responder anonymity) in the Tor network. Location-hidden
  442. services means Bob can offer a tcp service, such as an Apache webserver,
  443. without revealing the IP of that service.
  444. We provide this censorship resistance for Bob by allowing him to
  445. advertise several onion routers (his \emph{Introduction Points}) as his
  446. public location. Alice, the client, chooses a node for her \emph{Meeting
  447. Point}. She connects to one of Bob's introduction points, informs him
  448. about her meeting point, and then waits for him to connect to the meeting
  449. point. This extra level of indirection means Bob's introduction points
  450. don't open themselves up to abuse by serving files directly, eg if Bob
  451. chooses a node in France to serve material distateful to the French. The
  452. extra level of indirection also allows Bob to respond to some requests
  453. and ignore others.
  454. We provide the necessary glue so that Alice can view webpages from Bob's
  455. location-hidden webserver with minimal invasive changes. Both Alice and
  456. Bob must run local onion proxies.
  457. The steps of a rendezvous:
  458. \begin{tightlist}
  459. \item Bob chooses some Introduction Points, and advertises them on a
  460. Distributed Hash Table (DHT).
  461. \item Bob establishes onion routing connections to each of his
  462. Introduction Points, and waits.
  463. \item Alice learns about Bob's service out of band (perhaps Bob told her,
  464. or she found it on a website). She looks up the details of Bob's
  465. service from the DHT.
  466. \item Alice chooses and establishes a Meeting Point (MP) for this
  467. transaction.
  468. \item Alice goes to one of Bob's Introduction Points, and gives it a blob
  469. (encrypted for Bob) which tells him about herself, the Meeting Point
  470. she chose, and the first half of an ephemeral key handshake. The
  471. Introduction Point sends the blob to Bob.
  472. \item Bob chooses whether to ignore the blob, or to onion route to MP.
  473. Let's assume the latter.
  474. \item MP plugs together Alice and Bob. Note that MP can't recognize Alice,
  475. Bob, or the data they transmit (they share a session key).
  476. \item Alice sends a Begin cell along the circuit. It arrives at Bob's
  477. onion proxy. Bob's onion proxy connects to Bob's webserver.
  478. \item Data goes back and forth as usual.
  479. \end{tightlist}
  480. When establishing an introduction point, Bob provides the onion router
  481. with a public ``introduction'' key. The hash of this public key
  482. identifies a unique service, and (since Bob is required to sign his
  483. messages) prevents anybody else from usurping Bob's introduction point
  484. in the future. Bob uses the same public key when establish the other
  485. introduction points for that service.
  486. The blob that Alice gives the introduction point includes a hash of Bob's
  487. public key to identify the service, an optional initial authentication
  488. token (the introduction point can do prescreening, eg to block replays),
  489. and (encrypted to Bob's public key) the location of the meeting point,
  490. a meeting cookie Bob should tell the meeting point so he gets connected to
  491. Alice, an optional authentication token so Bob choose whether to respond,
  492. and the first half of a DH key exchange. When Bob connects to the meeting
  493. place and gets connected to Alice's pipe, his first cell contains the
  494. other half of the DH key exchange.
  495. \subsection{Integration with user applications}
  496. For each service Bob offers, he configures his local onion proxy to know
  497. the local IP and port of the server, a strategy for authorizating Alices,
  498. and a public key. We assume the existence of a robust decentralized
  499. efficient lookup system which allows authenticated updates, eg
  500. \cite{cfs:sosp01}. (Each onion router could run a node in this lookup
  501. system; also note that as a stopgap measure, we can just run a simple
  502. lookup system on the directory servers.) Bob publishes into the DHT
  503. (indexed by the hash of the public key) the public key, an expiration
  504. time (``not valid after''), and the current introduction points for that
  505. service. Note that Bob's webserver is completely oblivious to the fact
  506. that it's hidden behind the Tor network.
  507. As far as Alice's experience goes, we require that her client interface
  508. remain a SOCKS proxy, and we require that she shouldn't have to modify
  509. her applications. Thus we encode all of the necessary information into
  510. the hostname (more correctly, fully qualified domain name) that Alice
  511. uses, eg when clicking on a url in her browser. Location-hidden services
  512. use the special top level domain called `.onion': thus hostnames take the
  513. form x.y.onion where x encodes the hash of PK, and y is the authentication
  514. cookie. Alice's onion proxy examines hostnames and recognizes when they're
  515. destined for a hidden server. If so, it decodes the PK and starts the
  516. rendezvous as described in the table above.
  517. \subsection{Previous rendezvous work}
  518. Ian Goldberg developed a similar notion of rendezvous points for
  519. low-latency anonymity systems \cite{ian-thesis}. His ``service tag''
  520. is the same concept as our ``hash of service's public key''. We make it
  521. a hash of the public key so it can be self-authenticating, and so the
  522. client can recognize the same service with confidence later on. His
  523. design differs from ours in the following ways though. Firstly, Ian
  524. suggests that the client should manually hunt down a current location of
  525. the service via Gnutella; whereas our use of the DHT makes lookup faster,
  526. more robust, and transparent to the user. Secondly, the client and server
  527. can share ephemeral DH keys, so at no point in the path is the plaintext
  528. exposed. Thirdly, our design is much more practical for deployment in a
  529. volunteer network, in terms of getting volunteers to offer introduction
  530. and meeting point services. The introduction points do not output any
  531. bytes to the clients. And the meeting points don't know the client,
  532. the server, or the stuff being transmitted. The indirection scheme
  533. is also designed with authentication/authorization in mind -- if the
  534. client doesn't include the right cookie with its request for service,
  535. the server doesn't even acknowledge its existence.
  536. \Section{Maintaining anonymity sets}
  537. \label{sec:maintaining-anonymity}
  538. packet counting attacks work great against initiators. need to do some
  539. level of obfuscation for that. standard link padding for passive link
  540. observers. long-range padding for people who own the first hop. are
  541. we just screwed against people who insert timing signatures into your
  542. traffic?
  543. Even regardless of link padding from Alice to the cloud, there will be
  544. times when Alice is simply not online. Link padding, at the edges or
  545. inside the cloud, does not help for this.
  546. how often should we pull down directories? how often send updated
  547. server descs?
  548. when we start up the client, should we build a circuit immediately,
  549. or should the default be to build a circuit only on demand? should we
  550. fetch a directory immediately?
  551. would we benefit from greater synchronization, to blend with the other
  552. users? would the reduced speed hurt us more?
  553. does the "you can't see when i'm starting or ending a stream because
  554. you can't tell what sort of relay cell it is" idea work, or is just
  555. a distraction?
  556. does running a server actually get you better protection, because traffic
  557. coming from your node could plausibly have come from elsewhere? how
  558. much mixing do you need before this is actually plausible, or is it
  559. immediately beneficial because many adversary can't see your node?
  560. do different exit policies at different exit nodes trash anonymity sets,
  561. or not mess with them much?
  562. do we get better protection against a realistic adversary by having as
  563. many nodes as possible, so he probably can't see the whole network,
  564. or by having a small number of nodes that mix traffic well? is a
  565. cascade topology a more realistic way to get defenses against traffic
  566. confirmation? does the hydra (many inputs, few outputs) topology work
  567. better? are we going to get a hydra anyway because most nodes will be
  568. middleman nodes?
  569. using a circuit many times is good because it's less cpu work
  570. good because of predecessor attacks with path rebuilding
  571. bad because predecessor attacks can be more likely to link you with a
  572. previous circuit since you're so verbose
  573. bad because each thing you do on that circuit is linked to the other
  574. things you do on that circuit
  575. Because Tor runs over TCP, when one of the servers goes down it seems
  576. that all the circuits (and thus streams) going over that server must
  577. break. This reduces anonymity because everybody needs to reconnect
  578. right then (does it? how much?) and because exit connections all break
  579. at the same time, and it also reduces usability. It seems the problem
  580. is even worse in a p2p environment, because so far such systems don't
  581. really provide an incentive for nodes to stay connected when they're
  582. done browsing, so we would expect a much higher churn rate than for
  583. onion routing. Are there ways of allowing streams to survive the loss
  584. of a node in the path?
  585. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  586. \Section{Attacks and Defenses}
  587. \label{sec:attacks}
  588. Below we summarize a variety of attacks and how well our design withstands
  589. them.
  590. \begin{enumerate}
  591. \item \textbf{Passive attacks}
  592. \begin{itemize}
  593. \item \emph{Simple observation.}
  594. \item \emph{Timing correlation.}
  595. \item \emph{Size correlation.}
  596. \item \emph{Option distinguishability.}
  597. \end{itemize}
  598. \item \textbf{Active attacks}
  599. \begin{itemize}
  600. \item \emph{Key compromise.}
  601. \item \emph{Iterated subpoena.}
  602. \item \emph{Run recipient.}
  603. \item \emph{Run a hostile node.}
  604. \item \emph{Compromise entire path.}
  605. \item \emph{Selectively DoS servers.}
  606. \item \emph{Introduce timing into messages.}
  607. \item \emph{Tagging attacks.}
  608. \end{itemize}
  609. \item \textbf{Directory attacks}
  610. \begin{itemize}
  611. \item foo
  612. \end{itemize}
  613. \end{enumerate}
  614. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  615. \Section{Future Directions and Open Problems}
  616. \label{sec:conclusion}
  617. Tor brings together many innovations into
  618. a unified deployable system. But there are still several attacks that
  619. work quite well, as well as a number of sustainability and run-time
  620. issues remaining to be ironed out. In particular:
  621. \begin{itemize}
  622. \item \emph{Scalability:} Since Tor's emphasis currently is on simplicity
  623. of design and deployment, the current design won't easily handle more
  624. than a few hundred servers, because of its clique topology. Restricted
  625. route topologies \cite{danezis:pet2003} promise comparable anonymity
  626. with much better scaling properties, but we must solve problems like
  627. how to randomly form the network without introducing net attacks.
  628. % cascades are a restricted route topology too. we must mention
  629. % earlier why we're not satisfied with the cascade approach.
  630. \item \emph{Cover traffic:} Currently we avoid cover traffic because
  631. it introduces clear performance and bandwidth costs, but and its
  632. security properties are not well understood. With more research
  633. \cite{SS03,defensive-dropping}, the price/value ratio may change, both for
  634. link-level cover traffic and also long-range cover traffic. In particular,
  635. we expect restricted route topologies to reduce the cost of cover traffic
  636. because there are fewer links to cover.
  637. \item \emph{Better directory distribution:} Even with the threshold
  638. directory agreement algorithm described in \ref{sec:dirservers},
  639. the directory servers are still trust bottlenecks. We must find more
  640. decentralized yet practical ways to distribute up-to-date snapshots of
  641. network status without introducing new attacks.
  642. \item \emph{Implementing location-hidden servers:} While Section
  643. \ref{sec:rendezvous} provides a design for rendezvous points and
  644. location-hidden servers, this feature has not yet been implemented.
  645. We will likely encounter additional issues, both in terms of usability
  646. and anonymity, that must be resolved.
  647. \item \emph{Wider-scale deployment:} The original goal of Tor was to
  648. gain experience in deploying an anonymizing overlay network, and learn
  649. from having actual users. We are now at the point where we can start
  650. deploying a wider network. We will see what happens!
  651. % ok, so that's hokey. fix it. -RD
  652. \end{itemize}
  653. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  654. %\Section{Acknowledgments}
  655. %% commented out for anonymous submission
  656. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  657. \bibliographystyle{latex8}
  658. \bibliography{tor-design}
  659. \end{document}
  660. % Style guide:
  661. % U.S. spelling
  662. % avoid contractions (it's, can't, etc.)
  663. % 'mix', 'mixes' (as noun)
  664. % 'mix-net'
  665. % 'mix', 'mixing' (as verb)
  666. % 'Mixminion Project'
  667. % 'Mixminion' (meaning the protocol suite or the network)
  668. % 'Mixmaster' (meaning the protocol suite or the network)
  669. % 'middleman' [Not with a hyphen; the hyphen has been optional
  670. % since Middle English.]
  671. % 'nymserver'
  672. % 'Cypherpunk', 'Cypherpunks', 'Cypherpunk remailer'
  673. %
  674. % 'Whenever you are tempted to write 'Very', write 'Damn' instead, so
  675. % your editor will take it out for you.' -- Misquoted from Mark Twain