tor-design.tex 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969
  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{Roger Dingledine \\ The Free Haven Project \\ arma@freehaven.net \and
  36. %Nick Mathewson \\ The Free Haven Project \\ nickm@freehaven.net \and
  37. %Paul Syverson \\ Naval Research Lab \\ syverson@itd.nrl.navy.mil}
  38. \maketitle
  39. \thispagestyle{empty}
  40. \begin{abstract}
  41. We present Tor, a connection-based low-latency anonymous communication
  42. system. It is intended as an update and replacement for onion routing
  43. and addresses many limitations in the original onion routing design.
  44. Tor works in a real-world Internet environment,
  45. requires little synchronization or coordination between nodes, and
  46. protects against known anonymity-breaking attacks as well
  47. as or better than other systems with similar design parameters.
  48. \end{abstract}
  49. %\begin{center}
  50. %\textbf{Keywords:} anonymity, peer-to-peer, remailer, nymserver, reply block
  51. %\end{center}
  52. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  53. \Section{Overview}
  54. \label{sec:intro}
  55. Onion routing is a distributed overlay network designed to anonymize
  56. low-latency TCP-based applications such as web browsing, secure shell,
  57. and instant messaging. Users choose a path through the network and
  58. build a \emph{virtual circuit}, in which each node in the path knows its
  59. predecessor and successor, but no others. Traffic flowing down the circuit
  60. is sent in fixed-size \emph{cells}, which are unwrapped by a symmetric key
  61. at each node, revealing the downstream node. The original onion routing
  62. project published several design and analysis papers
  63. \cite{or-jsac98,or-discex00,or-ih96,or-pet00}. While there was briefly
  64. a wide area onion routing network,
  65. % how long is briefly? a day, a month? -RD
  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 process of building circuits is more reliable, 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, so most applications were not supported.
  86. 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, any onion router on the path
  142. can change the contents of cells as they pass by, e.g. to redirect a
  143. connection on the fly so it connects to a different webserver, or to
  144. tag encrypted traffic and look for the tagged traffic at the network
  145. edges \cite{minion-design}.
  146. \item \textbf{Robustness to failed nodes:} A failed node in a traditional
  147. mix network means lost messages, but in Tor, users can notice failed
  148. nodes while building circuits and route around them. We further provide a
  149. simple mechanism that allows connections to be established despite recent
  150. node failure or slightly dated information from a directory server. Tor
  151. permits onion routers to have \emph{router twins} --- nodes that share
  152. the same private decryption key. Note that because connections now have
  153. perfect forward secrecy, an onion router still cannot read the traffic
  154. on a connection established through its twin even while that connection
  155. is active. Also, which nodes are twins can change dynamically depending
  156. on current circumstances, and twins may or may not be under the same
  157. administrative authority.
  158. \item \textbf{Exit policies:} Tor provides a consistent mechanism for
  159. each node to specify and advertise its own exit policy. Exit policies
  160. are critical in a volunteer-based distributed infrastructure, because
  161. each operator is comfortable with allowing different types of traffic
  162. to exit the Tor network from his node.
  163. \item \textbf{Rendezvous points and location-protected servers:} Tor
  164. provides an integrated mechanism for responder-anonymity
  165. location-protected servers
  166. \end{tightlist}
  167. We review previous work in Section \ref{sec:background}, describe
  168. our goals and assumptions in Section \ref{sec:assumptions},
  169. and then address the above list of improvements in Sections
  170. \ref{sec:design}-\ref{sec:maintaining-anonymity}. We then summarize
  171. how our design stands up to known attacks, and conclude with a list of
  172. open problems.
  173. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  174. \Section{Background and threat model}
  175. \label{sec:background}
  176. \SubSection{Related work}
  177. \label{sec:related-work}
  178. Modern anonymity designs date to Chaum's Mix-Net\cite{chaum-mix} design of
  179. 1981. Chaum proposed hiding sender-recipient connections by wrapping
  180. messages in several layers of public key cryptography, and relaying them
  181. through a path composed of Mix servers. Mix servers in turn decrypt, delay,
  182. and re-order messages, before relay them along the path towards their
  183. destinations.
  184. Subsequent relay-based anonymity designs have diverged in two
  185. principal directions. Some have attempted to maximize anonymity at
  186. the cost of introducing comparatively large and variable latencies,
  187. for example, Babel\cite{babel}, Mixmaster\cite{mixmaster-spec}, and
  188. Mixminion\cite{minion-design}. Because of this
  189. decision, such \emph{high-latency} networks are well-suited for anonymous
  190. email, but introduce too much lag for interactive tasks such as web browsing,
  191. internet chat, or SSH connections.
  192. Tor belongs to the second category: \emph{low-latency} designs that
  193. attempt to anonymize interactive network traffic. Because such
  194. traffic tends to involve a relatively large numbers of packets, it is
  195. difficult to prevent an attacker who can eavesdrop entry and exit
  196. points from correlating packets entering the anonymity network with
  197. packets leaving it. Although some work has been done to frustrate
  198. these attacks, most designs protect primarily against traffic analysis
  199. rather than traffic confirmation \cite{or-jsac98}. One can pad and
  200. limit communication to a constant rate or at least to control the
  201. variation in traffic shape. This can have prohibitive bandwidth costs
  202. and/or performance limitations. One can also use a cascade (fixed
  203. shared route) with a relatively fixed set of users. This assumes a
  204. significant degree of agreement and provides an easier target for an active
  205. attacker since the endpoints are generally known. However, a practical
  206. network with both of these features and thousands of active users has
  207. been run for many years (the Java Anon Proxy, aka Web MIXes,
  208. \cite{web-mix}).
  209. Another low latency design that was proposed independently and at
  210. about the same time as onion routing was PipeNet \cite{pipenet}.
  211. This provided anonymity protections that were stronger than onion routing's,
  212. but at the cost of allowing a single user to shut down the network simply
  213. by not sending. It was also never implemented or formally published.
  214. The simplest low-latency designs are single-hop proxies such as the
  215. Anonymizer \cite{anonymizer}, wherein a single trusted server removes
  216. identifying users' data before relaying it. These designs are easy to
  217. analyze, but require end-users to trust the anonymizing proxy.
  218. More complex are distributed-trust, channel-based anonymizing systems. In
  219. these designs, a user establishes one or more medium-term bidirectional
  220. end-to-end tunnels to exit servers, and uses those tunnels to deliver a
  221. number of low-latency packets to and from one or more destinations per
  222. tunnel. Establishing tunnels is comparatively expensive and typically
  223. requires public-key cryptography, whereas relaying packets along a tunnel is
  224. comparatively inexpensive. Because a tunnel crosses several servers, no
  225. single server can learn the user's communication partners.
  226. Systems such as earlier versions of Freedom and onion routing
  227. build the anonymous channel all at once (using an onion). Later
  228. designs of Freedom and onion routing as described herein build
  229. the channel in stages as does AnonNet
  230. \cite{anonnet}. Amongst other things, this makes perfect forward
  231. secrecy feasible.
  232. Some systems, such as Crowds \cite{crowds-tissec}, do not rely on the
  233. changing appearance of packets to hide the path; rather they employ
  234. mechanisms so that an intermediary cannot be sure when it is
  235. receiving from/sending to the ultimate initiator. There is no public-key
  236. encryption needed for Crowds, but the responder and all data are
  237. visible to all nodes on the path so that anonymity of connection
  238. initiator depends on filtering all identifying information from the
  239. data stream. Crowds is also designed only for HTTP traffic.
  240. Hordes \cite{hordes-jcs} is based on Crowds but also uses multicast
  241. responses to hide the initiator. Herbivore \cite{herbivore} and
  242. P5 \cite{p5} go even further requiring broadcast.
  243. They each use broadcast in very different ways, and tradeoffs are made to
  244. make broadcast more practical. Both Herbivore and P5 are designed primarily
  245. for communication between communicating peers, although Herbivore
  246. permits external connections by requesting a peer to serve as a proxy.
  247. Allowing easy connections to nonparticipating responders or recipients
  248. is a practical requirement for many users, e.g., to visit
  249. nonparticipating Web sites or to exchange mail with nonparticipating
  250. recipients.
  251. Distributed-trust anonymizing systems differ in how they prevent attackers
  252. from controlling too many servers and thus compromising too many user paths.
  253. Some protocols rely on a centrally maintained set of well-known anonymizing
  254. servers. Current Tor design falls into this category.
  255. Others (such as Tarzan and MorphMix) allow unknown users to run
  256. servers, while using a limited resource (DHT space for Tarzan; IP space for
  257. MorphMix) to prevent an attacker from owning too much of the network.
  258. Crowds uses a centralized ``blender'' to enforce Crowd membership
  259. policy. For small crowds it is suggested that familiarity with all
  260. members is adequate. For large diverse crowds, limiting accounts in
  261. control of any one party is more difficult:
  262. ``(e.g., the blender administrator sets up an account for a user only
  263. after receiving a written, notarized request from that user) and each
  264. account to one jondo, and by monitoring and limiting the number of
  265. jondos on any one net- work (using IP address), the attacker would be
  266. forced to launch jondos using many different identities and on many
  267. different networks to succeed'' \cite{crowds-tissec}.
  268. Many systems have been designed for censorship resistant publishing.
  269. The first of these was the Eternity Service \cite{eternity}. Since
  270. then, there have been many alternatives and refinements, of which we note
  271. but a few
  272. \cite{eternity,gap-pets03,freenet-pets00,freehaven-berk,publius,tangler,taz}.
  273. From the beginning, traffic analysis resistant communication has been
  274. recognized as an important element of censorship resistance because of
  275. the relation between the ability to censor material and the ability to
  276. find its distribution source.
  277. Tor is not primarily for censorship resistance but for anonymous
  278. communication. However, Tor's rendezvous points, which enable
  279. connections between mutually anonymous entities, also facilitate
  280. connections to hidden servers. These building blocks to censorship
  281. resistance and other capabilities are described in
  282. Section~\ref{sec:rendezvous}.
  283. [XXX I'm considering the subsection as ended here for now. I'm leaving the
  284. following notes in case we want to revisit any of them. -PS]
  285. Channel-based anonymizing systems also differ in their use of dummy traffic.
  286. [XXX]
  287. Finally, several systems provide low-latency anonymity without channel-based
  288. communication. Crowds and [XXX] provide anonymity for HTTP requests; [...]
  289. [XXX Mention error recovery?]
  290. anonymizer\\
  291. pipenet\\
  292. freedom v1\\
  293. freedom v2\\
  294. onion routing v1\\
  295. isdn-mixes\\
  296. crowds\\
  297. real-time mixes, web mixes\\
  298. anonnet (marc rennhard's stuff)\\
  299. morphmix\\
  300. P5\\
  301. gnunet\\
  302. rewebbers\\
  303. tarzan\\
  304. herbivore\\
  305. hordes\\
  306. cebolla (?)\\
  307. [XXX Close by mentioning where Tor fits.]
  308. \Section{Design goals and assumptions}
  309. \label{sec:assumptions}
  310. \subsection{Goals}
  311. % Are these really our goals? ;) -NM
  312. Like other low-latency anonymity designs, Tor seeks to frustrate
  313. attackers from linking communication partners, or from linking
  314. multiple communications to or from a single point. Within this
  315. main goal, however, several design considerations have directed
  316. Tor's evolution.
  317. First, we have tried to build a {\bf deployable} system. [XXX why?]
  318. This requirement precludes designs that are expensive to run (for
  319. example, by requiring more bandwidth than volunteers will easily
  320. provide); designs that place a heavy liability burden on operators
  321. (for example, by allowing attackers to implicate operators in illegal
  322. activities); and designs that are difficult or expensive to implement
  323. (for example, by requiring kernel patches to many operating systems,
  324. or ).
  325. Second, the system must be {\bf usable}. A hard-to-use system has
  326. fewer users --- and because anonymity systems hide users among users, a
  327. system with fewer users provides less anonymity. Thus, usability is
  328. not only a convenience, but is a security requirement for anonymity
  329. systems.
  330. Third, the protocol must be {\bf extensible}, so that it can serve as
  331. a test-bed for future research in low-latency anonymity systems.
  332. (Note that while an extensible protocol benefits researchers, there is
  333. a danger that differing choices of extensions will render users
  334. distinguishable. Thus, implementations should not permit different
  335. protocol extensions to coexist in a single deployed network.)
  336. The protocol's design and security parameters must be {\bf
  337. conservative}. Additional features impose implementation and
  338. complexity costs. [XXX Say that we don't want to try to come up with
  339. speculative solutions to problems we don't KNOW how to solve? -NM]
  340. [XXX mention something about robustness? But we really aren't that
  341. robust. We just assume that tunneled protocols tolerate connection
  342. loss. -NM]
  343. \subsection{Non-goals}
  344. In favoring conservative, deployable designs, we have explicitly
  345. deferred a number of goals --- not because they are not desirable in
  346. anonymity systems --- but because solving them is either solved
  347. elsewhere, or an area of active research without a generally accepted
  348. solution.
  349. Unlike Tarzan or Morphmix, Tor does not attempt to scale to completely
  350. decentralized peer-to-peer environments with thousands of short-lived
  351. servers.
  352. Tor does not claim to provide a definitive solution to end-to-end
  353. timing or intersection attacks for users who do not run their own
  354. Onion Routers.
  355. % Does that mean we do claim to solve intersection attack for
  356. % the enclave-firewall model? -RD
  357. Tor does not provide \emph{protocol normalization} like the Anonymizer or
  358. Privoxy. In order to provide client indistinguishibility for
  359. complex and variable protocols such as HTTP, Tor must be layered with
  360. a filtering proxy such as Privoxy. Similarly, Tor does not currently
  361. integrate tunneling for non-stream-based protocols; this too must be
  362. provided by an external service.
  363. Tor is not steganographic: it doesn't try to conceal which users are
  364. sending or receiving communications.
  365. \SubSection{Adversary Model}
  366. \label{subsec:adversary-model}
  367. Like all practical low-latency systems, Tor is not secure against a
  368. global passive adversary, which is the most commonly assumed adversary
  369. for analysis of theoretical anonymous communication designs. The adversary
  370. we assume
  371. is weaker than global with respect to distribution, but it is not
  372. merely passive.
  373. We assume a threat model that expands on that from \cite{or-pet00}.
  374. The basic adversary components we consider are:
  375. \begin{description}
  376. \item[Observer:] can observe a connection (e.g., a sniffer on an
  377. Internet router), but cannot initiate connections. Observations may
  378. include timing and/or volume of packets as well as appearance of
  379. individual packets (including headers and content).
  380. \item[Disrupter:] can delay (indefinitely) or corrupt traffic on a
  381. link. Can change all those things that an observer can observe up to
  382. the limits of computational ability (e.g., cannot forge signatures
  383. unless a key is compromised).
  384. \item[Hostile initiator:] can initiate (or destroy) connections with
  385. specific routes as well as vary the timing and content of traffic
  386. on the connections it creates. A special case of the disrupter with
  387. additional abilities appropriate to its role in forming connections.
  388. \item[Hostile responder:] can vary the traffic on the connections made
  389. to it including refusing them entirely, intentionally modifying what
  390. it sends and at what rate, and selectively closing them. Also a
  391. special case of the disrupter.
  392. \item[Key breaker:] can break the key used to encrypt connection
  393. initiation requests sent to a Tor-node.
  394. % Er, there are no long-term private decryption keys. They have
  395. % long-term private signing keys, and medium-term onion (decryption)
  396. % keys. Plus short-term link keys. Should we lump them together or
  397. % separate them out? -RD
  398. %
  399. % Hmmm, I was talking about the keys used to encrypt the onion skin
  400. % that contains the public DH key from the initiator. Is that what you
  401. % mean by medium-term onion key? (``Onion key'' used to mean the
  402. % session keys distributed in the onion, back when there were onions.)
  403. % Also, why are link keys short-term? By link keys I assume you mean
  404. % keys that neighbor nodes use to superencrypt all the stuff they send
  405. % to each other on a link. Did you mean the session keys? I had been
  406. % calling session keys short-term and everything else long-term. I
  407. % know I was being sloppy. (I _have_ written papers formalizing
  408. % concepts of relative freshness.) But, there's some questions lurking
  409. % here. First up, I don't see why the onion-skin encryption key should
  410. % be any shorter term than the signature key in terms of threat
  411. % resistance. I understand that how we update onion-skin encryption
  412. % keys makes them depend on the signature keys. But, this is not the
  413. % basis on which we should be deciding about key rotation. Another
  414. % question is whether we want to bother with someone who breaks a
  415. % signature key as a particular adversary. He should be able to do
  416. % nearly the same as a compromised tor-node, although they're not the
  417. % same. I reworded above, I'm thinking we should leave other concerns
  418. % for later. -PS
  419. \item[Compromised Tor-node:] can arbitrarily manipulate the
  420. connections under its control, as well as creating new connections
  421. (that pass through itself).
  422. \end{description}
  423. All feasible adversaries can be composed out of these basic
  424. adversaries. This includes combinations such as one or more
  425. compromised Tor-nodes cooperating with disrupters of links on which
  426. those nodes are not adjacent, or such as combinations of hostile
  427. outsiders and link observers (who watch links between adjacent
  428. Tor-nodes). Note that one type of observer might be a Tor-node. This
  429. is sometimes called an honest-but-curious adversary. While an observer
  430. Tor-node will perform only correct protocol interactions, it might
  431. share information about connections and cannot be assumed to destroy
  432. session keys at end of a session. Note that a compromised Tor-node is
  433. stronger than any other adversary component in the sense that
  434. replacing a component of any adversary with a compromised Tor-node
  435. results in a stronger overall adversary (assuming that the compromised
  436. Tor-node retains the same signature keys and other private
  437. state-information as the component it replaces).
  438. In general we are more focused on traffic analysis attacks than
  439. traffic confirmation attacks. A user who runs a Tor proxy on his own
  440. machine, connects to some remote Tor-node and makes a connection to an
  441. open Internet site, such as a public web server, is vulnerable to
  442. traffic confirmation. That is, an active attacker who suspects that
  443. the particular client is communicating with the particular server will
  444. be able to confirm this if she can attack and observe both the
  445. connection between the Tor network and the client and that between the
  446. Tor network and the server. Even a purely passive attacker will be
  447. able to confirm if the timing and volume properties of the traffic on
  448. the connnection are unique enough. This is not to say that Tor offers
  449. no resistance to traffic confirmation; it does. We defer discussion
  450. of this point and of particular attacks until Section~\ref{sec:attacks},
  451. after we have described Tor in more detail. However, we note here some
  452. basic assumptions that affect the threat model.
  453. [XXX I think this next subsection should be cut, leaving its points
  454. for the attacks section. But I'm leaving it here for now. The above
  455. line refers to the immediately following SubSection.-PS]
  456. \SubSection{Known attacks against low-latency anonymity systems}
  457. \label{subsec:known-attacks}
  458. We discuss each of these attacks in more detail below, along with the
  459. aspects of the Tor design that provide defense. We provide a summary
  460. of the attacks and our defenses against them in Section~\ref{sec:attacks}.
  461. Passive attacks:
  462. simple observation,
  463. timing correlation,
  464. size correlation,
  465. option distinguishability,
  466. Active attacks:
  467. key compromise,
  468. iterated subpoena,
  469. run recipient,
  470. run a hostile node,
  471. compromise entire path,
  472. selectively DOS servers,
  473. introduce timing into messages,
  474. directory attacks,
  475. tagging attacks
  476. \SubSection{Assumptions}
  477. For purposes of this paper, we assume all directory servers are honest
  478. % No longer true, see subsec:dirservers below -RD
  479. and trusted. Perhaps more accurately, we assume that all users and
  480. nodes can perform their own periodic checks on information they have
  481. from directory servers and that all will always have access to at
  482. least one directory server that they trust and from which they obtain
  483. all directory information. Future work may include robustness
  484. techniques to cope with a minority dishonest servers.
  485. Somewhere between ten percent and twenty percent of nodes are assumed
  486. to be compromised. In some circumstances, e.g., if the Tor network is
  487. running on a hardened network where all operators have had
  488. background checks, the percent of compromised nodes might be much
  489. lower. It may be worthwhile to consider cases where many of the `bad'
  490. nodes are not fully compromised but simply (passive) observing
  491. adversaries or that some nodes have only had compromise of the keys
  492. that decrypt connection initiation requests. But, we assume for
  493. simplicity that `bad' nodes are compromised in the sense spelled out
  494. above. We assume that all adversary components, regardless of their
  495. capabilities are collaborating and are connected in an offline clique.
  496. We do not assume any hostile users, except in the context of
  497. % This sounds horrible. What do you mean we don't assume any hostile
  498. % users? Surely we can tolerate some? -RD
  499. rendezvous points. Nonetheless, we assume that users vary widely in
  500. both the duration and number of times they are connected to the Tor
  501. network. They can also be assumed to vary widely in the volume and
  502. shape of the traffic they send and receive.
  503. [XXX what else?]
  504. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  505. \Section{The Tor Design}
  506. \label{sec:design}
  507. \Section{Other design decisions}
  508. \SubSection{Exit policies and abuse}
  509. \label{subsec:exitpolicies}
  510. \SubSection{Directory Servers}
  511. \label{subsec:dirservers}
  512. First-generation Onion Routing designs \cite{or-jsac98,freedom2-arch} did
  513. % is or-jsac98 the right cite here? what's our stock OR cite? -RD
  514. in-band network status updates: each router flooded a signed statement
  515. to its neighbors, which propagated it onward. But anonymizing networks
  516. have different security goals than typical link-state routing protocols.
  517. For example, we worry more about delays (accidental or intentional)
  518. which cause different parts of the network to have different pictures
  519. of link-state and topology. We also worry about attacks to deceive a
  520. client about the router membership list, topology, or current network
  521. state. Such \emph{partitioning attacks} on client knowledge help an
  522. adversary with limited resources to efficiently deploy those resources
  523. when attacking a target.
  524. Instead, Tor uses a small group of redundant directory servers to
  525. track network topology and node state such as current keys and exit
  526. policies. The directory servers are normal onion routers, but there are
  527. only a few of them and they are more trusted. They listen on a separate
  528. port as an HTTP server, both so participants can fetch current network
  529. state and router lists (a \emph{directory}), and so other onion routers
  530. can upload a signed summary of their keys, address, bandwidth, exit
  531. policy, etc (\emph{server descriptors}.
  532. Of course, a variety of attacks remain. An adversary who controls a
  533. directory server can track certain clients by providing different
  534. information --- perhaps by listing only nodes under its control
  535. as working, or by informing only certain clients about a given
  536. node. Moreover, an adversary without control of a directory server can
  537. still exploit differences among client knowledge. If Eve knows that
  538. node $M$ is listed on server $D_1$ but not on $D_2$, she can use this
  539. knowledge to link traffic through $M$ to clients who have queried $D_1$.
  540. Thus these directory servers must be synchronized and redundant. The
  541. software is distributed with the signature public key of each directory
  542. server, and directories must be signed by a threshold of these keys.
  543. The directory servers in Tor are modeled after those in Mixminion
  544. \cite{minion-design}, but our situation is easier. Firstly, we make the
  545. simplifying assumption that all participants agree on who the directory
  546. servers are. Secondly, Mixminion needs to predict node behavior ---
  547. that is, build a reputation system for guessing future performance of
  548. nodes based on past performance, and then figure out a way to build
  549. a threshold consensus of these predictions. Tor just needs to get a
  550. threshold consensus of the current state of the network.
  551. The threshold consensus can be reached with standard Byzantine agreement
  552. techniques \cite{castro-liskov}.
  553. % Should I just stop the section here? Is the rest crap? -RD
  554. But this library, while more efficient than previous Byzantine agreement
  555. systems, is still complex and heavyweight for our purposes: we only need
  556. to compute a single algorithm, and we do not require strict in-order
  557. computation steps. The Tor directory servers build a consensus directory
  558. through a simple four-round broadcast protocol. First, each server signs
  559. and broadcasts its current opinion to the other directory servers; each
  560. server then rebroadcasts all the signed opinions it has received. At this
  561. point all directory servers check to see if anybody's cheating. If so,
  562. directory service stops, the humans are notified, and that directory
  563. server is permanently removed from the network. Assuming no cheating,
  564. each directory server then computes a local algorithm on the set of
  565. opinions, resulting in a uniform shared directory. Then the servers sign
  566. this directory and broadcast it; and finally all servers rebroadcast
  567. the directory and all the signatures.
  568. The rebroadcast steps ensure that a directory server is heard by either
  569. all of the other servers or none of them (some of the links between
  570. directory servers may be down). Broadcasts are feasible because there
  571. are so few directory servers (currently 3, but we expect to use as many
  572. as 9 as the network scales). The actual local algorithm for computing
  573. the shared directory is straightforward, and is described in the Tor
  574. specification \cite{tor-spec}.
  575. % we should, uh, add this to the spec. oh, and write it. -RD
  576. \Section{Rendezvous points: location privacy}
  577. \label{sec:rendezvous}
  578. Rendezvous points are a building block for \emph{location-hidden services}
  579. (aka responder anonymity) in the Tor network. Location-hidden
  580. services means Bob can offer a tcp service, such as a webserver,
  581. without revealing the IP of that service.
  582. We provide this censorship resistance for Bob by allowing him to
  583. advertise several onion routers (his \emph{Introduction Points}) as his
  584. public location. Alice, the client, chooses a node for her \emph{Meeting
  585. Point}. She connects to one of Bob's introduction points, informs him
  586. about her meeting point, and then waits for him to connect to the meeting
  587. point. This extra level of indirection means Bob's introduction points
  588. don't open themselves up to abuse by serving files directly, eg if Bob
  589. chooses a node in France to serve material distateful to the French. The
  590. extra level of indirection also allows Bob to respond to some requests
  591. and ignore others.
  592. We provide the necessary glue so that Alice can view webpages from Bob's
  593. location-hidden webserver with minimal invasive changes. Both Alice and
  594. Bob must run local onion proxies.
  595. The steps of a rendezvous:
  596. \begin{tightlist}
  597. \item Bob chooses some Introduction Points, and advertises them on a
  598. Distributed Hash Table (DHT).
  599. \item Bob establishes onion routing connections to each of his
  600. Introduction Points, and waits.
  601. \item Alice learns about Bob's service out of band (perhaps Bob told her,
  602. or she found it on a website). She looks up the details of Bob's
  603. service from the DHT.
  604. \item Alice chooses and establishes a Meeting Point (MP) for this
  605. transaction.
  606. \item Alice goes to one of Bob's Introduction Points, and gives it a blob
  607. (encrypted for Bob) which tells him about herself, the Meeting Point
  608. she chose, and the first half of an ephemeral key handshake. The
  609. Introduction Point sends the blob to Bob.
  610. \item Bob chooses whether to ignore the blob, or to onion route to MP.
  611. Let's assume the latter.
  612. \item MP plugs together Alice and Bob. Note that MP can't recognize Alice,
  613. Bob, or the data they transmit (they share a session key).
  614. \item Alice sends a Begin cell along the circuit. It arrives at Bob's
  615. onion proxy. Bob's onion proxy connects to Bob's webserver.
  616. \item Data goes back and forth as usual.
  617. \end{tightlist}
  618. When establishing an introduction point, Bob provides the onion router
  619. with a public ``introduction'' key. The hash of this public key
  620. identifies a unique service, and (since Bob is required to sign his
  621. messages) prevents anybody else from usurping Bob's introduction point
  622. in the future. Bob uses the same public key when establish the other
  623. introduction points for that service.
  624. The blob that Alice gives the introduction point includes a hash of Bob's
  625. public key to identify the service, an optional initial authentication
  626. token (the introduction point can do prescreening, eg to block replays),
  627. and (encrypted to Bob's public key) the location of the meeting point,
  628. a meeting cookie Bob should tell the meeting point so he gets connected to
  629. Alice, an optional authentication token so Bob choose whether to respond,
  630. and the first half of a DH key exchange. When Bob connects to the meeting
  631. place and gets connected to Alice's pipe, his first cell contains the
  632. other half of the DH key exchange.
  633. % briefly talk about our notion of giving cookies to people proportional
  634. % to how important they are, for location-protected servers hardened
  635. % against DDoS threat? -RD
  636. \subsection{Integration with user applications}
  637. For each service Bob offers, he configures his local onion proxy to know
  638. the local IP and port of the server, a strategy for authorizating Alices,
  639. and a public key. We assume the existence of a robust decentralized
  640. efficient lookup system which allows authenticated updates, eg
  641. \cite{cfs:sosp01}. (Each onion router could run a node in this lookup
  642. system; also note that as a stopgap measure, we can just run a simple
  643. lookup system on the directory servers.) Bob publishes into the DHT
  644. (indexed by the hash of the public key) the public key, an expiration
  645. time (``not valid after''), and the current introduction points for that
  646. service. Note that Bob's webserver is completely oblivious to the fact
  647. that it's hidden behind the Tor network.
  648. As far as Alice's experience goes, we require that her client interface
  649. remain a SOCKS proxy, and we require that she shouldn't have to modify
  650. her applications. Thus we encode all of the necessary information into
  651. the hostname (more correctly, fully qualified domain name) that Alice
  652. uses, eg when clicking on a url in her browser. Location-hidden services
  653. use the special top level domain called `.onion': thus hostnames take the
  654. form x.y.onion where x encodes the hash of PK, and y is the authentication
  655. cookie. Alice's onion proxy examines hostnames and recognizes when they're
  656. destined for a hidden server. If so, it decodes the PK and starts the
  657. rendezvous as described in the table above.
  658. \subsection{Previous rendezvous work}
  659. Ian Goldberg developed a similar notion of rendezvous points for
  660. low-latency anonymity systems \cite{ian-thesis}. His ``service tag''
  661. is the same concept as our ``hash of service's public key''. We make it
  662. a hash of the public key so it can be self-authenticating, and so the
  663. client can recognize the same service with confidence later on. His
  664. design differs from ours in the following ways though. Firstly, Ian
  665. suggests that the client should manually hunt down a current location of
  666. the service via Gnutella; whereas our use of the DHT makes lookup faster,
  667. more robust, and transparent to the user. Secondly, the client and server
  668. can share ephemeral DH keys, so at no point in the path is the plaintext
  669. exposed. Thirdly, our design is much more practical for deployment in a
  670. volunteer network, in terms of getting volunteers to offer introduction
  671. and meeting point services. The introduction points do not output any
  672. bytes to the clients. And the meeting points don't know the client,
  673. the server, or the stuff being transmitted. The indirection scheme
  674. is also designed with authentication/authorization in mind -- if the
  675. client doesn't include the right cookie with its request for service,
  676. the server doesn't even acknowledge its existence.
  677. \Section{Maintaining anonymity sets}
  678. \label{sec:maintaining-anonymity}
  679. packet counting attacks work great against initiators. need to do some
  680. level of obfuscation for that. standard link padding for passive link
  681. observers. long-range padding for people who own the first hop. are
  682. we just screwed against people who insert timing signatures into your
  683. traffic?
  684. Even regardless of link padding from Alice to the cloud, there will be
  685. times when Alice is simply not online. Link padding, at the edges or
  686. inside the cloud, does not help for this.
  687. how often should we pull down directories? how often send updated
  688. server descs?
  689. when we start up the client, should we build a circuit immediately,
  690. or should the default be to build a circuit only on demand? should we
  691. fetch a directory immediately?
  692. would we benefit from greater synchronization, to blend with the other
  693. users? would the reduced speed hurt us more?
  694. does the "you can't see when i'm starting or ending a stream because
  695. you can't tell what sort of relay cell it is" idea work, or is just
  696. a distraction?
  697. does running a server actually get you better protection, because traffic
  698. coming from your node could plausibly have come from elsewhere? how
  699. much mixing do you need before this is actually plausible, or is it
  700. immediately beneficial because many adversary can't see your node?
  701. do different exit policies at different exit nodes trash anonymity sets,
  702. or not mess with them much?
  703. do we get better protection against a realistic adversary by having as
  704. many nodes as possible, so he probably can't see the whole network,
  705. or by having a small number of nodes that mix traffic well? is a
  706. cascade topology a more realistic way to get defenses against traffic
  707. confirmation? does the hydra (many inputs, few outputs) topology work
  708. better? are we going to get a hydra anyway because most nodes will be
  709. middleman nodes?
  710. using a circuit many times is good because it's less cpu work
  711. good because of predecessor attacks with path rebuilding
  712. bad because predecessor attacks can be more likely to link you with a
  713. previous circuit since you're so verbose
  714. bad because each thing you do on that circuit is linked to the other
  715. things you do on that circuit
  716. Because Tor runs over TCP, when one of the servers goes down it seems
  717. that all the circuits (and thus streams) going over that server must
  718. break. This reduces anonymity because everybody needs to reconnect
  719. right then (does it? how much?) and because exit connections all break
  720. at the same time, and it also reduces usability. It seems the problem
  721. is even worse in a p2p environment, because so far such systems don't
  722. really provide an incentive for nodes to stay connected when they're
  723. done browsing, so we would expect a much higher churn rate than for
  724. onion routing. Are there ways of allowing streams to survive the loss
  725. of a node in the path?
  726. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  727. \Section{Attacks and Defenses}
  728. \label{sec:attacks}
  729. Below we summarize a variety of attacks and how well our design withstands
  730. them.
  731. \begin{enumerate}
  732. \item \textbf{Passive attacks}
  733. \begin{itemize}
  734. \item \emph{Simple observation.}
  735. \item \emph{Timing correlation.}
  736. \item \emph{Size correlation.}
  737. \item \emph{Option distinguishability.}
  738. \end{itemize}
  739. \item \textbf{Active attacks}
  740. \begin{itemize}
  741. \item \emph{Key compromise.}
  742. \item \emph{Iterated subpoena.}
  743. \item \emph{Run recipient.}
  744. \item \emph{Run a hostile node.}
  745. \item \emph{Compromise entire path.}
  746. \item \emph{Selectively DoS servers.}
  747. \item \emph{Introduce timing into messages.}
  748. \item \emph{Tagging attacks.}
  749. the exit node can change the content you're getting to try to
  750. trick you. similarly, when it rejects you due to exit policy,
  751. it could give you a bad IP that sends you somewhere else.
  752. \end{itemize}
  753. \item \textbf{Directory attacks}
  754. \begin{itemize}
  755. \item foo
  756. \end{itemize}
  757. \end{enumerate}
  758. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  759. \Section{Future Directions and Open Problems}
  760. \label{sec:conclusion}
  761. Tor brings together many innovations into
  762. a unified deployable system. But there are still several attacks that
  763. work quite well, as well as a number of sustainability and run-time
  764. issues remaining to be ironed out. In particular:
  765. \begin{itemize}
  766. \item \emph{Scalability:} Since Tor's emphasis currently is on simplicity
  767. of design and deployment, the current design won't easily handle more
  768. than a few hundred servers, because of its clique topology. Restricted
  769. route topologies \cite{danezis-pets03} promise comparable anonymity
  770. with much better scaling properties, but we must solve problems like
  771. how to randomly form the network without introducing net attacks.
  772. % [cascades are a restricted route topology too. we must mention
  773. % earlier why we're not satisfied with the cascade approach.]-RD
  774. % [We do. At least
  775. \item \emph{Cover traffic:} Currently we avoid cover traffic because
  776. it introduces clear performance and bandwidth costs, but and its
  777. security properties are not well understood. With more research
  778. \cite{SS03,defensive-dropping}, the price/value ratio may change, both for
  779. link-level cover traffic and also long-range cover traffic. In particular,
  780. we expect restricted route topologies to reduce the cost of cover traffic
  781. because there are fewer links to cover.
  782. \item \emph{Better directory distribution:} Even with the threshold
  783. directory agreement algorithm described in \ref{subsec:dirservers},
  784. the directory servers are still trust bottlenecks. We must find more
  785. decentralized yet practical ways to distribute up-to-date snapshots of
  786. network status without introducing new attacks.
  787. \item \emph{Implementing location-hidden servers:} While Section
  788. \ref{sec:rendezvous} provides a design for rendezvous points and
  789. location-hidden servers, this feature has not yet been implemented.
  790. We will likely encounter additional issues, both in terms of usability
  791. and anonymity, that must be resolved.
  792. \item \emph{Wider-scale deployment:} The original goal of Tor was to
  793. gain experience in deploying an anonymizing overlay network, and learn
  794. from having actual users. We are now at the point where we can start
  795. deploying a wider network. We will see what happens!
  796. % ok, so that's hokey. fix it. -RD
  797. \end{itemize}
  798. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  799. %\Section{Acknowledgments}
  800. %% commented out for anonymous submission
  801. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  802. \bibliographystyle{latex8}
  803. \bibliography{tor-design}
  804. \end{document}
  805. % Style guide:
  806. % U.S. spelling
  807. % avoid contractions (it's, can't, etc.)
  808. % 'mix', 'mixes' (as noun)
  809. % 'mix-net'
  810. % 'mix', 'mixing' (as verb)
  811. % 'Mixminion Project'
  812. % 'Mixminion' (meaning the protocol suite or the network)
  813. % 'Mixmaster' (meaning the protocol suite or the network)
  814. % 'middleman' [Not with a hyphen; the hyphen has been optional
  815. % since Middle English.]
  816. % 'nymserver'
  817. % 'Cypherpunk', 'Cypherpunks', 'Cypherpunk remailer'
  818. %
  819. % 'Whenever you are tempted to write 'Very', write 'Damn' instead, so
  820. % your editor will take it out for you.' -- Misquoted from Mark Twain