tor-design.tex 64 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346
  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 Second-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. Tor is the successor to Onion Routing
  43. and addresses many limitations in the original Onion Routing design.
  44. Tor works in a real-world Internet environment,
  45. % it's user-space too
  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. % and we present a big list of open problems at the end
  50. \end{abstract}
  51. %\begin{center}
  52. %\textbf{Keywords:} anonymity, peer-to-peer, remailer, nymserver, reply block
  53. %\end{center}
  54. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  55. \Section{Overview}
  56. \label{sec:intro}
  57. Onion Routing is a distributed overlay network designed to anonymize
  58. low-latency TCP-based applications such as web browsing, secure shell,
  59. and instant messaging. Clients choose a path through the network and
  60. build a \emph{virtual circuit}, in which each node (or ``onion router'')
  61. in the path knows its
  62. predecessor and successor, but no others. Traffic flowing down the circuit
  63. is sent in fixed-size \emph{cells}, which are unwrapped by a symmetric key
  64. at each node (like the layers of an onion) and relayed downstream. The
  65. original Onion Routing project published several design and analysis
  66. papers
  67. \cite{or-jsac98,or-discex00,or-ih96,or-pet00}. While there was briefly
  68. a wide area Onion Routing network,
  69. % how long is briefly? a day, a month? -RD
  70. the only long-running and publicly accessible
  71. implementation was a fragile proof-of-concept that ran on a single
  72. machine. Many critical design and deployment issues were never resolved,
  73. and the design has not been updated in several years.
  74. Here we describe Tor, a protocol for asynchronous, loosely
  75. federated onion routers that provides the following improvements over
  76. the old Onion Routing design, and over other low-latency anonymity systems:
  77. \begin{tightlist}
  78. \item \textbf{Perfect forward secrecy:} The original Onion Routing
  79. design was vulnerable to a single hostile node recording traffic and later
  80. compromising successive nodes in the circuit and forcing them to
  81. decrypt it.
  82. Rather than using a single onion to lay each circuit,
  83. Tor now uses an incremental or \emph{telescoping}
  84. path-building design, where the initiator negotiates session keys with
  85. each successive hop in the circuit. Once these keys are deleted,
  86. subsequent compromised nodes cannot decrypt old traffic.
  87. As a side benefit, onion replay detection is no longer
  88. necessary, and the process of building circuits is more reliable, since
  89. the initiator knows when a hop fails and can then try extending to a new node.
  90. % Perhaps mention that not all of these are things that we invented. -NM
  91. \item \textbf{Separation of protocol cleaning from anonymity:}
  92. The original Onion Routing design required a separate ``application
  93. proxy'' for each
  94. supported application protocol --- most
  95. of which were never written, so many applications were never supported.
  96. Tor uses the standard and near-ubiquitous SOCKS
  97. \cite{socks4,socks5} proxy interface, allowing us to support most TCP-based
  98. programs without modification. This design change allows Tor to
  99. use the filtering features of privacy-enhancing
  100. application-level proxies such as Privoxy without having to
  101. incorporate those features itself.
  102. \item \textbf{Many TCP streams can share one circuit:} The original
  103. Onion Routing design built a separate circuit for each application-level
  104. request.
  105. This hurt perfomance by requiring multiple public key operations for
  106. every request, and also presented
  107. a threat to anonymity (see Section~\ref{maintaining-anonymity}).
  108. \footnote{The first Onion Routing design \cite{or-ih96} protected against
  109. this threat to some
  110. extent by encouraging users to hide network access behind an onion
  111. router/firewall that was also forwarding traffic from other nodes.
  112. However, it is desirable for users to
  113. benefit from Onion Routing even when they can't run their own
  114. onion routers.
  115. %Such users, especially if they engage in certain unusual
  116. %communication behaviors, may be identifiable \cite{wright03}.
  117. %To
  118. %complicate the possibility of such attacks Tor multiplexes many
  119. %stream down each circuit, but still rotates the circuit
  120. %periodically to avoid too much linkability from requests on a single
  121. %circuit.
  122. %
  123. % [This digression probably belongs in maintaining-anonymity. -NM
  124. }
  125. The current Tor design multiplexes multiple TCP streams along each virtual
  126. circuit, in order to improve efficiency and anonymity.
  127. \item \textbf{No mixing, padding, or traffic shaping:}
  128. The original Onion Routing
  129. design called for full link padding both between onion routers and between
  130. onion proxies (that is, users) and onion routers \cite{or-jsac98}. The
  131. later analysis paper \cite{or-pet00} suggested \emph{traffic shaping}
  132. to provide similar protection but use less bandwidth, but did not go
  133. into detail. However, recent research \cite{econymics} and deployment
  134. experience \cite{freedom21-security} suggest that this level of resource
  135. use is not practical or economical; and even full link padding is still
  136. vulnerable to active attacks \cite{defensive-dropping}.
  137. %[An upcoming FC04 paper. I'll add a cite when it's out. -RD]
  138. Thus, absent a proven design for traffic shaping, Tor currently generates
  139. no dummy traffic.
  140. % We don't mention mixing in the above, but we mention it in the title. -NM
  141. \item \textbf{Leaky-pipe circuit topology:} Through in-band
  142. signalling within the
  143. circuit, Tor initiators can direct traffic to nodes partway down the
  144. circuit. This not only allows for long-range padding to frustrate traffic
  145. shape and volume attacks at the initiator \cite{defensive-dropping},
  146. but because circuits are used by more than one application, it also
  147. allows traffic to exit the circuit from the middle -- thus
  148. frustrating traffic shape and volume attacks based on observing exit
  149. points.
  150. %Or something like that. hm. Tone this down maybe? Or support it. -RD
  151. %How's that? -PS
  152. \item \textbf{Congestion control:} Earlier anonymity designs do not
  153. address traffic bottlenecks. Unfortunately, typical approaches to load
  154. balancing and flow control in overlay networks involve inter-node control
  155. communication and global views of traffic. Tor's decentralized ack-based
  156. congestion control maintains reasonable anonymity while allowing nodes
  157. at the edges of the network to detect congestion or flooding attacks
  158. and send less data until the congestion subsides.
  159. \item \textbf{Directory servers:} Rather take the original Onion
  160. Routing's approach and attempting to flood
  161. link-state information through the network --- an approach which can be
  162. unreliable and
  163. open to partitioning attacks or outright deception --- Tor takes a simplified
  164. view towards distributing link-state information. Certain more trusted
  165. onion routers also serve as directory servers; they provide signed
  166. \emph{directories} describing all routers they know about, and which
  167. are currently up. Users periodically download these directories via HTTP.
  168. \item \textbf{End-to-end integrity checking:} Without integrity checking
  169. on traffic going through the network, any onion router on the path
  170. can change the contents of cells as they pass by --- for example, to redirect a
  171. connection on the fly so it connects to a different webserver, or to
  172. tag encrypted traffic and look for the tagged traffic at the network
  173. edges \cite{minion-design}. Tor hampers these attacks by checking data
  174. integrity before it leaves the network.
  175. \item \textbf{Robustness to failed nodes:} A failed node in a traditional
  176. mix network means lost messages, but thanks to Tor's step-by-step
  177. circuit building, users can notice failed
  178. nodes while building circuits and route around them. Additionally,
  179. liveness information from directories allows users to avoid
  180. unreliable nodes in the first place.
  181. %We further provide a
  182. %simple mechanism that allows connections to be established despite recent
  183. %node failure or slightly dated information from a directory server. Tor
  184. %permits onion routers to have \emph{router twins} --- nodes that share
  185. %the same private decryption key. Note that because connections now have
  186. %perfect forward secrecy, an onion router still cannot read the traffic
  187. %on a connection established through its twin even while that connection
  188. %is active. Also, which nodes are twins can change dynamically depending
  189. %on current circumstances, and twins may or may not be under the same
  190. %administrative authority.
  191. %
  192. %[Commented out; Router twins provide no real increase in robustness
  193. %to failed nodes. If a non-twinned node goes down, the
  194. %circuit-builder notices this and routes around it. Circuit-building
  195. %is offline, so there shouldn't even be a latency hit. -NM]
  196. \item \textbf{Variable exit policies:} Tor provides a consistent
  197. mechanism for
  198. each node to specify and advertise a policy describing the hosts and
  199. ports to which it will connect. These exit policies
  200. are critical in a volunteer-based distributed infrastructure, because
  201. each operator is comfortable with allowing different types of traffic
  202. to exit the Tor network from his node.
  203. \item \textbf{Implementable in user-space:} Because it only attempts to
  204. anonymize TCP streams, Tor differs from some other anonymity
  205. systems\cite{freedom} in that it does not require patches to an operating
  206. system's network stack in order to operate. Although this approach is less
  207. flexible, it has proven valuable to Tor's portability and deployabilitiy.
  208. \item \textbf{Rendezvous points and location-protected servers:} Tor
  209. provides an integrated mechanism for responder-anonymity
  210. location-protected servers. Previous Onion Routing designs included
  211. long-lived ``reply onions'' which could be used to build virtual
  212. circuits towards a hidden server, but this design is vulnerable to
  213. flooding attacks, and is incompatible with forward security. In Tor's
  214. current design, clients use {\it introduction points} to negotiate {\it
  215. rendezvous points} to connect with hidden servers, and reply onions
  216. are no longer required.
  217. \end{tightlist}
  218. [XXX carefully mention implementation, emphasizing that experience
  219. deploying isn't there yet, and not all features are implemented.
  220. Mention that it runs, is kinda alpha, kinda deployed, runs on win32.]
  221. We review previous work in Section \ref{sec:background}, describe
  222. our goals and assumptions in Section \ref{sec:assumptions},
  223. and then address the above list of improvements in Sections
  224. \ref{sec:design}-\ref{sec:maintaining-anonymity}. We then summarize
  225. how our design stands up to known attacks, and conclude with a list of
  226. open problems.
  227. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  228. \Section{Background and threat model}
  229. \label{sec:background}
  230. \SubSection{Related work}
  231. \label{sec:related-work}
  232. Modern anonymity designs date to Chaum's Mix-Net\cite{chaum-mix} design of
  233. 1981. Chaum proposed hiding sender-recipient connections by wrapping
  234. messages in several layers of public key cryptography, and relaying them
  235. through a path composed of Mix servers. Mix servers in turn decrypt, delay,
  236. and re-order messages, before relay them along the path towards their
  237. destinations.
  238. Subsequent relay-based anonymity designs have diverged in two
  239. principal directions. Some have attempted to maximize anonymity at
  240. the cost of introducing comparatively large and variable latencies,
  241. for example, Babel\cite{babel}, Mixmaster\cite{mixmaster-spec}, and
  242. Mixminion\cite{minion-design}. Because of this
  243. trade-off, such \emph{high-latency} networks are well-suited for anonymous
  244. email, but introduce too much lag for interactive tasks such as web browsing,
  245. internet chat, or SSH connections.
  246. % Parts of this graf belongs later in expository order. Some of the
  247. % sentences seem superficially unrelated.
  248. Tor belongs to the second category: \emph{low-latency} designs that
  249. attempt to anonymize interactive network traffic. Because such
  250. traffic tends to involve a relatively large numbers of packets, it is
  251. difficult to prevent an attacker who can eavesdrop entry and exit
  252. points from correlating packets entering the anonymity network with
  253. packets leaving it. Although some work has been done to frustrate
  254. these attacks, most designs protect primarily against traffic analysis
  255. rather than traffic confirmation \cite{or-jsac98}. One can pad and
  256. limit communication to a constant rate or at least to control the
  257. variation in traffic shape. This can have prohibitive bandwidth costs
  258. and/or performance limitations. One can also use a cascade (fixed
  259. shared route) with a relatively fixed set of users. This assumes a
  260. significant degree of agreement and provides an easier target for an active
  261. attacker since the endpoints are generally known. However, a practical
  262. network with both of these features and thousands of active users has
  263. been run for many years (the Java Anon Proxy, aka Web MIXes,
  264. \cite{web-mix}).
  265. Another low latency design that was proposed independently and at
  266. about the same time as the original Onion Routing was PipeNet \cite{pipenet}.
  267. It provided anonymity protections that were stronger than Onion Routing's,
  268. but at the cost of allowing a single user to shut down the network simply
  269. by not sending. It was also never implemented or formally published.
  270. The simplest low-latency designs are single-hop proxies such as the
  271. Anonymizer \cite{anonymizer}, wherein a single trusted server removes
  272. identifying users' data before relaying it. These designs are easy to
  273. analyze, but require end-users to trust the anonymizing proxy.
  274. More complex are distributed-trust, channel-based anonymizing systems. In
  275. these designs, a user establishes one or more medium-term bidirectional
  276. end-to-end tunnels to exit servers, and uses those tunnels to deliver a
  277. number of low-latency packets to and from one or more destinations per
  278. tunnel. Establishing tunnels is comparatively expensive and typically
  279. requires public-key cryptography, whereas relaying packets along a tunnel is
  280. comparatively inexpensive. Because a tunnel crosses several servers, no
  281. single server can learn the user's communication partners.
  282. %[Ouch: We haven't said what an onion is yet, but we use the word here! -NM]
  283. Systems such as earlier versions of Freedom and the original Onion Routing
  284. build the anonymous channel all at once (using an onion).
  285. Later designs of Freedom and Tor as described herein build
  286. the channel in stages, as does AnonNet
  287. \cite{anonnet}. Amongst other things, this makes perfect forward
  288. secrecy feasible.
  289. Some systems, such as Crowds \cite{crowds-tissec}, do not rely on the
  290. changing appearance of packets to hide the path; rather they employ
  291. mechanisms so that an intermediary cannot be sure when it is
  292. receiving from/sending to the ultimate initiator. There is no public-key
  293. encryption needed for Crowds, but the responder and all data are
  294. visible to all nodes on the path so that anonymity of connection
  295. initiator depends on filtering all identifying information from the
  296. data stream. Crowds is also designed only for HTTP traffic.
  297. Hordes \cite{hordes-jcs} is based on Crowds but also uses multicast
  298. responses to hide the initiator. Herbivore \cite{herbivore} and
  299. P5 \cite{p5} go even further requiring broadcast.
  300. They each use broadcast in different ways, and tradeoffs are made to
  301. make broadcast more practical. Both Herbivore and P5 are designed primarily
  302. for communication between communicating peers, although Herbivore
  303. permits external connections by requesting a peer to serve as a proxy.
  304. Allowing easy connections to nonparticipating responders or recipients
  305. is a practical requirement for many users, e.g., to visit
  306. nonparticipating Web sites or to exchange mail with nonparticipating
  307. recipients.
  308. Distributed-trust anonymizing systems differ in how they prevent attackers
  309. from controlling too many servers and thus compromising too many user paths.
  310. Some protocols rely on a centrally maintained set of well-known anonymizing
  311. servers. The current Tor design falls into this category.
  312. Others (such as Tarzan and MorphMix) allow unknown users to run
  313. servers, while using a limited resource (DHT space for Tarzan; IP space for
  314. MorphMix) to prevent an attacker from owning too much of the network.
  315. Crowds uses a centralized ``blender'' to enforce Crowd membership
  316. policy. For small crowds it is suggested that familiarity with all
  317. members is adequate. For large diverse crowds, limiting accounts in
  318. control of any one party is more difficult:
  319. ``(e.g., the blender administrator sets up an account for a user only
  320. after receiving a written, notarized request from that user) and each
  321. account to one jondo, and by monitoring and limiting the number of
  322. jondos on any one net- work (using IP address), the attacker would be
  323. forced to launch jondos using many different identities and on many
  324. different networks to succeed'' \cite{crowds-tissec}.
  325. Tor is not primarily designed for censorship resistance but rather
  326. for anonymous communication. However, Tor's rendezvous points, which
  327. enable connections between mutually anonymous entities, also
  328. facilitate connections to hidden servers. These building blocks to
  329. censorship resistance and other capabilities are described in
  330. Section~\ref{sec:rendezvous}. Location-hidden servers are an
  331. essential component for anonymous publishing systems such as
  332. Publius\cite{publius}, Free Haven\cite{freehaven-berk}, and
  333. Tangler\cite{tangler}.
  334. [XXX I'm considering the subsection as ended here for now. I'm leaving the
  335. following notes in case we want to revisit any of them. -PS]
  336. Channel-based anonymizing systems also differ in their use of dummy traffic.
  337. [XXX]
  338. Finally, several systems provide low-latency anonymity without channel-based
  339. communication. Crowds and [XXX] provide anonymity for HTTP requests; [...]
  340. [XXX Mention error recovery?]
  341. STILL NOT MENTIONED:
  342. isdn-mixes\\
  343. real-time mixes\\
  344. rewebbers\\
  345. cebolla\\
  346. [XXX Close by mentioning where Tor fits.]
  347. \Section{Design goals and assumptions}
  348. \label{sec:assumptions}
  349. \subsection{Goals}
  350. % Reformat this section like ``Adversary Model'' is formatted. -NM
  351. Like other low-latency anonymity designs, Tor seeks to frustrate
  352. attackers from linking communication partners, or from linking
  353. multiple communications to or from a single point. Within this
  354. main goal, however, several design considerations have directed
  355. Tor's evolution.
  356. First, we have tried to build a {\bf deployable} system. [XXX why?]
  357. This requirement precludes designs that are expensive to run (for
  358. example, by requiring more bandwidth than volunteers will easily
  359. provide); designs that place a heavy liability burden on operators
  360. (for example, by allowing attackers to implicate operators in illegal
  361. activities); and designs that are difficult or expensive to implement
  362. (for example, by requiring kernel patches to many operating systems,
  363. or ). [Only anon people need to run special software! Look at minion
  364. reviews]
  365. Second, the system must be {\bf usable}. A hard-to-use system has
  366. fewer users --- and because anonymity systems hide users among users, a
  367. system with fewer users provides less anonymity. Thus, usability is
  368. not only a convenience, but is a security requirement for anonymity
  369. systems. In order to be usable, Tor should with most of a
  370. user's unmodified aplication; shouldn't introduce prohibitive delays; and
  371. [XXX what else?].
  372. Third, the protocol must be {\bf extensible}, so that it can serve as
  373. a test-bed for future research in low-latency anonymity systems.
  374. (Note that while an extensible protocol benefits researchers, there is
  375. a danger that differing choices of extensions will render users
  376. distinguishable. Thus, implementations should not permit different
  377. protocol extensions to coexist in a single deployed network.)
  378. % We should mention that there's a specification someplace: the spec makes us
  379. % easier to extend too. -NM
  380. The protocol's design and security parameters must be {\bf
  381. conservative}. Additional features impose implementation and
  382. complexity costs. [XXX Say that we don't want to try to come up with
  383. speculative solutions to problems we don't KNOW how to solve? -NM]
  384. \subsection{Non-goals}
  385. In favoring conservative, deployable designs, we have explicitly
  386. deferred a number of goals --- not because they are not desirable in
  387. anonymity systems --- but because they are either solved
  388. elsewhere, or an area of active research without a generally accepted
  389. solution.
  390. Unlike Tarzan or Morphmix, Tor does not attempt to scale to completely
  391. decentralized peer-to-peer environments with thousands of short-lived
  392. servers, many of which may be controlled by an adversary.
  393. Tor does not claim to provide a definitive solution to end-to-end
  394. timing or intersection attacks for users who do not run their own
  395. Onion Routers.
  396. % Mention would-be approaches. -NM
  397. % Does that mean we do claim to solve intersection attack for
  398. % the enclave-firewall model? -RD
  399. Tor does not provide \emph{protocol normalization} like the Anonymizer or
  400. Privoxy. In order to provide client indistinguishibility for
  401. complex and variable protocols such as HTTP, Tor must be layered with
  402. a filtering proxy such as Privoxy. Similarly, Tor does not currently
  403. integrate tunneling for non-stream-based protocols; this too must be
  404. provided by an external service.
  405. Tor is not steganographic: it doesn't try to conceal which users are
  406. sending or receiving communications.
  407. \SubSection{Adversary Model}
  408. \label{subsec:adversary-model}
  409. Like all practical low-latency systems, Tor is not secure against a
  410. global passive adversary, which is the most commonly assumed adversary
  411. for analysis of theoretical anonymous communication designs. The adversary
  412. we assume
  413. is weaker than global with respect to distribution, but it is not
  414. merely passive.
  415. We assume a threat model that expands on that from \cite{or-pet00}.
  416. The basic adversary components we consider are:
  417. \begin{description}
  418. \item[Observer:] can observe a connection (e.g., a sniffer on an
  419. Internet router), but cannot initiate connections. Observations may
  420. include timing and/or volume of packets as well as appearance of
  421. individual packets (including headers and content).
  422. \item[Disrupter:] can delay (indefinitely) or corrupt traffic on a
  423. link. Can change all those things that an observer can observe up to
  424. the limits of computational ability (e.g., cannot forge signatures
  425. unless a key is compromised).
  426. \item[Hostile initiator:] can initiate (or destroy) connections with
  427. specific routes as well as vary the timing and content of traffic
  428. on the connections it creates. A special case of the disrupter with
  429. additional abilities appropriate to its role in forming connections.
  430. \item[Hostile responder:] can vary the traffic on the connections made
  431. to it including refusing them entirely, intentionally modifying what
  432. it sends and at what rate, and selectively closing them. Also a
  433. special case of the disrupter.
  434. \item[Key breaker:] can break the key used to encrypt connection
  435. initiation requests sent to a Tor-node.
  436. % Er, there are no long-term private decryption keys. They have
  437. % long-term private signing keys, and medium-term onion (decryption)
  438. % keys. Plus short-term link keys. Should we lump them together or
  439. % separate them out? -RD
  440. %
  441. % Hmmm, I was talking about the keys used to encrypt the onion skin
  442. % that contains the public DH key from the initiator. Is that what you
  443. % mean by medium-term onion key? (``Onion key'' used to mean the
  444. % session keys distributed in the onion, back when there were onions.)
  445. % Also, why are link keys short-term? By link keys I assume you mean
  446. % keys that neighbor nodes use to superencrypt all the stuff they send
  447. % to each other on a link. Did you mean the session keys? I had been
  448. % calling session keys short-term and everything else long-term. I
  449. % know I was being sloppy. (I _have_ written papers formalizing
  450. % concepts of relative freshness.) But, there's some questions lurking
  451. % here. First up, I don't see why the onion-skin encryption key should
  452. % be any shorter term than the signature key in terms of threat
  453. % resistance. I understand that how we update onion-skin encryption
  454. % keys makes them depend on the signature keys. But, this is not the
  455. % basis on which we should be deciding about key rotation. Another
  456. % question is whether we want to bother with someone who breaks a
  457. % signature key as a particular adversary. He should be able to do
  458. % nearly the same as a compromised tor-node, although they're not the
  459. % same. I reworded above, I'm thinking we should leave other concerns
  460. % for later. -PS
  461. \item{Hostile Tor node:] can arbitrarily manipulate the
  462. connections under its control, as well as creating new connections
  463. (that pass through itself).
  464. \end{description}
  465. All feasible adversaries can be composed out of these basic
  466. adversaries. This includes combinations such as one or more
  467. compromised Tor-nodes cooperating with disrupters of links on which
  468. those nodes are not adjacent, or such as combinations of hostile
  469. outsiders and link observers (who watch links between adjacent
  470. Tor-nodes). Note that one type of observer might be a Tor-node. This
  471. is sometimes called an honest-but-curious adversary. While an observer
  472. Tor-node will perform only correct protocol interactions, it might
  473. share information about connections and cannot be assumed to destroy
  474. session keys at end of a session. Note that a compromised Tor-node is
  475. stronger than any other adversary component in the sense that
  476. replacing a component of any adversary with a compromised Tor-node
  477. results in a stronger overall adversary (assuming that the compromised
  478. Tor-node retains the same signature keys and other private
  479. state-information as the component it replaces).
  480. In general we are more focused on traffic analysis attacks than
  481. traffic confirmation attacks. A user who runs a Tor proxy on his own
  482. machine, connects to some remote Tor-node and makes a connection to an
  483. open Internet site, such as a public web server, is vulnerable to
  484. traffic confirmation. That is, an active attacker who suspects that
  485. the particular client is communicating with the particular server will
  486. be able to confirm this if she can attack and observe both the
  487. connection between the Tor network and the client and that between the
  488. Tor network and the server. Even a purely passive attacker will be
  489. able to confirm if the timing and volume properties of the traffic on
  490. the connnection are unique enough. This is not to say that Tor offers
  491. no resistance to traffic confirmation; it does. We defer discussion
  492. of this point and of particular attacks until Section~\ref{sec:attacks},
  493. after we have described Tor in more detail. However, we note here some
  494. basic assumptions that affect the threat model.
  495. [XXX I think this next subsection should be cut, leaving its points
  496. for the attacks section. But I'm leaving it here for now. The above
  497. line refers to the immediately following SubSection.-PS]
  498. \SubSection{Known attacks against low-latency anonymity systems}
  499. \label{subsec:known-attacks}
  500. % Should be merged into ``Threat model'' and reiterated in Attacks. -NM
  501. We discuss each of these attacks in more detail below, along with the
  502. aspects of the Tor design that provide defense. We provide a summary
  503. of the attacks and our defenses against them in Section~\ref{sec:attacks}.
  504. Passive attacks:
  505. simple observation,
  506. timing correlation,
  507. size correlation,
  508. option distinguishability,
  509. Active attacks:
  510. key compromise,
  511. iterated subpoena,
  512. run recipient,
  513. run a hostile node,
  514. compromise entire path,
  515. selectively DOS servers,
  516. introduce timing into messages,
  517. directory attacks,
  518. tagging attacks,
  519. smear attacks,
  520. entrapment attacks
  521. \SubSection{Assumptions}
  522. % Should be merged into ``Threat model''.
  523. For purposes of this paper, we assume all directory servers are honest
  524. % No longer true, see subsec:dirservers below -RD
  525. and trusted. Perhaps more accurately, we assume that all users and
  526. nodes can perform their own periodic checks on information they have
  527. from directory servers and that all will always have access to at
  528. least one directory server that they trust and from which they obtain
  529. all directory information. Future work may include robustness
  530. techniques to cope with a minority dishonest servers.
  531. Somewhere between ten percent and twenty percent of nodes are assumed
  532. to be compromised. In some circumstances, e.g., if the Tor network is
  533. running on a hardened network where all operators have had
  534. background checks, the percent of compromised nodes might be much
  535. lower. It may be worthwhile to consider cases where many of the `bad'
  536. nodes are not fully compromised but simply (passive) observing
  537. adversaries or that some nodes have only had compromise of the keys
  538. that decrypt connection initiation requests. But, we assume for
  539. simplicity that `bad' nodes are compromised in the sense spelled out
  540. above. We assume that all adversary components, regardless of their
  541. capabilities are collaborating and are connected in an offline clique.
  542. We do not assume any hostile users, except in the context of
  543. % This sounds horrible. What do you mean we don't assume any hostile
  544. % users? Surely we can tolerate some? -RD
  545. rendezvous points. Nonetheless, we assume that users vary widely in
  546. both the duration and number of times they are connected to the Tor
  547. network. They can also be assumed to vary widely in the volume and
  548. shape of the traffic they send and receive.
  549. [XXX what else?]
  550. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  551. \Section{The Tor Design}
  552. \label{sec:design}
  553. The Tor network is an overlay network; each node is called an onion router
  554. (OR). Onion routers run on normal computers without needing any special
  555. privileges. Each OR maintains a long-term TLS connection to every other
  556. OR (although we look at ways to relax this clique-topology assumption in
  557. section \ref{subsec:restricted-routes}). A subset of the ORs also act as
  558. directory servers, tracking which routers are currently in the network;
  559. see section \ref{subsec:dirservers} for directory server details. Users
  560. run local software called an onion proxy (OP) that fetches directories,
  561. establishes paths (called \emph{virtual circuits}) over the network,
  562. and handles connections from the user applications. Onion proxies accept
  563. TCP streams and multiplex them across the virtual circuit. The onion
  564. router on the other side of the circuit connects to the destinations of
  565. the TCP streams and relays data.
  566. Onion routers have three types of keys. The first key is the identity
  567. (signing) key. An OR uses this key to sign TLS certificates, to sign its
  568. router descriptor (a summary of its keys, address, bandwidth, exit policy,
  569. etc), and to sign directories if it is a directory server. Changing the
  570. identity key of a router is considered equivalent to creating a new
  571. router. The second key is the onion (decryption) key, which is used
  572. for decrypting requests from users to set up a circuit and negotiate
  573. ephemeral keys. Thirdly, each OR shares link keys (generated by TLS)
  574. with the other ORs it's connected to. We discuss rotating these keys in
  575. Section \ref{subsec:rotating-keys}.
  576. Section \ref{subsec:cells} discusses the structure of the fixed-size
  577. \emph{cells} that are the unit of communication in Tor. We describe
  578. in Section \ref{subsec:circuits} how circuits work, and how they are
  579. built, extended, truncated, and destroyed. Section \ref{subsec:tcp}
  580. discusses the process of opening TCP streams through Tor, and finally
  581. Section \ref{subsec:congestion} talks about congestion control and
  582. fairness issues.
  583. \SubSection{Cells}
  584. \label{subsec:cells}
  585. Traffic passes from node to node in fixed-size cells. Each cell is 256
  586. bytes, and consists of a header and a payload. The header includes the
  587. circuit identifier (ACI) which specifies which circuit the cell refers to
  588. (many circuits can be multiplexed over the single TCP connection between
  589. ORs or between an OP and an OR), and a command to describe what to do
  590. with the cell's payload. Cells are either control cells, meaning they are
  591. intended to be interpreted by the node that receives them, or relay cells,
  592. meaning they carry end-to-end stream data. Controls cells can be one of:
  593. \emph{padding} (currently used for keepalive, but can be used for link
  594. padding), \emph{create} or \emph{created} (to set up a new circuit),
  595. or \emph{destroy} (to tear down a circuit).
  596. Relay cells have an additional header (the relay header) after the
  597. cell header, which specifies the stream identifier (many streams can
  598. be multiplexed over a circuit), an end-to-end checksum for integrity
  599. checking, and a relay command. Relay commands can be one of: \emph{relay
  600. data} (for data flowing down the stream), \emph{relay begin} (to open a
  601. stream), \emph{relay end} (to close a stream), \emph{relay connected}
  602. (to notify the OP that a relay begin has succeeded), \emph{relay
  603. extend} and \emph{relay extended} (to extend the circuit by a hop,
  604. and to acknowledge), \emph{relay truncate} and \emph{relay truncated}
  605. (to tear down only part of the circuit, and to acknowledge), \emph{relay
  606. sendme} (used for congestion control), and \emph{relay drop} (used to
  607. implement long-range dummies).
  608. We will talk more about each of these cell types below.
  609. % Nick: should there have been a table here? -RD
  610. \SubSection{Circuits and streams}
  611. \label{subsec:circuits}
  612. While the original Onion Routing design built one circuit for each stream,
  613. Tor circuits can be used by many streams. Thus because circuits can
  614. take several tenths of a second to construct due to crypto and network
  615. latency, users construct circuits preemptively. Users build a new circuit
  616. periodically (currently every minute) if the previous one has been used,
  617. and expire old used circuits that are no longer in use. Thus even very
  618. active users spend a negligible amount of time and CPU in building
  619. circuits, but only a limited number of requests can be linked to each
  620. other by a given exit node.
  621. Users set up circuits incrementally, negotiating a symmetric key with
  622. each hop one at a time. To create a new circuit, the user (call her
  623. Alice) sends a \emph{create} cell to the first node in her chosen
  624. path. The payload is the first half of the Diffie-Hellman handshake,
  625. encrypted to the onion key of the OR (call him Bob). Bob responds with a
  626. \emph{created} cell with the second half of the DH handshake, along with
  627. a hash of $K=g^{xy}$. The goal is to get unilateral entity authentication
  628. (Alice knows she's handshaking with Bob, Bob doesn't care who it is ---
  629. recall that Alice has no key and is trying to remain anonymous) and
  630. unilateral key authentication (Alice and Bob agree on a key, and Alice
  631. knows Bob is the only other person who could know it). We also want
  632. perfect forward secrecy, key freshness, etc.
  633. \begin{equation}
  634. \begin{aligned}
  635. \mathrm{Alice} \rightarrow \mathrm{Bob}&: E_{PK_{Bob}}(g^x) \\
  636. \mathrm{Bob} \rightarrow \mathrm{Alice}&: g^y, H(K | \mathrm{``handshake''}) \\
  637. \end{aligned}
  638. \end{equation}
  639. Being able to prove knowledge of this $K$ shows both that it was Bob
  640. who received $g^x$, and that it was Bob who came up with $y$. We use
  641. PK encryption in the first step (rather than, eg, using the first two
  642. steps of STS, which has a signature in the second step) because we
  643. don't have enough room in a single cell for a public key and also a
  644. signature. Preliminary analysis with the NRL protocol analyzer shows
  645. the above protocol to be secure (including providing PFS) under the
  646. traditional Dolev-Yao model.
  647. % cite Cathy? -RD
  648. % did I use the buzzwords correctly? -RD
  649. To extend a circuit past the first hop, Alice sends a \emph{relay extend}
  650. cell to the last node in the circuit, specifying the address of the new
  651. OR and an encrypted $g^x$ for it. That node copies the half-handshake
  652. into a \emph{create} cell, and passes it to the new OR to extend the
  653. circuit. When it responds with a \emph{created} cell, the penultimate OR
  654. copies the payload into a \emph{relay extended} cell and passes it back.
  655. % Nick: please fix my "that OR" pronouns -RD
  656. Once Alice has established the circuit (so she shares a key with each
  657. OR on the circuit), she can send relay cells.
  658. %The stream ID in the relay header indicates to which stream the cell belongs.
  659. % Nick: should i include the above line?
  660. Alice can address each relay cell to any of the ORs on the circuit. To
  661. construct a relay cell destined for a given OR, she iteratively
  662. encrypts the cell payload (that is, the relay header and payload)
  663. with the symmetric key of each hop up to that node. Then, at each hop
  664. down the circuit, the OR decrypts the cell payload and checks whether
  665. it recognizes the stream ID. A stream ID is recognized either if it
  666. is an already open stream at that OR, or if it is equal to zero. The
  667. zero stream ID is treated specially, and is used for control messages,
  668. e.g. starting a new stream. If the stream ID is unrecognized, the OR
  669. sends the relay cell downstream. This \emph{leaky pipe} circuit design
  670. allows Alice's streams to exit at different ORs, for example to tolerate
  671. different exit policies, or to keep the ORs from knowing that two streams
  672. originate at the same person.
  673. To tear down a circuit, Alice sends a destroy control cell. Each OR
  674. in the circuit receives the destroy cell, closes all open streams on
  675. that circuit, and passes a new destroy cell forward. But since circuits
  676. can be built incrementally, they can also be torn down incrementally:
  677. Alice can send a relay truncate cell to a node along the circuit. That
  678. node will send a destroy cell forward, and reply with a relay truncated
  679. acknowledgement. Alice might truncate her circuit so she can extend it
  680. to different nodes without notifying the first few nodes (or somebody
  681. observing them) that she is changing her circuit. That is, nodes in the
  682. middle are not even aware that the circuit was truncated, because the
  683. relay cells are encrypted. Similarly, if a node on the circuit goes down,
  684. the adjacent node can send a relay truncated back to Alice. Thus the
  685. ``break a node and see which circuits go down'' attack is weakened.
  686. \SubSection{Tagging attacks on streams}
  687. end-to-end integrity checking. (Mention tagging.)
  688. \SubSection{Opening and closing streams}
  689. \label{subsec:tcp}
  690. Describe how TCP connections get opened. (Mention DNS issues)
  691. Descibe closing TCP connections and 2-END handshake to mirror TCP
  692. close handshake.
  693. \SubSection{Congestion control and fairness}
  694. \label{subsec:congestion}
  695. Even with bandwidth throttling, we still need to worry about congestion,
  696. either accidental or intentional. If a lot of people make circuits into
  697. the same node, and they all come out through the same connection, then
  698. that connection may become saturated (be unable to send out cells as
  699. quickly as it wants to). For example, an adversary can make a 'put'
  700. request through the onion routing network to a webserver he owns,
  701. and then refuse to read any of the bytes at the webserver end of the
  702. circuit. These bottlenecks can propagate back through the entire network,
  703. mucking up everything.
  704. Describe circuit-level and stream-level
  705. congestion control issues and solutions.
  706. Describe circuit-level and stream-level fairness issues; cite Marc's
  707. anonnet stuff.
  708. \Section{Other design decisions}
  709. \SubSection{Resource management and DoS prevention}
  710. Describe DoS prevention. cookies before tls begins, rate limiting of
  711. create cells, link-to-link rate limiting, etc.
  712. Mention twins, what the do, what they can't.
  713. How we should do sequencing and acking like TCP so that we can better
  714. tolerate lost data cells.
  715. Mention that designers have to choose what you send across your
  716. circuit: wrapped IP packets, wrapped stream data, etc. [Disspell
  717. TCP-over-TCP misconception.]
  718. Mention that OR-to-OR connections should be highly reliable. If
  719. they aren't, everything can stall.
  720. \SubSection{Exit policies and abuse}
  721. \label{subsec:exitpolicies}
  722. Exit abuse is a serious barrier to wide-scale Tor deployment --- we
  723. must block or limit attacks and other abuse that users can do through
  724. the Tor network.
  725. Each onion router's \emph{exit policy} describes to which external
  726. addresses and ports the router will permit stream connections. On one end
  727. of the spectrum are \emph{open exit} nodes that will connect anywhere;
  728. on the other end are \emph{middleman} nodes that only relay traffic to
  729. other Tor nodes, and \emph{private exit} nodes that only connect locally
  730. or to addresses internal to that node's organization.
  731. This private exit
  732. node configuration is more secure for clients --- the adversary cannot
  733. see plaintext traffic leaving the network (e.g. to a webserver), so he
  734. is less sure of Alice's destination. More generally, nodes can require
  735. a variety of forms of traffic authentication \cite{onion-discex00}.
  736. Most onnion routers will function as \emph{limited exits} that permit
  737. connections to the world at large, but restrict access to certain abuse-prone
  738. addresses and services.
  739. Tor offers more reliability than the high-latency fire-and-forget
  740. anonymous email networks, because the sender opens a TCP stream
  741. with the remote mail server and receives an explicit confirmation of
  742. acceptance. But ironically, the private exit node model works poorly for
  743. email, when Tor nodes are run on volunteer machines that also do other
  744. things, because it's quite hard to configure mail transport agents so
  745. normal users can send mail normally, but the Tor process can only deliver
  746. mail locally. Further, most organizations have specific hosts that will
  747. deliver mail on behalf of certain IP ranges; Tor operators must be aware
  748. of these hosts and consider putting them in the Tor exit policy.
  749. The abuse issues on closed (e.g. military) networks are different
  750. from the abuse on open networks like the Internet. While these IP-based
  751. access controls are still commonplace on the Internet, on closed networks,
  752. nearly all participants will be honest, and end-to-end authentication
  753. can be assumed for anything important.
  754. Tor is harder than minion because tcp doesn't include an abuse
  755. address. you could reach inside the http stream and change the agent
  756. or something, but that's a specific case and probably won't help
  757. much anyway.
  758. And volunteer nodes don't resolve to anonymizer.mit.edu so it never
  759. even occurs to people that it wasn't you.
  760. Preventing abuse of open exit nodes is an unsolved problem. Princeton's
  761. CoDeeN project \cite{darkside} gives us a glimpse of what we're in for.
  762. % This is more speculative than a description of our design.
  763. but their solutions, which mainly involve rate limiting and blacklisting
  764. nodes which do bad things, don't translate directly to Tor. Rate limiting
  765. still works great, but Tor intentionally separates sender from recipient,
  766. so it's hard to know which sender was the one who did the bad thing,
  767. without just making the whole network wide open.
  768. even limiting most nodes to allow http, ssh, and aim to exit and reject
  769. all other stuff is sketchy, because plenty of abuse can happen over
  770. port 80. but it's a good start, because it blocks most things,
  771. and because people are more used to the concept of port 80 abuse not
  772. coming from the machine's owner.
  773. we could also run intrusion detection system (IDS) modules at each tor
  774. node, to dynamically monitor traffic streams for attack signatures. it
  775. can even react when it sees a signature by closing the stream. but IDS's
  776. don't actually work most of the time, and besides, how do you write a
  777. signature for "is sending a mean mail"?
  778. we should run a squid at each exit node, to provide comparable anonymity
  779. to private exit nodes for cache hits, to speed everything up, and to
  780. have a buffer for funny stuff coming out of port 80. we could similarly
  781. have other exit proxies for other protocols, like mail, to check
  782. delivered mail for being spam.
  783. A mixture of open and restricted exit nodes will allow the most
  784. flexibility for volunteers running servers. But while a large number
  785. of middleman nodes is useful to provide a large and robust network,
  786. a small number of exit nodes still simplifies traffic analysis because
  787. there are fewer nodes the adversary needs to monitor, and also puts a
  788. greater burden on the exit nodes.
  789. The JAP cascade model is really nice because they only need one node to
  790. take the heat per cascade. On the other hand, a hydra scheme could work
  791. better (it's still hard to watch all the clients).
  792. Discuss importance of public perception, and how abuse affects it.
  793. ``Usability is a security parameter''. ``Public Perception is also a
  794. security parameter.''
  795. Discuss smear attacks.
  796. \SubSection{Directory Servers}
  797. \label{subsec:dirservers}
  798. First-generation Onion Routing designs \cite{or-jsac98,freedom2-arch} did
  799. % is or-jsac98 the right cite here? what's our stock OR cite? -RD
  800. in-band network status updates: each router flooded a signed statement
  801. to its neighbors, which propagated it onward. But anonymizing networks
  802. have different security goals than typical link-state routing protocols.
  803. For example, we worry more about delays (accidental or intentional)
  804. that can cause different parts of the network to have different pictures
  805. of link-state and topology. We also worry about attacks to deceive a
  806. client about the router membership list, topology, or current network
  807. state. Such \emph{partitioning attacks} on client knowledge help an
  808. adversary with limited resources to efficiently deploy those resources
  809. when attacking a target.
  810. Instead, Tor uses a small group of redundant directory servers to
  811. track network topology and node state such as current keys and exit
  812. policies. The directory servers are normal onion routers, but there are
  813. only a few of them and they are more trusted. They listen on a separate
  814. port as an HTTP server, both so participants can fetch current network
  815. state and router lists (a \emph{directory}), and so other onion routers
  816. can upload their router descriptors.
  817. [[mention that descriptors are signed with long-term keys; ORs publish
  818. regularly to dirservers; policies for generating directories; key
  819. rotation (link, onion, identity); Everybody already know directory
  820. keys; how to approve new nodes (advogato, sybil, captcha (RTT));
  821. policy for handling connections with unknown ORs; diff-based
  822. retrieval; diff-based consesus; separate liveness from descriptor
  823. list]]
  824. Of course, a variety of attacks remain. An adversary who controls a
  825. directory server can track certain clients by providing different
  826. information --- perhaps by listing only nodes under its control
  827. as working, or by informing only certain clients about a given
  828. node. Moreover, an adversary without control of a directory server can
  829. still exploit differences among client knowledge. If Eve knows that
  830. node $M$ is listed on server $D_1$ but not on $D_2$, she can use this
  831. knowledge to link traffic through $M$ to clients who have queried $D_1$.
  832. Thus these directory servers must be synchronized and redundant. The
  833. software is distributed with the signature public key of each directory
  834. server, and directories must be signed by a threshold of these keys.
  835. The directory servers in Tor are modeled after those in Mixminion
  836. \cite{minion-design}, but our situation is easier. Firstly, we make the
  837. simplifying assumption that all participants agree on who the directory
  838. servers are. Secondly, Mixminion needs to predict node behavior ---
  839. that is, build a reputation system for guessing future performance of
  840. nodes based on past performance, and then figure out a way to build
  841. a threshold consensus of these predictions. Tor just needs to get a
  842. threshold consensus of the current state of the network.
  843. The threshold consensus can be reached with standard Byzantine agreement
  844. techniques \cite{castro-liskov}.
  845. % Should I just stop the section here? Is the rest crap? -RD
  846. But this library, while more efficient than previous Byzantine agreement
  847. systems, is still complex and heavyweight for our purposes: we only need
  848. to compute a single algorithm, and we do not require strict in-order
  849. computation steps. The Tor directory servers build a consensus directory
  850. through a simple four-round broadcast protocol. First, each server signs
  851. and broadcasts its current opinion to the other directory servers; each
  852. server then rebroadcasts all the signed opinions it has received. At this
  853. point all directory servers check to see if anybody's cheating. If so,
  854. directory service stops, the humans are notified, and that directory
  855. server is permanently removed from the network. Assuming no cheating,
  856. each directory server then computes a local algorithm on the set of
  857. opinions, resulting in a uniform shared directory. Then the servers sign
  858. this directory and broadcast it; and finally all servers rebroadcast
  859. the directory and all the signatures.
  860. The rebroadcast steps ensure that a directory server is heard by either
  861. all of the other servers or none of them (some of the links between
  862. directory servers may be down). Broadcasts are feasible because there
  863. are so few directory servers (currently 3, but we expect to use as many
  864. as 9 as the network scales). The actual local algorithm for computing
  865. the shared directory is straightforward, and is described in the Tor
  866. specification \cite{tor-spec}.
  867. % we should, uh, add this to the spec. oh, and write it. -RD
  868. Using directory servers rather than flooding approaches provides
  869. simplicity and flexibility. For example, they don't complicate
  870. the analysis when we start experimenting with non-clique network
  871. topologies. And because the directories are signed, they can be cached at
  872. all the other onion routers (or even elsewhere). Thus directory servers
  873. are not a performance bottleneck when we have many users, and also they
  874. won't aid traffic analysis by forcing clients to periodically announce
  875. their existence to any central point.
  876. % Mention Hydra as an example of non-clique topologies. -NM, from RD
  877. \Section{Rendezvous points: location privacy}
  878. \label{sec:rendezvous}
  879. Rendezvous points are a building block for \emph{location-hidden services}
  880. (aka responder anonymity) in the Tor network. Location-hidden
  881. services means Bob can offer a tcp service, such as a webserver,
  882. without revealing the IP of that service.
  883. We provide this censorship resistance for Bob by allowing him to
  884. advertise several onion routers (his \emph{Introduction Points}) as his
  885. public location. Alice, the client, chooses a node for her \emph{Meeting
  886. Point}. She connects to one of Bob's introduction points, informs him
  887. about her meeting point, and then waits for him to connect to the meeting
  888. point. This extra level of indirection means Bob's introduction points
  889. don't open themselves up to abuse by serving files directly, eg if Bob
  890. chooses a node in France to serve material distateful to the French. The
  891. extra level of indirection also allows Bob to respond to some requests
  892. and ignore others.
  893. We provide the necessary glue so that Alice can view webpages from Bob's
  894. location-hidden webserver with minimal invasive changes. Both Alice and
  895. Bob must run local onion proxies.
  896. The steps of a rendezvous:
  897. \begin{tightlist}
  898. \item Bob chooses some Introduction Points, and advertises them on a
  899. Distributed Hash Table (DHT).
  900. \item Bob establishes onion routing connections to each of his
  901. Introduction Points, and waits.
  902. \item Alice learns about Bob's service out of band (perhaps Bob told her,
  903. or she found it on a website). She looks up the details of Bob's
  904. service from the DHT.
  905. \item Alice chooses and establishes a Meeting Point (MP) for this
  906. transaction.
  907. \item Alice goes to one of Bob's Introduction Points, and gives it a blob
  908. (encrypted for Bob) which tells him about herself, the Meeting Point
  909. she chose, and the first half of an ephemeral key handshake. The
  910. Introduction Point sends the blob to Bob.
  911. \item Bob chooses whether to ignore the blob, or to onion route to MP.
  912. Let's assume the latter.
  913. \item MP plugs together Alice and Bob. Note that MP can't recognize Alice,
  914. Bob, or the data they transmit (they share a session key).
  915. \item Alice sends a Begin cell along the circuit. It arrives at Bob's
  916. onion proxy. Bob's onion proxy connects to Bob's webserver.
  917. \item Data goes back and forth as usual.
  918. \end{tightlist}
  919. When establishing an introduction point, Bob provides the onion router
  920. with a public ``introduction'' key. The hash of this public key
  921. identifies a unique service, and (since Bob is required to sign his
  922. messages) prevents anybody else from usurping Bob's introduction point
  923. in the future. Bob uses the same public key when establishing the other
  924. introduction points for that service.
  925. The blob that Alice gives the introduction point includes a hash of Bob's
  926. public key to identify the service, an optional initial authentication
  927. token (the introduction point can do prescreening, eg to block replays),
  928. and (encrypted to Bob's public key) the location of the meeting point,
  929. a meeting cookie Bob should tell the meeting point so he gets connected to
  930. Alice, an optional authentication token so Bob can choose whether to respond,
  931. and the first half of a DH key exchange. When Bob connects to the meeting
  932. place and gets connected to Alice's pipe, his first cell contains the
  933. other half of the DH key exchange.
  934. % briefly talk about our notion of giving cookies to people proportional
  935. % to how important they are, for location-protected servers hardened
  936. % against DDoS threat? -RD
  937. \subsection{Integration with user applications}
  938. For each service Bob offers, he configures his local onion proxy to know
  939. the local IP and port of the server, a strategy for authorizating Alices,
  940. and a public key. We assume the existence of a robust decentralized
  941. efficient lookup system which allows authenticated updates, eg
  942. \cite{cfs:sosp01}. (Each onion router could run a node in this lookup
  943. system; also note that as a stopgap measure, we can just run a simple
  944. lookup system on the directory servers.) Bob publishes into the DHT
  945. (indexed by the hash of the public key) the public key, an expiration
  946. time (``not valid after''), and the current introduction points for that
  947. service. Note that Bob's webserver is completely oblivious to the fact
  948. that it's hidden behind the Tor network.
  949. As far as Alice's experience goes, we require that her client interface
  950. remain a SOCKS proxy, and we require that she shouldn't have to modify
  951. her applications. Thus we encode all of the necessary information into
  952. the hostname (more correctly, fully qualified domain name) that Alice
  953. uses, eg when clicking on a url in her browser. Location-hidden services
  954. use the special top level domain called `.onion': thus hostnames take the
  955. form x.y.onion where x encodes the hash of PK, and y is the authentication
  956. cookie. Alice's onion proxy examines hostnames and recognizes when they're
  957. destined for a hidden server. If so, it decodes the PK and starts the
  958. rendezvous as described in the table above.
  959. \subsection{Previous rendezvous work}
  960. Ian Goldberg developed a similar notion of rendezvous points for
  961. low-latency anonymity systems \cite{ian-thesis}. His ``service tag''
  962. is the same concept as our ``hash of service's public key''. We make it
  963. a hash of the public key so it can be self-authenticating, and so the
  964. client can recognize the same service with confidence later on. His
  965. design differs from ours in the following ways though. Firstly, Ian
  966. suggests that the client should manually hunt down a current location of
  967. the service via Gnutella; whereas our use of the DHT makes lookup faster,
  968. more robust, and transparent to the user. Secondly, the client and server
  969. can share ephemeral DH keys, so at no point in the path is the plaintext
  970. exposed. Thirdly, our design is much more practical for deployment in a
  971. volunteer network, in terms of getting volunteers to offer introduction
  972. and meeting point services. The introduction points do not output any
  973. bytes to the clients. And the meeting points don't know the client,
  974. the server, or the stuff being transmitted. The indirection scheme
  975. is also designed with authentication/authorization in mind -- if the
  976. client doesn't include the right cookie with its request for service,
  977. the server doesn't even acknowledge its existence.
  978. \Section{Analysis}
  979. How well do we resist chosen adversary?
  980. How well do we meet stated goals?
  981. Mention jurisdictional arbitrage.
  982. Pull attacks and defenses into analysis as a subsection
  983. \Section{Maintaining anonymity in Tor}
  984. \label{sec:maintaining-anonymity}
  985. [Put as much of this as a part of open issues as is possible.]
  986. [what's an anonymity set?]
  987. packet counting attacks work great against initiators. need to do some
  988. level of obfuscation for that. standard link padding for passive link
  989. observers. long-range padding for people who own the first hop. are
  990. we just screwed against people who insert timing signatures into your
  991. traffic?
  992. Even regardless of link padding from Alice to the cloud, there will be
  993. times when Alice is simply not online. Link padding, at the edges or
  994. inside the cloud, does not help for this.
  995. how often should we pull down directories? how often send updated
  996. server descs?
  997. when we start up the client, should we build a circuit immediately,
  998. or should the default be to build a circuit only on demand? should we
  999. fetch a directory immediately?
  1000. would we benefit from greater synchronization, to blend with the other
  1001. users? would the reduced speed hurt us more?
  1002. does the "you can't see when i'm starting or ending a stream because
  1003. you can't tell what sort of relay cell it is" idea work, or is just
  1004. a distraction?
  1005. does running a server actually get you better protection, because traffic
  1006. coming from your node could plausibly have come from elsewhere? how
  1007. much mixing do you need before this is actually plausible, or is it
  1008. immediately beneficial because many adversary can't see your node?
  1009. do different exit policies at different exit nodes trash anonymity sets,
  1010. or not mess with them much?
  1011. do we get better protection against a realistic adversary by having as
  1012. many nodes as possible, so he probably can't see the whole network,
  1013. or by having a small number of nodes that mix traffic well? is a
  1014. cascade topology a more realistic way to get defenses against traffic
  1015. confirmation? does the hydra (many inputs, few outputs) topology work
  1016. better? are we going to get a hydra anyway because most nodes will be
  1017. middleman nodes?
  1018. using a circuit many times is good because it's less cpu work.
  1019. good because of predecessor attacks with path rebuilding.
  1020. bad because predecessor attacks can be more likely to link you with a
  1021. previous circuit since you're so verbose.
  1022. bad because each thing you do on that circuit is linked to the other
  1023. things you do on that circuit.
  1024. how often to rotate?
  1025. how to decide when to exit from middle?
  1026. when to truncate and re-extend versus when to start new circuit?
  1027. Because Tor runs over TCP, when one of the servers goes down it seems
  1028. that all the circuits (and thus streams) going over that server must
  1029. break. This reduces anonymity because everybody needs to reconnect
  1030. right then (does it? how much?) and because exit connections all break
  1031. at the same time, and it also reduces usability. It seems the problem
  1032. is even worse in a p2p environment, because so far such systems don't
  1033. really provide an incentive for nodes to stay connected when they're
  1034. done browsing, so we would expect a much higher churn rate than for
  1035. onion routing. Are there ways of allowing streams to survive the loss
  1036. of a node in the path?
  1037. discuss topologies. Cite George's non-freeroutes paper. Maybe this
  1038. graf goes elsewhere.
  1039. discuss attracting users; incentives; usability.
  1040. Choosing paths and path lengths.
  1041. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1042. \Section{Attacks and Defenses}
  1043. \label{sec:attacks}
  1044. Below we summarize a variety of attacks and how well our design withstands
  1045. them.
  1046. \begin{enumerate}
  1047. \item \textbf{Passive attacks}
  1048. \begin{itemize}
  1049. \item \emph{Simple observation.}
  1050. \item \emph{Timing correlation.}
  1051. \item \emph{Size correlation.}
  1052. \item \emph{Option distinguishability.}
  1053. \end{itemize}
  1054. \item \textbf{Active attacks}
  1055. \begin{itemize}
  1056. \item \emph{Key compromise.}
  1057. \item \emph{Iterated subpoena.}
  1058. \item \emph{Run recipient.}
  1059. \item \emph{Run a hostile node.}
  1060. \item \emph{Compromise entire path.}
  1061. \item \emph{Selectively DoS servers.}
  1062. \item \emph{Introduce timing into messages.}
  1063. \item \emph{Tagging attacks.}
  1064. the exit node can change the content you're getting to try to
  1065. trick you. similarly, when it rejects you due to exit policy,
  1066. it could give you a bad IP that sends you somewhere else.
  1067. \end{itemize}
  1068. we rely on DNS being globally consistent. if people in africa resolve
  1069. IPs differently, then asking to extend a circuit to a certain IP can
  1070. give away your origin.
  1071. \item \textbf{Directory attacks}
  1072. \begin{itemize}
  1073. \item knock out a dirserver
  1074. \item knock out half the dirservers
  1075. \item trick user into using different software (with different dirserver
  1076. keys)
  1077. \item OR connects to the dirservers but nowhere else
  1078. \item foo
  1079. \end{itemize}
  1080. \item \textbf{Attacks against rendezvous points}
  1081. \begin{itemize}
  1082. \item foo
  1083. \end{itemize}
  1084. \end{enumerate}
  1085. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1086. \Section{Future Directions and Open Problems}
  1087. \label{sec:conclusion}
  1088. % Mention that we need to do TCP over tor for reliability.
  1089. Tor brings together many innovations into
  1090. a unified deployable system. But there are still several attacks that
  1091. work quite well, as well as a number of sustainability and run-time
  1092. issues remaining to be ironed out. In particular:
  1093. \begin{itemize}
  1094. \item \emph{Scalability:} Since Tor's emphasis currently is on simplicity
  1095. of design and deployment, the current design won't easily handle more
  1096. than a few hundred servers, because of its clique topology. Restricted
  1097. route topologies \cite{danezis-pets03} promise comparable anonymity
  1098. with much better scaling properties, but we must solve problems like
  1099. how to randomly form the network without introducing net attacks.
  1100. % [cascades are a restricted route topology too. we must mention
  1101. % earlier why we're not satisfied with the cascade approach.]-RD
  1102. % [We do. At least
  1103. \item \emph{Cover traffic:} Currently we avoid cover traffic because
  1104. it introduces clear performance and bandwidth costs, but and its
  1105. security properties are not well understood. With more research
  1106. \cite{SS03,defensive-dropping}, the price/value ratio may change, both for
  1107. link-level cover traffic and also long-range cover traffic. In particular,
  1108. we expect restricted route topologies to reduce the cost of cover traffic
  1109. because there are fewer links to cover.
  1110. \item \emph{Better directory distribution:} Even with the threshold
  1111. directory agreement algorithm described in \ref{subsec:dirservers},
  1112. the directory servers are still trust bottlenecks. We must find more
  1113. decentralized yet practical ways to distribute up-to-date snapshots of
  1114. network status without introducing new attacks.
  1115. \item \emph{Implementing location-hidden servers:} While Section
  1116. \ref{sec:rendezvous} provides a design for rendezvous points and
  1117. location-hidden servers, this feature has not yet been implemented.
  1118. We will likely encounter additional issues, both in terms of usability
  1119. and anonymity, that must be resolved.
  1120. \item \emph{Wider-scale deployment:} The original goal of Tor was to
  1121. gain experience in deploying an anonymizing overlay network, and learn
  1122. from having actual users. We are now at the point where we can start
  1123. deploying a wider network. We will see what happens!
  1124. % ok, so that's hokey. fix it. -RD
  1125. \item \emph{Further specification review:} Foo.
  1126. \end{itemize}
  1127. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1128. %\Section{Acknowledgments}
  1129. %% commented out for anonymous submission
  1130. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1131. \bibliographystyle{latex8}
  1132. \bibliography{tor-design}
  1133. \end{document}
  1134. % Style guide:
  1135. % U.S. spelling
  1136. % avoid contractions (it's, can't, etc.)
  1137. % 'mix', 'mixes' (as noun)
  1138. % 'mix-net'
  1139. % 'mix', 'mixing' (as verb)
  1140. % 'middleman' [Not with a hyphen; the hyphen has been optional
  1141. % since Middle English.]
  1142. % 'nymserver'
  1143. % 'Cypherpunk', 'Cypherpunks', 'Cypherpunk remailer'
  1144. % 'Onion Routing design', 'onion router' [note capitalization]
  1145. % 'SOCKS'
  1146. %
  1147. %
  1148. % 'Substitute ``Damn'' every time you're inclined to write ``very;'' your
  1149. % editor will delete it and the writing will be just as it should be.'
  1150. % -- Mark Twain