tor-design.tex 98 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988
  1. \documentclass[twocolumn]{article}
  2. \usepackage{usenix}
  3. %\documentclass[times,10pt,twocolumn]{article}
  4. %\usepackage{latex8}
  5. %\usepackage{times}
  6. \usepackage{url}
  7. \usepackage{graphics}
  8. \usepackage{amsmath}
  9. \usepackage{epsfig}
  10. \pagestyle{empty}
  11. \renewcommand\url{\begingroup \def\UrlLeft{<}\def\UrlRight{>}\urlstyle{tt}\Url}
  12. \newcommand\emailaddr{\begingroup \def\UrlLeft{<}\def\UrlRight{>}\urlstyle{tt}\Url}
  13. \newcommand{\workingnote}[1]{} % The version that hides the note.
  14. %\newcommand{\workingnote}[1]{(**#1)} % The version that makes the note visible.
  15. % If an URL ends up with '%'s in it, that's because the line *in the .bib/.tex
  16. % file* is too long, so break it there (it doesn't matter if the next line is
  17. % indented with spaces). -DH
  18. %\newif\ifpdf
  19. %\ifx\pdfoutput\undefined
  20. % \pdffalse
  21. %\else
  22. % \pdfoutput=1
  23. % \pdftrue
  24. %\fi
  25. \newenvironment{tightlist}{\begin{list}{$\bullet$}{
  26. \setlength{\itemsep}{0mm}
  27. \setlength{\parsep}{0mm}
  28. % \setlength{\labelsep}{0mm}
  29. % \setlength{\labelwidth}{0mm}
  30. % \setlength{\topsep}{0mm}
  31. }}{\end{list}}
  32. % Cut down on whitespace above and below figures displayed at head/foot of
  33. % page.
  34. \setlength{\textfloatsep}{3mm}
  35. % Cut down on whitespace above and below figures displayed in middle of page
  36. \setlength{\intextsep}{3mm}
  37. \begin{document}
  38. %% Use dvipdfm instead. --DH
  39. %\ifpdf
  40. % \pdfcompresslevel=9
  41. % \pdfpagewidth=\the\paperwidth
  42. % \pdfpageheight=\the\paperheight
  43. %\fi
  44. \title{Tor: The Second-Generation Onion Router} %\\DRAFT VERSION}
  45. % Putting the 'Private' back in 'Virtual Private Network'
  46. \author{Roger Dingledine \\ The Free Haven Project \\ arma@freehaven.net \and
  47. Nick Mathewson \\ The Free Haven Project \\ nickm@freehaven.net \and
  48. Paul Syverson \\ Naval Research Lab \\ syverson@itd.nrl.navy.mil}
  49. \maketitle
  50. \thispagestyle{empty}
  51. \begin{abstract}
  52. We present Tor, a circuit-based low-latency anonymous communication
  53. service. This second-generation Onion Routing system addresses limitations
  54. in the original design by adding perfect forward secrecy, congestion
  55. control, directory servers, integrity checking, configurable exit policies,
  56. and a practical design for location-hidden services via rendezvous
  57. points. Tor works on the real-world
  58. Internet, requires no special privileges or kernel modifications, requires
  59. little synchronization or coordination between nodes, and provides a
  60. reasonable tradeoff between anonymity, usability, and efficiency.
  61. We briefly describe our experiences with an international network of
  62. more than 30 nodes. % that has been running for several months.
  63. We close with a list of open problems in anonymous communication.
  64. \end{abstract}
  65. %\begin{center}
  66. %\textbf{Keywords:} anonymity, peer-to-peer, remailer, nymserver, reply block
  67. %\end{center}
  68. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  69. \section{Overview}
  70. \label{sec:intro}
  71. Onion Routing is a distributed overlay network designed to anonymize
  72. TCP-based applications like web browsing, secure shell,
  73. and instant messaging. Clients choose a path through the network and
  74. build a \emph{circuit}, in which each node (or ``onion router'' or ``OR'')
  75. in the path knows its predecessor and successor, but no other nodes in
  76. the circuit. Traffic flows down the circuit in fixed-size
  77. \emph{cells}, which are unwrapped by a symmetric key at each node
  78. (like the layers of an onion) and relayed downstream. The
  79. Onion Routing project published several design and analysis
  80. papers \cite{or-ih96,or-jsac98,or-discex00,or-pet00}. While a wide area Onion
  81. Routing network was deployed briefly, the only long-running
  82. public implementation was a fragile
  83. proof-of-concept that ran on a single machine. Even this simple deployment
  84. processed connections from over sixty thousand distinct IP addresses from
  85. all over the world at a rate of about fifty thousand per day.
  86. But many critical design and deployment issues were never
  87. resolved, and the design has not been updated in years. Here
  88. we describe Tor, a protocol for asynchronous, loosely federated onion
  89. routers that provides the following improvements over the old Onion
  90. Routing design:
  91. \textbf{Perfect forward secrecy:} In the original Onion Routing design,
  92. a single hostile node could record traffic and
  93. later compromise successive nodes in the circuit and force them
  94. to decrypt it. Rather than using a single multiply encrypted data
  95. structure (an \emph{onion}) to lay each circuit,
  96. Tor now uses an incremental or \emph{telescoping} path-building design,
  97. where the initiator negotiates session keys with each successive hop in
  98. the circuit. Once these keys are deleted, subsequently compromised nodes
  99. cannot decrypt old traffic. As a side benefit, onion replay detection
  100. is no longer necessary, and the process of building circuits is more
  101. reliable, since the initiator knows when a hop fails and can then try
  102. extending to a new node.
  103. \textbf{Separation of ``protocol cleaning'' from anonymity:}
  104. Onion Routing originally required a separate ``application
  105. proxy'' for each supported application protocol---most of which were
  106. never written, so many applications were never supported. Tor uses the
  107. standard and near-ubiquitous SOCKS~\cite{socks4} proxy interface, allowing
  108. us to support most TCP-based programs without modification. Tor now
  109. relies on the filtering features of privacy-enhancing
  110. application-level proxies such as Privoxy~\cite{privoxy}, without trying
  111. to duplicate those features itself.
  112. \textbf{No mixing, padding, or traffic shaping (yet):} Onion
  113. Routing originally called for batching and reordering cells as they arrived,
  114. assumed padding between ORs, and in
  115. later designs added padding between onion proxies (users) and
  116. ORs~\cite{or-ih96,or-jsac98}. Tradeoffs between padding protection
  117. and cost were discussed, and \emph{traffic shaping} algorithms were
  118. theorized~\cite{or-pet00} to provide good security without expensive
  119. padding, but no concrete padding scheme was suggested.
  120. Recent research~\cite{econymics}
  121. and deployment experience~\cite{freedom21-security} suggest that this
  122. level of resource use is not practical or economical; and even full
  123. link padding is still vulnerable~\cite{defensive-dropping}. Thus,
  124. until we have a proven and convenient design for traffic shaping or
  125. low-latency mixing that improves anonymity against a realistic
  126. adversary, we leave these strategies out.
  127. \textbf{Many TCP streams can share one circuit:} Onion Routing originally
  128. built a separate circuit for each
  129. application-level request, but this required
  130. multiple public key operations for every request, and also presented
  131. a threat to anonymity from building so many circuits; see
  132. Section~\ref{sec:maintaining-anonymity}. Tor multiplexes multiple TCP
  133. streams along each circuit to improve efficiency and anonymity.
  134. \textbf{Leaky-pipe circuit topology:} Through in-band signaling
  135. within the circuit, Tor initiators can direct traffic to nodes partway
  136. down the circuit. This novel approach
  137. allows traffic to exit the circuit from the middle---possibly
  138. frustrating traffic shape and volume attacks based on observing the end
  139. of the circuit. (It also allows for long-range padding if
  140. future research shows this to be worthwhile.)
  141. \textbf{Congestion control:} Earlier anonymity designs do not
  142. address traffic bottlenecks. Unfortunately, typical approaches to
  143. load balancing and flow control in overlay networks involve inter-node
  144. control communication and global views of traffic. Tor's decentralized
  145. congestion control uses end-to-end acks to maintain anonymity
  146. while allowing nodes at the edges of the network to detect congestion
  147. or flooding and send less data until the congestion subsides.
  148. \textbf{Directory servers:} The earlier Onion Routing design
  149. planned to flood state information through the network---an approach
  150. that can be unreliable and complex. % open to partitioning attacks.
  151. Tor takes a simplified view toward distributing this
  152. information. Certain more trusted nodes act as \emph{directory
  153. servers}: they provide signed directories describing known
  154. routers and their current state. Users periodically download them
  155. via HTTP.
  156. \textbf{Variable exit policies:} Tor provides a consistent mechanism
  157. for each node to advertise a policy describing the hosts
  158. and ports to which it will connect. These exit policies are critical
  159. in a volunteer-based distributed infrastructure, because each operator
  160. is comfortable with allowing different types of traffic to exit
  161. from his node.
  162. \textbf{End-to-end integrity checking:} The original Onion Routing
  163. design did no integrity checking on data. Any node on the
  164. circuit could change the contents of data cells as they passed by---for
  165. example, to alter a connection request so it would connect
  166. to a different webserver, or to `tag' encrypted traffic and look for
  167. corresponding corrupted traffic at the network edges~\cite{minion-design}.
  168. Tor hampers these attacks by verifying data integrity before it leaves
  169. the network.
  170. %\textbf{Improved robustness to failed nodes:} A failed node
  171. %in the old design meant that circuit building failed, but thanks to
  172. %Tor's step-by-step circuit building, users notice failed nodes
  173. %while building circuits and route around them. Additionally, liveness
  174. %information from directories allows users to avoid unreliable nodes in
  175. %the first place.
  176. %% Can't really claim this, now that we've found so many variants of
  177. %% attack on partial-circuit-building. -RD
  178. \textbf{Rendezvous points and hidden services:}
  179. Tor provides an integrated mechanism for responder anonymity via
  180. location-protected servers. Previous Onion Routing designs included
  181. long-lived ``reply onions'' that could be used to build circuits
  182. to a hidden server, but these reply onions did not provide forward
  183. security, and became useless if any node in the path went down
  184. or rotated its keys. In Tor, clients negotiate {\it rendezvous points}
  185. to connect with hidden servers; reply onions are no longer required.
  186. Unlike Freedom~\cite{freedom2-arch}, Tor does not require OS kernel
  187. patches or network stack support. This prevents us from anonymizing
  188. non-TCP protocols, but has greatly helped our portability and
  189. deployability.
  190. %Unlike Freedom~\cite{freedom2-arch}, Tor only anonymizes
  191. %TCP-based protocols---not requiring patches (or built-in support) in an
  192. %operating system's network stack has been valuable to Tor's
  193. %portability and deployability.
  194. We have implemented all of the above features, including rendezvous
  195. points. Our source code is
  196. available under a free license, and Tor
  197. %, as far as we know, is unencumbered by patents.
  198. is not covered by the patent that affected distribution and use of
  199. earlier versions of Onion Routing.
  200. We have deployed a wide-area alpha network
  201. to test the design, to get more experience with usability
  202. and users, and to provide a research platform for experimentation.
  203. As of this writing, the network stands at 32 nodes %in thirteen
  204. %distinct administrative domains
  205. spread over two continents.
  206. We review previous work in Section~\ref{sec:related-work}, describe
  207. our goals and assumptions in Section~\ref{sec:assumptions},
  208. and then address the above list of improvements in
  209. Sections~\ref{sec:design},~\ref{sec:rendezvous}, and~\ref{sec:other-design}.
  210. We summarize
  211. in Section~\ref{sec:attacks} how our design stands up to
  212. known attacks, and talk about our early deployment experiences in
  213. Section~\ref{sec:in-the-wild}. We conclude with a list of open problems in
  214. Section~\ref{sec:maintaining-anonymity} and future work for the Onion
  215. Routing project in Section~\ref{sec:conclusion}.
  216. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  217. \section{Related work}
  218. \label{sec:related-work}
  219. Modern anonymity systems date to Chaum's {\bf Mix-Net}
  220. design~\cite{chaum-mix}. Chaum
  221. proposed hiding the correspondence between sender and recipient by
  222. wrapping messages in layers of public-key cryptography, and relaying them
  223. through a path composed of ``mixes.'' Each mix in turn
  224. decrypts, delays, and re-orders messages before relaying them
  225. onward.
  226. %toward their destinations.
  227. Subsequent relay-based anonymity designs have diverged in two
  228. main directions. Systems like {\bf Babel}~\cite{babel},
  229. {\bf Mixmaster}~\cite{mixmaster-spec},
  230. and {\bf Mixminion}~\cite{minion-design} have tried
  231. to maximize anonymity at the cost of introducing comparatively large and
  232. variable latencies. Because of this decision, these \emph{high-latency}
  233. networks resist strong global adversaries,
  234. but introduce too much lag for interactive tasks like web browsing,
  235. Internet chat, or SSH connections.
  236. Tor belongs to the second category: \emph{low-latency} designs that
  237. try to anonymize interactive network traffic. These systems handle
  238. a variety of bidirectional protocols. They also provide more convenient
  239. mail delivery than the high-latency anonymous email
  240. networks, because the remote mail server provides explicit and timely
  241. delivery confirmation. But because these designs typically
  242. involve many packets that must be delivered quickly, it is
  243. difficult for them to prevent an attacker who can eavesdrop both ends of the
  244. communication from correlating the timing and volume
  245. of traffic entering the anonymity network with traffic leaving it~\cite{SS03}.
  246. These
  247. protocols are similarly vulnerable to an active adversary who introduces
  248. timing patterns into traffic entering the network and looks
  249. for correlated patterns among exiting traffic.
  250. Although some work has been done to frustrate these attacks, most designs
  251. protect primarily against traffic analysis rather than traffic
  252. confirmation (see Section~\ref{subsec:threat-model}).
  253. The simplest low-latency designs are single-hop proxies such as the
  254. {\bf Anonymizer}~\cite{anonymizer}: a single trusted server strips the
  255. data's origin before relaying it. These designs are easy to
  256. analyze, but users must trust the anonymizing proxy.
  257. Concentrating the traffic to this single point increases the anonymity set
  258. (the people a given user is hiding among), but it is vulnerable if the
  259. adversary can observe all traffic entering and leaving the proxy.
  260. More complex are distributed-trust, circuit-based anonymizing systems.
  261. In these designs, a user establishes one or more medium-term bidirectional
  262. end-to-end circuits, and tunnels data in fixed-size cells.
  263. Establishing circuits is computationally expensive and typically
  264. requires public-key
  265. cryptography, whereas relaying cells is comparatively inexpensive and
  266. typically requires only symmetric encryption.
  267. Because a circuit crosses several servers, and each server only knows
  268. the adjacent servers in the circuit, no single server can link a
  269. user to her communication partners.
  270. The {\bf Java Anon Proxy} (also known as JAP or Web MIXes) uses fixed shared
  271. routes known as \emph{cascades}. As with a single-hop proxy, this
  272. approach aggregates users into larger anonymity sets, but again an
  273. attacker only needs to observe both ends of the cascade to bridge all
  274. the system's traffic. The Java Anon Proxy's design
  275. calls for padding between end users and the head of the
  276. cascade~\cite{web-mix}. However, it is not demonstrated whether the current
  277. implementation's padding policy improves anonymity.
  278. {\bf PipeNet}~\cite{back01, pipenet}, another low-latency design proposed
  279. around the same time as Onion Routing, gave
  280. stronger anonymity but allowed a single user to shut
  281. down the network by not sending. Systems like {\bf ISDN
  282. mixes}~\cite{isdn-mixes} were designed for other environments with
  283. different assumptions.
  284. %XXX please can we fix this sentence to something less demeaning
  285. In P2P designs like {\bf Tarzan}~\cite{tarzan:ccs02} and
  286. {\bf MorphMix}~\cite{morphmix:fc04}, all participants both generate
  287. traffic and relay traffic for others. These systems aim to conceal
  288. whether a given peer originated a request
  289. or just relayed it from another peer. While Tarzan and MorphMix use
  290. layered encryption as above, {\bf Crowds}~\cite{crowds-tissec} simply assumes
  291. an adversary who cannot observe the initiator: it uses no public-key
  292. encryption, so any node on a circuit can read users' traffic.
  293. {\bf Hordes}~\cite{hordes-jcs} is based on Crowds but also uses multicast
  294. responses to hide the initiator. {\bf Herbivore}~\cite{herbivore} and
  295. $\mbox{\bf P}^{\mathbf 5}$~\cite{p5} go even further, requiring broadcast.
  296. These systems are designed primarily for communication among peers,
  297. although Herbivore users can make external connections by
  298. requesting a peer to serve as a proxy.
  299. Systems like {\bf Freedom} and the original Onion Routing build circuits
  300. all at once, using a layered ``onion'' of public-key encrypted messages,
  301. each layer of which provides session keys and the address of the
  302. next server in the circuit. Tor as described herein, Tarzan, MorphMix,
  303. {\bf Cebolla}~\cite{cebolla}, and Rennhard's {\bf Anonymity Network}~\cite{anonnet}
  304. build circuits
  305. in stages, extending them one hop at a time.
  306. Section~\ref{subsubsec:constructing-a-circuit} describes how this
  307. approach enables perfect forward secrecy.
  308. Circuit-based designs must choose which protocol layer
  309. to anonymize. They may intercept IP packets directly, and
  310. relay them whole (stripping the source address) along the
  311. circuit~\cite{freedom2-arch,tarzan:ccs02}. Like
  312. Tor, they may accept TCP streams and relay the data in those streams,
  313. ignoring the breakdown of that data into TCP
  314. segments~\cite{morphmix:fc04,anonnet}. Finally, like Crowds, they may accept
  315. application-level protocols such as HTTP and relay the application
  316. requests themselves.
  317. Making this protocol-layer decision requires a compromise between flexibility
  318. and anonymity. For example, a system that understands HTTP
  319. can strip
  320. identifying information from requests, can take advantage of caching
  321. to limit the number of requests that leave the network, and can batch
  322. or encode requests to minimize the number of connections.
  323. On the other hand, an IP-level anonymizer can handle nearly any protocol,
  324. even ones unforeseen by its designers (though these systems require
  325. kernel-level modifications to some operating systems, and so are more
  326. complex and less portable). TCP-level anonymity networks like Tor present
  327. a middle approach: they are application neutral (so long as the
  328. application supports, or can be tunneled across, TCP), but by treating
  329. application connections as data streams rather than raw TCP packets,
  330. they avoid the inefficiencies of tunneling TCP over
  331. TCP.
  332. Distributed-trust anonymizing systems need to prevent attackers from
  333. adding too many servers and thus compromising user paths.
  334. Tor relies on a small set of well-known directory servers, run by
  335. independent parties, to decide which nodes can
  336. join. Tarzan and MorphMix allow unknown users to run servers, and use
  337. a limited resource (like IP addresses) to prevent an attacker from
  338. controlling too much of the network. Crowds suggests requiring
  339. written, notarized requests from potential crowd members.
  340. Anonymous communication is essential for censorship-resistant
  341. systems like Eternity~\cite{eternity}, Free~Haven~\cite{freehaven-berk},
  342. Publius~\cite{publius}, and Tangler~\cite{tangler}. Tor's rendezvous
  343. points enable connections between mutually anonymous entities; they
  344. are a building block for location-hidden servers, which are needed by
  345. Eternity and Free~Haven.
  346. % didn't include rewebbers. No clear place to put them, so I'll leave
  347. % them out for now. -RD
  348. \section{Design goals and assumptions}
  349. \label{sec:assumptions}
  350. \noindent{\large\bf Goals}\\
  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 user. Within this
  354. main goal, however, several considerations have directed
  355. Tor's evolution.
  356. \textbf{Deployability:} The design must be deployed and used in the
  357. real world. Thus it
  358. must not be expensive to run (for example, by requiring more bandwidth
  359. than volunteers are willing to provide); must not place a heavy
  360. liability burden on operators (for example, by allowing attackers to
  361. implicate onion routers in illegal activities); and must not be
  362. difficult or expensive to implement (for example, by requiring kernel
  363. patches, or separate proxies for every protocol). We also cannot
  364. require non-anonymous parties (such as websites)
  365. to run our software. (Our rendezvous point design does not meet
  366. this goal for non-anonymous users talking to hidden servers,
  367. however; see Section~\ref{sec:rendezvous}.)
  368. \textbf{Usability:} A hard-to-use system has fewer users---and because
  369. anonymity systems hide users among users, a system with fewer users
  370. provides less anonymity. Usability is thus not only a convenience:
  371. it is a security requirement~\cite{econymics,back01}. Tor should
  372. therefore not
  373. require modifying familiar applications; should not introduce prohibitive
  374. delays;
  375. and should require as few configuration decisions
  376. as possible. Finally, Tor should be easily implementable on all common
  377. platforms; we cannot require users to change their operating system
  378. to be anonymous. (Tor currently runs on Win32, Linux,
  379. Solaris, BSD-style Unix, MacOS X, and probably others.)
  380. \textbf{Flexibility:} The protocol must be flexible and well-specified,
  381. so Tor can serve as a test-bed for future research.
  382. Many of the open problems in low-latency anonymity
  383. networks, such as generating dummy traffic or preventing Sybil
  384. attacks~\cite{sybil}, may be solvable independently from the issues
  385. solved by
  386. Tor. Hopefully future systems will not need to reinvent Tor's design.
  387. %(But note that while a flexible design benefits researchers,
  388. %there is a danger that differing choices of extensions will make users
  389. %distinguishable. Experiments should be run on a separate network.)
  390. \textbf{Simple design:} The protocol's design and security
  391. parameters must be well-understood. Additional features impose implementation
  392. and complexity costs; adding unproven techniques to the design threatens
  393. deployability, readability, and ease of security analysis. Tor aims to
  394. deploy a simple and stable system that integrates the best accepted
  395. approaches to protecting anonymity.\\
  396. \noindent{\large\bf Non-goals}\label{subsec:non-goals}\\
  397. In favoring simple, deployable designs, we have explicitly deferred
  398. several possible goals, either because they are solved elsewhere, or because
  399. they are not yet solved.
  400. \textbf{Not peer-to-peer:} Tarzan and MorphMix aim to scale to completely
  401. decentralized peer-to-peer environments with thousands of short-lived
  402. servers, many of which may be controlled by an adversary. This approach
  403. is appealing, but still has many open
  404. problems~\cite{tarzan:ccs02,morphmix:fc04}.
  405. \textbf{Not secure against end-to-end attacks:} Tor does not claim
  406. to completely solve end-to-end timing or intersection
  407. attacks. Some approaches, such as having users run their own onion routers,
  408. may help;
  409. see Section~\ref{sec:maintaining-anonymity} for more discussion.
  410. \textbf{No protocol normalization:} Tor does not provide \emph{protocol
  411. normalization} like Privoxy or the Anonymizer. If senders want anonymity from
  412. responders while using complex and variable
  413. protocols like HTTP, Tor must be layered with a filtering proxy such
  414. as Privoxy to hide differences between clients, and expunge protocol
  415. features that leak identity.
  416. Note that by this separation Tor can also provide services that
  417. are anonymous to the network yet authenticated to the responder, like
  418. SSH. Similarly, Tor does not integrate
  419. tunneling for non-stream-based protocols like UDP; this must be
  420. provided by an external service if appropriate.
  421. \textbf{Not steganographic:} Tor does not try to conceal who is connected
  422. to the network.
  423. \subsection{Threat Model}
  424. \label{subsec:threat-model}
  425. A global passive adversary is the most commonly assumed threat when
  426. analyzing theoretical anonymity designs. But like all practical
  427. low-latency systems, Tor does not protect against such a strong
  428. adversary. Instead, we assume an adversary who can observe some fraction
  429. of network traffic; who can generate, modify, delete, or delay
  430. traffic; who can operate onion routers of his own; and who can
  431. compromise some fraction of the onion routers.
  432. In low-latency anonymity systems that use layered encryption, the
  433. adversary's typical goal is to observe both the initiator and the
  434. responder. By observing both ends, passive attackers can confirm a
  435. suspicion that Alice is
  436. talking to Bob if the timing and volume patterns of the traffic on the
  437. connection are distinct enough; active attackers can induce timing
  438. signatures on the traffic to force distinct patterns. Rather
  439. than focusing on these \emph{traffic confirmation} attacks,
  440. we aim to prevent \emph{traffic
  441. analysis} attacks, where the adversary uses traffic patterns to learn
  442. which points in the network he should attack.
  443. Our adversary might try to link an initiator Alice with her
  444. communication partners, or try to build a profile of Alice's
  445. behavior. He might mount passive attacks by observing the network edges
  446. and correlating traffic entering and leaving the network---by
  447. relationships in packet timing, volume, or externally visible
  448. user-selected
  449. options. The adversary can also mount active attacks by compromising
  450. routers or keys; by replaying traffic; by selectively denying service
  451. to trustworthy routers to move users to
  452. compromised routers, or denying service to users to see if traffic
  453. elsewhere in the
  454. network stops; or by introducing patterns into traffic that can later be
  455. detected. The adversary might subvert the directory servers to give users
  456. differing views of network state. Additionally, he can try to decrease
  457. the network's reliability by attacking nodes or by performing antisocial
  458. activities from reliable nodes and trying to get them taken down---making
  459. the network unreliable flushes users to other less anonymous
  460. systems, where they may be easier to attack. We summarize
  461. in Section~\ref{sec:attacks} how well the Tor design defends against
  462. each of these attacks.
  463. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  464. \section{The Tor Design}
  465. \label{sec:design}
  466. The Tor network is an overlay network; each onion router (OR)
  467. runs as a normal
  468. user-level process without any special privileges.
  469. Each onion router maintains a TLS~\cite{TLS}
  470. connection to every other onion router.
  471. %(We discuss alternatives to this clique-topology assumption in
  472. %Section~\ref{sec:maintaining-anonymity}.)
  473. % A subset of the ORs also act as
  474. %directory servers, tracking which routers are in the network;
  475. %see Section~\ref{subsec:dirservers} for directory server details.
  476. Each user
  477. runs local software called an onion proxy (OP) to fetch directories,
  478. establish circuits across the network,
  479. and handle connections from user applications. These onion proxies accept
  480. TCP streams and multiplex them across the circuits. The onion
  481. router on the other side
  482. of the circuit connects to the requested destinations
  483. and relays data.
  484. Each onion router maintains a long-term identity key and a short-term
  485. onion key. The identity
  486. key is used to sign TLS certificates, to sign the OR's \emph{router
  487. descriptor} (a summary of its keys, address, bandwidth, exit policy,
  488. and so on), and (by directory servers) to sign directories. %Changing
  489. %the identity key of a router is considered equivalent to creating a
  490. %new router.
  491. The onion key is used to decrypt requests
  492. from users to set up a circuit and negotiate ephemeral keys.
  493. The TLS protocol also establishes a short-term link key when communicating
  494. between ORs. Short-term keys are rotated periodically and
  495. independently, to limit the impact of key compromise.
  496. Section~\ref{subsec:cells} presents the fixed-size
  497. \emph{cells} that are the unit of communication in Tor. We describe
  498. in Section~\ref{subsec:circuits} how circuits are
  499. built, extended, truncated, and destroyed. Section~\ref{subsec:tcp}
  500. describes how TCP streams are routed through the network. We address
  501. integrity checking in Section~\ref{subsec:integrity-checking},
  502. and resource limiting in Section~\ref{subsec:rate-limit}.
  503. Finally,
  504. Section~\ref{subsec:congestion} talks about congestion control and
  505. fairness issues.
  506. \subsection{Cells}
  507. \label{subsec:cells}
  508. Onion routers communicate with one another, and with users' OPs, via
  509. TLS connections with ephemeral keys. Using TLS conceals the data on
  510. the connection with perfect forward secrecy, and prevents an attacker
  511. from modifying data on the wire or impersonating an OR.
  512. Traffic passes along these connections in fixed-size cells. Each cell
  513. is 512 bytes, %(but see Section~\ref{sec:conclusion} for a discussion of
  514. %allowing large cells and small cells on the same network),
  515. and consists of a header and a payload. The header includes a circuit
  516. identifier (circID) that specifies which circuit the cell refers to
  517. (many circuits can be multiplexed over the single TLS connection), and
  518. a command to describe what to do with the cell's payload. (Circuit
  519. identifiers are connection-specific: each circuit has a different
  520. circID on each OP/OR or OR/OR connection it traverses.)
  521. Based on their command, cells are either \emph{control} cells, which are
  522. always interpreted by the node that receives them, or \emph{relay} cells,
  523. which carry end-to-end stream data. The control cell commands are:
  524. \emph{padding} (currently used for keepalive, but also usable for link
  525. padding); \emph{create} or \emph{created} (used to set up a new circuit);
  526. and \emph{destroy} (to tear down a circuit).
  527. Relay cells have an additional header (the relay header) at the front
  528. of the payload, containing a streamID (stream identifier: many streams can
  529. be multiplexed over a circuit); an end-to-end checksum for integrity
  530. checking; the length of the relay payload; and a relay command.
  531. The entire contents of the relay header and the relay cell payload
  532. are encrypted or decrypted together as the relay cell moves along the
  533. circuit, using the 128-bit AES cipher in counter mode to generate a
  534. cipher stream. The relay commands are: \emph{relay
  535. data} (for data flowing down the stream), \emph{relay begin} (to open a
  536. stream), \emph{relay end} (to close a stream cleanly), \emph{relay
  537. teardown} (to close a broken stream), \emph{relay connected}
  538. (to notify the OP that a relay begin has succeeded), \emph{relay
  539. extend} and \emph{relay extended} (to extend the circuit by a hop,
  540. and to acknowledge), \emph{relay truncate} and \emph{relay truncated}
  541. (to tear down only part of the circuit, and to acknowledge), \emph{relay
  542. sendme} (used for congestion control), and \emph{relay drop} (used to
  543. implement long-range dummies).
  544. We give a visual overview of cell structure plus the details of relay
  545. cell structure, and then describe each of these cell types and commands
  546. in more detail below.
  547. %\begin{figure}[h]
  548. %\unitlength=1cm
  549. %\centering
  550. %\begin{picture}(8.0,1.5)
  551. %\put(4,.5){\makebox(0,0)[c]{\epsfig{file=cell-struct,width=7cm}}}
  552. %\end{picture}
  553. %\end{figure}
  554. \begin{figure}[h]
  555. \centering
  556. \mbox{\epsfig{figure=cell-struct,width=7cm}}
  557. \end{figure}
  558. \subsection{Circuits and streams}
  559. \label{subsec:circuits}
  560. Onion Routing originally built one circuit for each
  561. TCP stream. Because building a circuit can take several tenths of a
  562. second (due to public-key cryptography and network latency),
  563. this design imposed high costs on applications like web browsing that
  564. open many TCP streams.
  565. In Tor, each circuit can be shared by many TCP streams. To avoid
  566. delays, users construct circuits preemptively. To limit linkability
  567. among their streams, users' OPs build a new circuit
  568. periodically if the previous ones have been used,
  569. and expire old used circuits that no longer have any open streams.
  570. OPs consider rotating to a new circuit once a minute: thus
  571. even heavy users spend negligible time
  572. building circuits, but a limited number of requests can be linked
  573. to each other through a given exit node. Also, because circuits are built
  574. in the background, OPs can recover from failed circuit creation
  575. without harming user experience.\\
  576. \begin{figure}[h]
  577. \centering
  578. \mbox{\epsfig{figure=interaction,width=8.75cm}}
  579. \caption{Alice builds a two-hop circuit and begins fetching a web page.}
  580. \label{fig:interaction}
  581. \end{figure}
  582. \noindent{\large\bf Constructing a circuit}\label{subsubsec:constructing-a-circuit}\\
  583. %\subsubsection{Constructing a circuit}
  584. A user's OP constructs circuits incrementally, negotiating a
  585. symmetric key with each OR on the circuit, one hop at a time. To begin
  586. creating a new circuit, the OP (call her Alice) sends a
  587. \emph{create} cell to the first node in her chosen path (call him Bob).
  588. (She chooses a new
  589. circID $C_{AB}$ not currently used on the connection from her to Bob.)
  590. The \emph{create} cell's
  591. payload contains the first half of the Diffie-Hellman handshake
  592. ($g^x$), encrypted to the onion key of the OR (call him Bob). Bob
  593. responds with a \emph{created} cell containing $g^y$
  594. along with a hash of the negotiated key $K=g^{xy}$.
  595. Once the circuit has been established, Alice and Bob can send one
  596. another relay cells encrypted with the negotiated
  597. key.\footnote{Actually, the negotiated key is used to derive two
  598. symmetric keys: one for each direction.} More detail is given in
  599. the next section.
  600. To extend the circuit further, Alice sends a \emph{relay extend} cell
  601. to Bob, specifying the address of the next OR (call her Carol), and
  602. an encrypted $g^{x_2}$ for her. Bob copies the half-handshake into a
  603. \emph{create} cell, and passes it to Carol to extend the circuit.
  604. (Bob chooses a new circID $C_{BC}$ not currently used on the connection
  605. between him and Carol. Alice never needs to know this circID; only Bob
  606. associates $C_{AB}$ on his connection with Alice to $C_{BC}$ on
  607. his connection with Carol.)
  608. When Carol responds with a \emph{created} cell, Bob wraps the payload
  609. into a \emph{relay extended} cell and passes it back to Alice. Now
  610. the circuit is extended to Carol, and Alice and Carol share a common key
  611. $K_2 = g^{x_2 y_2}$.
  612. To extend the circuit to a third node or beyond, Alice
  613. proceeds as above, always telling the last node in the circuit to
  614. extend one hop further.
  615. This circuit-level handshake protocol achieves unilateral entity
  616. authentication (Alice knows she's handshaking with the OR, but
  617. the OR doesn't care who is opening the circuit---Alice uses no public key
  618. and remains anonymous) and unilateral key authentication
  619. (Alice and the OR agree on a key, and Alice knows only the OR learns
  620. it). It also achieves forward
  621. secrecy and key freshness. More formally, the protocol is as follows
  622. (where $E_{PK_{Bob}}(\cdot)$ is encryption with Bob's public key,
  623. $H$ is a secure hash function, and $|$ is concatenation):
  624. \begin{equation*}
  625. \begin{aligned}
  626. \mathrm{Alice} \rightarrow \mathrm{Bob}&: E_{PK_{Bob}}(g^x) \\
  627. \mathrm{Bob} \rightarrow \mathrm{Alice}&: g^y, H(K | \mathrm{``handshake"}) \\
  628. \end{aligned}
  629. \end{equation*}
  630. \noindent In the second step, Bob proves that it was he who received $g^x$,
  631. and who chose $y$. We use PK encryption in the first step
  632. (rather than, say, using the first two steps of STS, which has a
  633. signature in the second step) because a single cell is too small to
  634. hold both a public key and a signature. Preliminary analysis with the
  635. NRL protocol analyzer~\cite{meadows96} shows this protocol to be
  636. secure (including perfect forward secrecy) under the
  637. traditional Dolev-Yao model.\\
  638. \noindent{\large\bf Relay cells}\\
  639. %\subsubsection{Relay cells}
  640. %
  641. Once Alice has established the circuit (so she shares keys with each
  642. OR on the circuit), she can send relay cells.
  643. %Recall that every relay cell has a streamID that indicates to which
  644. %stream the cell belongs. %This streamID allows a relay cell to be
  645. %addressed to any OR on the circuit.
  646. Upon receiving a relay
  647. cell, an OR looks up the corresponding circuit, and decrypts the relay
  648. header and payload with the session key for that circuit.
  649. If the cell is headed away from Alice the OR then checks whether the
  650. decrypted cell has a valid digest (as an optimization, the first
  651. two bytes of the integrity check are zero, so in most cases we can avoid
  652. computing the hash).
  653. %is recognized---either because it
  654. %corresponds to an open stream at this OR for the given circuit, or because
  655. %it is the control streamID (zero).
  656. If valid, it accepts the relay cell and processes it as described
  657. below. Otherwise,
  658. the OR looks up the circID and OR for the
  659. next step in the circuit, replaces the circID as appropriate, and
  660. sends the decrypted relay cell to the next OR. (If the OR at the end
  661. of the circuit receives an unrecognized relay cell, an error has
  662. occurred, and the circuit is torn down.)
  663. OPs treat incoming relay cells similarly: they iteratively unwrap the
  664. relay header and payload with the session keys shared with each
  665. OR on the circuit, from the closest to farthest.
  666. If at any stage the digest is valid, the cell must have
  667. originated at the OR whose encryption has just been removed.
  668. To construct a relay cell addressed to a given OR, Alice assigns the
  669. digest, and then iteratively
  670. encrypts the cell payload (that is, the relay header and payload) with
  671. the symmetric key of each hop up to that OR. Because the digest is
  672. encrypted to a different value at each step, only at the targeted OR
  673. will it have a meaningful value.\footnote{
  674. % Should we just say that 2^56 is itself negligible?
  675. % Assuming 4-hop circuits with 10 streams per hop, there are 33
  676. % possible bad streamIDs before the last circuit. This still
  677. % gives an error only once every 2 million terabytes (approx).
  678. With 48 bits of digest per cell, the probability of an accidental
  679. collision is far lower than the chance of hardware failure.}
  680. This \emph{leaky pipe} circuit topology
  681. allows Alice's streams to exit at different ORs on a single circuit.
  682. Alice may choose different exit points because of their exit policies,
  683. or to keep the ORs from knowing that two streams
  684. originate from the same person.
  685. When an OR later replies to Alice with a relay cell, it
  686. encrypts the cell's relay header and payload with the single key it
  687. shares with Alice, and sends the cell back toward Alice along the
  688. circuit. Subsequent ORs add further layers of encryption as they
  689. relay the cell back to Alice.
  690. To tear down a circuit, Alice sends a \emph{destroy} control
  691. cell. Each OR in the circuit receives the \emph{destroy} cell, closes
  692. all streams on that circuit, and passes a new \emph{destroy} cell
  693. forward. But just as circuits are built incrementally, they can also
  694. be torn down incrementally: Alice can send a \emph{relay
  695. truncate} cell to a single OR on a circuit. That OR then sends a
  696. \emph{destroy} cell forward, and acknowledges with a
  697. \emph{relay truncated} cell. Alice can then extend the circuit to
  698. different nodes, without signaling to the intermediate nodes (or
  699. a limited observer) that she has changed her circuit.
  700. Similarly, if a node on the circuit goes down, the adjacent
  701. node can send a \emph{relay truncated} cell back to Alice. Thus the
  702. ``break a node and see which circuits go down''
  703. attack~\cite{freedom21-security} is weakened.
  704. \subsection{Opening and closing streams}
  705. \label{subsec:tcp}
  706. When Alice's application wants a TCP connection to a given
  707. address and port, it asks the OP (via SOCKS) to make the
  708. connection. The OP chooses the newest open circuit (or creates one if
  709. needed), and chooses a suitable OR on that circuit to be the
  710. exit node (usually the last node, but maybe others due to exit policy
  711. conflicts; see Section~\ref{subsec:exitpolicies}.) The OP then opens
  712. the stream by sending a \emph{relay begin} cell to the exit node,
  713. using a new random streamID. Once the
  714. exit node connects to the remote host, it responds
  715. with a \emph{relay connected} cell. Upon receipt, the OP sends a
  716. SOCKS reply to notify the application of its success. The OP
  717. now accepts data from the application's TCP stream, packaging it into
  718. \emph{relay data} cells and sending those cells along the circuit to
  719. the chosen OR.
  720. There's a catch to using SOCKS, however---some applications pass the
  721. alphanumeric hostname to the Tor client, while others resolve it into
  722. an IP address first and then pass the IP address to the Tor client. If
  723. the application does DNS resolution first, Alice thereby reveals her
  724. destination to the remote DNS server, rather than sending the hostname
  725. through the Tor network to be resolved at the far end. Common applications
  726. like Mozilla and SSH have this flaw.
  727. With Mozilla, the flaw is easy to address: the filtering HTTP
  728. proxy called Privoxy gives a hostname to the Tor client, so Alice's
  729. computer never does DNS resolution.
  730. But a portable general solution, such as is needed for
  731. SSH, is
  732. an open problem. Modifying or replacing the local nameserver
  733. can be invasive, brittle, and unportable. Forcing the resolver
  734. library to prefer TCP rather than UDP is hard, and also has
  735. portability problems. Dynamically intercepting system calls to the
  736. resolver library seems a promising direction. We could also provide
  737. a tool similar to \emph{dig} to perform a private lookup through the
  738. Tor network. Currently, we encourage the use of privacy-aware proxies
  739. like Privoxy wherever possible.
  740. Closing a Tor stream is analogous to closing a TCP stream: it uses a
  741. two-step handshake for normal operation, or a one-step handshake for
  742. errors. If the stream closes abnormally, the adjacent node simply sends a
  743. \emph{relay teardown} cell. If the stream closes normally, the node sends
  744. a \emph{relay end} cell down the circuit, and the other side responds with
  745. its own \emph{relay end} cell. Because
  746. all relay cells use layered encryption, only the destination OR knows
  747. that a given relay cell is a request to close a stream. This two-step
  748. handshake allows Tor to support TCP-based applications that use half-closed
  749. connections.
  750. % such as broken HTTP clients that close their side of the
  751. %stream after writing but are still willing to read.
  752. \subsection{Integrity checking on streams}
  753. \label{subsec:integrity-checking}
  754. Because the old Onion Routing design used a stream cipher without integrity
  755. checking, traffic was
  756. vulnerable to a malleability attack: though the attacker could not
  757. decrypt cells, any changes to encrypted data
  758. would create corresponding changes to the data leaving the network.
  759. This weakness allowed an adversary who could guess the encrypted content
  760. to change a padding cell to a destroy
  761. cell; change the destination address in a \emph{relay begin} cell to the
  762. adversary's webserver; or change an FTP command from
  763. {\tt dir} to {\tt rm~*}. (Even an external
  764. adversary could do this, because the link encryption similarly used a
  765. stream cipher.)
  766. Because Tor uses TLS on its links, external adversaries cannot modify
  767. data. Addressing the insider malleability attack, however, is
  768. more complex.
  769. We could do integrity checking of the relay cells at each hop, either
  770. by including hashes or by using an authenticating cipher mode like
  771. EAX~\cite{eax}, but there are some problems. First, these approaches
  772. impose a message-expansion overhead at each hop, and so we would have to
  773. either leak the path length or waste bytes by padding to a maximum
  774. path length. Second, these solutions can only verify traffic coming
  775. from Alice: ORs would not be able to produce suitable hashes for
  776. the intermediate hops, since the ORs on a circuit do not know the
  777. other ORs' session keys. Third, we have already accepted that our design
  778. is vulnerable to end-to-end timing attacks; so tagging attacks performed
  779. within the circuit provide no additional information to the attacker.
  780. Thus, we check integrity only at the edges of each stream. (Remember that
  781. in our leaky-pipe circuit topology, a stream's edge could be any hop
  782. in the circuit.) When Alice
  783. negotiates a key with a new hop, they each initialize a SHA-1
  784. digest with a derivative of that key,
  785. thus beginning with randomness that only the two of them know.
  786. Then they each incrementally add to the SHA-1 digest the contents of
  787. all relay cells they create, and include with each relay cell the
  788. first four bytes of the current digest. Each also keeps a SHA-1
  789. digest of data received, to verify that the received hashes are correct.
  790. To be sure of removing or modifying a cell, the attacker must be able
  791. to deduce the current digest state (which depends on all
  792. traffic between Alice and Bob, starting with their negotiated key).
  793. Attacks on SHA-1 where the adversary can incrementally add to a hash
  794. to produce a new valid hash don't work, because all hashes are
  795. end-to-end encrypted across the circuit. The computational overhead
  796. of computing the digests is minimal compared to doing the AES
  797. encryption performed at each hop of the circuit. We use only four
  798. bytes per cell to minimize overhead; the chance that an adversary will
  799. correctly guess a valid hash
  800. %, plus the payload the current cell,
  801. is
  802. acceptably low, given that the OP or OR tear down the circuit if they
  803. receive a bad hash.
  804. \subsection{Rate limiting and fairness}
  805. \label{subsec:rate-limit}
  806. Volunteers are more willing to run services that can limit
  807. their bandwidth usage. To accommodate them, Tor servers use a
  808. token bucket approach~\cite{tannenbaum96} to
  809. enforce a long-term average rate of incoming bytes, while still
  810. permitting short-term bursts above the allowed bandwidth.
  811. % Current bucket sizes are set to ten seconds' worth of traffic.
  812. %Further, we want to avoid starving any Tor streams. Entire circuits
  813. %could starve if we read greedily from connections and one connection
  814. %uses all the remaining bandwidth. We solve this by dividing the number
  815. %of tokens in the bucket by the number of connections that want to read,
  816. %and reading at most that number of bytes from each connection. We iterate
  817. %this procedure until the number of tokens in the bucket is under some
  818. %threshold (currently 10KB), at which point we greedily read from connections.
  819. Because the Tor protocol outputs about the same number of bytes as it
  820. takes in, it is sufficient in practice to limit only incoming bytes.
  821. With TCP streams, however, the correspondence is not one-to-one:
  822. relaying a single incoming byte can require an entire 512-byte cell.
  823. (We can't just wait for more bytes, because the local application may
  824. be awaiting a reply.) Therefore, we treat this case as if the entire
  825. cell size had been read, regardless of the cell's fullness.
  826. Further, inspired by Rennhard et al's design in~\cite{anonnet}, a
  827. circuit's edges can heuristically distinguish interactive streams from bulk
  828. streams by comparing the frequency with which they supply cells. We can
  829. provide good latency for interactive streams by giving them preferential
  830. service, while still giving good overall throughput to the bulk
  831. streams. Such preferential treatment presents a possible end-to-end
  832. attack, but an adversary observing both
  833. ends of the stream can already learn this information through timing
  834. attacks.
  835. \subsection{Congestion control}
  836. \label{subsec:congestion}
  837. Even with bandwidth rate limiting, we still need to worry about
  838. congestion, either accidental or intentional. If enough users choose the
  839. same OR-to-OR connection for their circuits, that connection can become
  840. saturated. For example, an attacker could send a large file
  841. through the Tor network to a webserver he runs, and then
  842. refuse to read any of the bytes at the webserver end of the
  843. circuit. Without some congestion control mechanism, these bottlenecks
  844. can propagate back through the entire network. We don't need to
  845. reimplement full TCP windows (with sequence numbers,
  846. the ability to drop cells when we're full and retransmit later, and so
  847. on),
  848. because TCP already guarantees in-order delivery of each
  849. cell.
  850. %But we need to investigate further the effects of the current
  851. %parameters on throughput and latency, while also keeping privacy in mind;
  852. %see Section~\ref{sec:maintaining-anonymity} for more discussion.
  853. We describe our response below.
  854. \textbf{Circuit-level throttling:}
  855. To control a circuit's bandwidth usage, each OR keeps track of two
  856. windows. The \emph{packaging window} tracks how many relay data cells the OR is
  857. allowed to package (from incoming TCP streams) for transmission back to the OP,
  858. and the \emph{delivery window} tracks how many relay data cells it is willing
  859. to deliver to TCP streams outside the network. Each window is initialized
  860. (say, to 1000 data cells). When a data cell is packaged or delivered,
  861. the appropriate window is decremented. When an OR has received enough
  862. data cells (currently 100), it sends a \emph{relay sendme} cell towards the OP,
  863. with streamID zero. When an OR receives a \emph{relay sendme} cell with
  864. streamID zero, it increments its packaging window. Either of these cells
  865. increments the corresponding window by 100. If the packaging window
  866. reaches 0, the OR stops reading from TCP connections for all streams
  867. on the corresponding circuit, and sends no more relay data cells until
  868. receiving a \emph{relay sendme} cell.
  869. The OP behaves identically, except that it must track a packaging window
  870. and a delivery window for every OR in the circuit. If a packaging window
  871. reaches 0, it stops reading from streams destined for that OR.
  872. \textbf{Stream-level throttling}:
  873. The stream-level congestion control mechanism is similar to the
  874. circuit-level mechanism. ORs and OPs use \emph{relay sendme} cells
  875. to implement end-to-end flow control for individual streams across
  876. circuits. Each stream begins with a packaging window (currently 500 cells),
  877. and increments the window by a fixed value (50) upon receiving a \emph{relay
  878. sendme} cell. Rather than always returning a \emph{relay sendme} cell as soon
  879. as enough cells have arrived, the stream-level congestion control also
  880. has to check whether data has been successfully flushed onto the TCP
  881. stream; it sends the \emph{relay sendme} cell only when the number of bytes pending
  882. to be flushed is under some threshold (currently 10 cells' worth).
  883. %% Maybe omit this next paragraph. -NM
  884. %Currently, non-data relay cells do not affect the windows. Thus we
  885. %avoid potential deadlock issues, for example, arising because a stream
  886. %can't send a \emph{relay sendme} cell when its packaging window is empty.
  887. These arbitrarily chosen parameters seem to give tolerable throughput
  888. and delay; see Section~\ref{sec:in-the-wild}.
  889. \section{Rendezvous Points and hidden services}
  890. \label{sec:rendezvous}
  891. Rendezvous points are a building block for \emph{location-hidden
  892. services} (also known as \emph{responder anonymity}) in the Tor
  893. network. Location-hidden services allow Bob to offer a TCP
  894. service, such as a webserver, without revealing his IP address.
  895. This type of anonymity protects against distributed DoS attacks:
  896. attackers are forced to attack the onion routing network
  897. because they do not know Bob's IP address.
  898. Our design for location-hidden servers has the following goals.
  899. \textbf{Access-control:} Bob needs a way to filter incoming requests,
  900. so an attacker cannot flood Bob simply by making many connections to him.
  901. \textbf{Robustness:} Bob should be able to maintain a long-term pseudonymous
  902. identity even in the presence of router failure. Bob's service must
  903. not be tied to a single OR, and Bob must be able to migrate his service
  904. across ORs. \textbf{Smear-resistance:}
  905. A social attacker
  906. should not be able to ``frame'' a rendezvous router by
  907. offering an illegal or disreputable location-hidden service and
  908. making observers believe the router created that service.
  909. \textbf{Application-transparency:} Although we require users
  910. to run special software to access location-hidden servers, we must not
  911. require them to modify their applications.
  912. We provide location-hiding for Bob by allowing him to advertise
  913. several onion routers (his \emph{introduction points}) as contact
  914. points. He may do this on any robust efficient
  915. key-value lookup system with authenticated updates, such as a
  916. distributed hash table (DHT) like CFS~\cite{cfs:sosp01}.\footnote{
  917. Rather than rely on an external infrastructure, the Onion Routing network
  918. can run the lookup service itself. Our current implementation provides a
  919. simple lookup system on the
  920. directory servers.} Alice, the client, chooses an OR as her
  921. \emph{rendezvous point}. She connects to one of Bob's introduction
  922. points, informs him of her rendezvous point, and then waits for him
  923. to connect to the rendezvous point. This extra level of indirection
  924. helps Bob's introduction points avoid problems associated with serving
  925. unpopular files directly (for example, if Bob serves
  926. material that the introduction point's community finds objectionable,
  927. or if Bob's service tends to get attacked by network vandals).
  928. The extra level of indirection also allows Bob to respond to some requests
  929. and ignore others.
  930. \subsection{Rendezvous points in Tor}
  931. The following steps are
  932. %We give an overview of the steps of a rendezvous. These are
  933. performed on behalf of Alice and Bob by their local OPs;
  934. application integration is described more fully below.
  935. \begin{tightlist}
  936. \item Bob generates a long-term public key pair to identify his service.
  937. \item Bob chooses some introduction points, and advertises them on
  938. the lookup service, signing the advertisement with his public key. He
  939. can add more later.
  940. \item Bob builds a circuit to each of his introduction points, and tells
  941. them to wait for requests.
  942. \item Alice learns about Bob's service out of band (perhaps Bob told her,
  943. or she found it on a website). She retrieves the details of Bob's
  944. service from the lookup service. If Alice wants to access Bob's
  945. service anonymously, she must connect to the lookup service via Tor.
  946. \item Alice chooses an OR as the rendezvous point (RP) for her connection to
  947. Bob's service. She builds a circuit to the RP, and gives it a
  948. randomly chosen ``rendezvous cookie'' to recognize Bob.
  949. \item Alice opens an anonymous stream to one of Bob's introduction
  950. points, and gives it a message (encrypted with Bob's public key)
  951. telling it about herself,
  952. her RP and rendezvous cookie, and the
  953. start of a DH
  954. handshake. The introduction point sends the message to Bob.
  955. \item If Bob wants to talk to Alice, he builds a circuit to Alice's
  956. RP and sends the rendezvous cookie, the second half of the DH
  957. handshake, and a hash of the session
  958. key they now share. By the same argument as in
  959. Section~\ref{subsubsec:constructing-a-circuit}, Alice knows she
  960. shares the key only with Bob.
  961. \item The RP connects Alice's circuit to Bob's. Note that RP can't
  962. recognize Alice, Bob, or the data they transmit.
  963. \item Alice sends a \emph{relay begin} cell along the circuit. It
  964. arrives at Bob's OP, which connects to Bob's
  965. webserver.
  966. \item An anonymous stream has been established, and Alice and Bob
  967. communicate as normal.
  968. \end{tightlist}
  969. When establishing an introduction point, Bob provides the onion router
  970. with the public key identifying his service. Bob signs his
  971. messages, so others cannot usurp his introduction point
  972. in the future. He uses the same public key to establish the other
  973. introduction points for his service, and periodically refreshes his
  974. entry in the lookup service.
  975. The message that Alice gives
  976. the introduction point includes a hash of Bob's public key % to identify
  977. %the service, along with
  978. and an optional initial authorization token (the
  979. introduction point can do prescreening, for example to block replays). Her
  980. message to Bob may include an end-to-end authorization token so Bob
  981. can choose whether to respond.
  982. The authorization tokens can be used to provide selective access:
  983. important users can get uninterrupted access.
  984. %important users get tokens to ensure uninterrupted access. %to the
  985. %service.
  986. During normal situations, Bob's service might simply be offered
  987. directly from mirrors, while Bob gives out tokens to high-priority users. If
  988. the mirrors are knocked down,
  989. %by distributed DoS attacks or even
  990. %physical attack,
  991. those users can switch to accessing Bob's service via
  992. the Tor rendezvous system.
  993. Bob's introduction points are themselves subject to DoS---he must
  994. open many introduction points or risk such an attack.
  995. He can provide selected users with a current list or future schedule of
  996. unadvertised introduction points;
  997. this is most practical
  998. if there is a stable and large group of introduction points
  999. available. Bob could also give secret public keys
  1000. for consulting the lookup service. All of these approaches
  1001. limit exposure even when
  1002. some selected users collude in the DoS\@.
  1003. \subsection{Integration with user applications}
  1004. Bob configures his onion proxy to know the local IP address and port of his
  1005. service, a strategy for authorizing clients, and his public key. The onion
  1006. proxy anonymously publishes a signed statement of Bob's
  1007. public key, an expiration time, and
  1008. the current introduction points for his service onto the lookup service,
  1009. indexed
  1010. by the hash of his public key. Bob's webserver is unmodified,
  1011. and doesn't even know that it's hidden behind the Tor network.
  1012. Alice's applications also work unchanged---her client interface
  1013. remains a SOCKS proxy. We encode all of the necessary information
  1014. into the fully qualified domain name (FQDN) Alice uses when establishing her
  1015. connection. Location-hidden services use a virtual top level domain
  1016. called {\tt .onion}: thus hostnames take the form {\tt x.y.onion} where
  1017. {\tt x} is the authorization cookie and {\tt y} encodes the hash of
  1018. the public key. Alice's onion proxy
  1019. examines addresses; if they're destined for a hidden server, it decodes
  1020. the key and starts the rendezvous as described above.
  1021. \subsection{Previous rendezvous work}
  1022. %XXXX Should this get integrated into the earlier related work section? -NM
  1023. Rendezvous points in low-latency anonymity systems were first
  1024. described for use in ISDN telephony~\cite{jerichow-jsac98,isdn-mixes}.
  1025. Later low-latency designs used rendezvous points for hiding location
  1026. of mobile phones and low-power location
  1027. trackers~\cite{federrath-ih96,reed-protocols97}. Rendezvous for
  1028. anonymizing low-latency
  1029. Internet connections was suggested in early Onion Routing
  1030. work~\cite{or-ih96}, but the first published design was by Ian
  1031. Goldberg~\cite{ian-thesis}. His design differs from
  1032. ours in three ways. First, Goldberg suggests that Alice should manually
  1033. hunt down a current location of the service via Gnutella; our approach
  1034. makes lookup transparent to the user, as well as faster and more robust.
  1035. Second, in Tor the client and server negotiate session keys
  1036. with Diffie-Hellman, so plaintext is not exposed even at the rendezvous
  1037. point. Third,
  1038. our design minimizes the exposure from running the
  1039. service, to encourage volunteers to offer introduction and rendezvous
  1040. services. Tor's introduction points do not output any bytes to the
  1041. clients; the rendezvous points don't know the client or the server,
  1042. and can't read the data being transmitted. The indirection scheme is
  1043. also designed to include authentication/authorization---if Alice doesn't
  1044. include the right cookie with her request for service, Bob need not even
  1045. acknowledge his existence.
  1046. \section{Other design decisions}
  1047. \label{sec:other-design}
  1048. \subsection{Denial of service}
  1049. \label{subsec:dos}
  1050. Providing Tor as a public service creates many opportunities for
  1051. denial-of-service attacks against the network. While
  1052. flow control and rate limiting (discussed in
  1053. Section~\ref{subsec:congestion}) prevent users from consuming more
  1054. bandwidth than routers are willing to provide, opportunities remain for
  1055. users to
  1056. consume more network resources than their fair share, or to render the
  1057. network unusable for others.
  1058. First of all, there are several CPU-consuming denial-of-service
  1059. attacks wherein an attacker can force an OR to perform expensive
  1060. cryptographic operations. For example, an attacker can
  1061. %\emph{create} cell full of junk bytes can force an OR to perform an RSA
  1062. %decrypt.
  1063. %Similarly, an attacker can
  1064. fake the start of a TLS handshake, forcing the OR to carry out its
  1065. (comparatively expensive) half of the handshake at no real computational
  1066. cost to the attacker.
  1067. We have not yet implemented any defenses for these attacks, but several
  1068. approaches are possible. First, ORs can
  1069. require clients to solve a puzzle~\cite{puzzles-tls} while beginning new
  1070. TLS handshakes or accepting \emph{create} cells. So long as these
  1071. tokens are easy to verify and computationally expensive to produce, this
  1072. approach limits the attack multiplier. Additionally, ORs can limit
  1073. the rate at which they accept \emph{create} cells and TLS connections,
  1074. so that
  1075. the computational work of processing them does not drown out the
  1076. symmetric cryptography operations that keep cells
  1077. flowing. This rate limiting could, however, allow an attacker
  1078. to slow down other users when they build new circuits.
  1079. % What about link-to-link rate limiting?
  1080. Adversaries can also attack the Tor network's hosts and network
  1081. links. Disrupting a single circuit or link breaks all streams passing
  1082. along that part of the circuit. Users similarly lose service
  1083. when a router crashes or its operator restarts it. The current
  1084. Tor design treats such attacks as intermittent network failures, and
  1085. depends on users and applications to respond or recover as appropriate. A
  1086. future design could use an end-to-end TCP-like acknowledgment protocol,
  1087. so no streams are lost unless the entry or exit point is
  1088. disrupted. This solution would require more buffering at the network
  1089. edges, however, and the performance and anonymity implications from this
  1090. extra complexity still require investigation.
  1091. \subsection{Exit policies and abuse}
  1092. \label{subsec:exitpolicies}
  1093. % originally, we planned to put the "users only know the hostname,
  1094. % not the IP, but exit policies are by IP" problem here too. Not
  1095. % worth putting in the submission, but worth thinking about putting
  1096. % in sometime somehow. -RD
  1097. Exit abuse is a serious barrier to wide-scale Tor deployment. Anonymity
  1098. presents would-be vandals and abusers with an opportunity to hide
  1099. the origins of their activities. Attackers can harm the Tor network by
  1100. implicating exit servers for their abuse. Also, applications that commonly
  1101. use IP-based authentication (such as institutional mail or webservers)
  1102. can be fooled by the fact that anonymous connections appear to originate
  1103. at the exit OR.
  1104. We stress that Tor does not enable any new class of abuse. Spammers
  1105. and other attackers already have access to thousands of misconfigured
  1106. systems worldwide, and the Tor network is far from the easiest way
  1107. to launch attacks.
  1108. %Indeed, because of its limited
  1109. %anonymity, Tor is probably not a good way to commit crimes.
  1110. But because the
  1111. onion routers can be mistaken for the originators of the abuse,
  1112. and the volunteers who run them may not want to deal with the hassle of
  1113. explaining anonymity networks to irate administrators, we must block or limit
  1114. abuse through the Tor network.
  1115. To mitigate abuse issues, each onion router's \emph{exit policy}
  1116. describes to which external addresses and ports the router will
  1117. connect. On one end of the spectrum are \emph{open exit}
  1118. nodes that will connect anywhere. On the other end are \emph{middleman}
  1119. nodes that only relay traffic to other Tor nodes, and \emph{private exit}
  1120. nodes that only connect to a local host or network. A private
  1121. exit can allow a client to connect to a given host or
  1122. network more securely---an external adversary cannot eavesdrop traffic
  1123. between the private exit and the final destination, and so is less sure of
  1124. Alice's destination and activities. Most onion routers in the current
  1125. network function as
  1126. \emph{restricted exits} that permit connections to the world at large,
  1127. but prevent access to certain abuse-prone addresses and services such
  1128. as SMTP.
  1129. The OR might also be able to authenticate clients to
  1130. prevent exit abuse without harming anonymity~\cite{or-discex00}.
  1131. %The abuse issues on closed (e.g. military) networks are different
  1132. %from the abuse on open networks like the Internet. While these IP-based
  1133. %access controls are still commonplace on the Internet, on closed networks,
  1134. %nearly all participants will be honest, and end-to-end authentication
  1135. %can be assumed for important traffic.
  1136. Many administrators use port restrictions to support only a
  1137. limited set of services, such as HTTP, SSH, or AIM.
  1138. This is not a complete solution, of course, since abuse opportunities for these
  1139. protocols are still well known.
  1140. We have not yet encountered any abuse in the deployed network, but if
  1141. we do we should consider using proxies to clean traffic for certain
  1142. protocols as it leaves the network. For example, much abusive HTTP
  1143. behavior (such as exploiting buffer overflows or well-known script
  1144. vulnerabilities) can be detected in a straightforward manner.
  1145. Similarly, one could run automatic spam filtering software (such as
  1146. SpamAssassin) on email exiting the OR network.
  1147. ORs may also rewrite exiting traffic to append
  1148. headers or other information indicating that the traffic has passed
  1149. through an anonymity service. This approach is commonly used
  1150. by email-only anonymity systems. ORs can also
  1151. run on servers with hostnames like {\tt anonymous} to further
  1152. alert abuse targets to the nature of the anonymous traffic.
  1153. A mixture of open and restricted exit nodes allows the most
  1154. flexibility for volunteers running servers. But while having many
  1155. middleman nodes provides a large and robust network,
  1156. having only a few exit nodes reduces the number of points
  1157. an adversary needs to monitor for traffic analysis, and places a
  1158. greater burden on the exit nodes. This tension can be seen in the
  1159. Java Anon Proxy
  1160. cascade model, wherein only one node in each cascade needs to handle
  1161. abuse complaints---but an adversary only needs to observe the entry
  1162. and exit of a cascade to perform traffic analysis on all that
  1163. cascade's users. The hydra model (many entries, few exits) presents a
  1164. different compromise: only a few exit nodes are needed, but an
  1165. adversary needs to work harder to watch all the clients; see
  1166. Section~\ref{sec:conclusion}.
  1167. Finally, we note that exit abuse must not be dismissed as a peripheral
  1168. issue: when a system's public image suffers, it can reduce the number
  1169. and diversity of that system's users, and thereby reduce the anonymity
  1170. of the system itself. Like usability, public perception is a
  1171. security parameter. Sadly, preventing abuse of open exit nodes is an
  1172. unsolved problem, and will probably remain an arms race for the
  1173. foreseeable future. The abuse problems faced by Princeton's CoDeeN
  1174. project~\cite{darkside} give us a glimpse of likely issues.
  1175. \subsection{Directory Servers}
  1176. \label{subsec:dirservers}
  1177. First-generation Onion Routing designs~\cite{freedom2-arch,or-jsac98} used
  1178. in-band network status updates: each router flooded a signed statement
  1179. to its neighbors, which propagated it onward. But anonymizing networks
  1180. have different security goals than typical link-state routing protocols.
  1181. For example, delays (accidental or intentional)
  1182. that can cause different parts of the network to have different views
  1183. of link-state and topology are not only inconvenient: they give
  1184. attackers an opportunity to exploit differences in client knowledge.
  1185. We also worry about attacks to deceive a
  1186. client about the router membership list, topology, or current network
  1187. state. Such \emph{partitioning attacks} on client knowledge help an
  1188. adversary to efficiently deploy resources
  1189. against a target~\cite{minion-design}.
  1190. Tor uses a small group of redundant, well-known onion routers to
  1191. track changes in network topology and node state, including keys and
  1192. exit policies. Each such \emph{directory server} acts as an HTTP
  1193. server, so clients can fetch current network state
  1194. and router lists, and so other ORs can upload
  1195. state information. Onion routers periodically publish signed
  1196. statements of their state to each directory server. The directory servers
  1197. combine this information with their own views of network liveness,
  1198. and generate a signed description (a \emph{directory}) of the entire
  1199. network state. Client software is
  1200. pre-loaded with a list of the directory servers and their keys,
  1201. to bootstrap each client's view of the network.
  1202. % XXX this means that clients will be forced to upgrade as the
  1203. % XXX dirservers change or get compromised. argue that this is ok.
  1204. When a directory server receives a signed statement for an OR, it
  1205. checks whether the OR's identity key is recognized. Directory
  1206. servers do not advertise unrecognized ORs---if they did,
  1207. an adversary could take over the network by creating many
  1208. servers~\cite{sybil}. Instead, new nodes must be approved by the
  1209. directory
  1210. server administrator before they are included. Mechanisms for automated
  1211. node approval are an area of active research, and are discussed more
  1212. in Section~\ref{sec:maintaining-anonymity}.
  1213. Of course, a variety of attacks remain. An adversary who controls
  1214. a directory server can track clients by providing them different
  1215. information---perhaps by listing only nodes under its control, or by
  1216. informing only certain clients about a given node. Even an external
  1217. adversary can exploit differences in client knowledge: clients who use
  1218. a node listed on one directory server but not the others are vulnerable.
  1219. Thus these directory servers must be synchronized and redundant, so
  1220. that they can agree on a common directory. Clients should only trust
  1221. this directory if it is signed by a threshold of the directory
  1222. servers.
  1223. The directory servers in Tor are modeled after those in
  1224. Mixminion~\cite{minion-design}, but our situation is easier. First,
  1225. we make the
  1226. simplifying assumption that all participants agree on the set of
  1227. directory servers. Second, while Mixminion needs to predict node
  1228. behavior, Tor only needs a threshold consensus of the current
  1229. state of the network. Third, we assume that we can fall back to the
  1230. human administrators to discover and resolve problems when a consensus
  1231. directory cannot be reached. Since there are relatively few directory
  1232. servers (currently 3, but we expect as many as 9 as the network scales),
  1233. we can afford operations like broadcast to simplify the consensus-building
  1234. protocol.
  1235. To avoid attacks where a router connects to all the directory servers
  1236. but refuses to relay traffic from other routers, the directory servers
  1237. must also build circuits and use them to anonymously test router
  1238. reliability~\cite{mix-acc}. Unfortunately, this defense is not yet
  1239. designed or
  1240. implemented.
  1241. Using directory servers is simpler and more flexible than flooding.
  1242. Flooding is expensive, and complicates the analysis when we
  1243. start experimenting with non-clique network topologies. Signed
  1244. directories can be cached by other
  1245. onion routers,
  1246. so directory servers are not a performance
  1247. bottleneck when we have many users, and do not aid traffic analysis by
  1248. forcing clients to announce their existence to any
  1249. central point.
  1250. \section{Attacks and Defenses}
  1251. \label{sec:attacks}
  1252. Below we summarize a variety of attacks, and discuss how well our
  1253. design withstands them.\\
  1254. \noindent{\large\bf Passive attacks}\\
  1255. \emph{Observing user traffic patterns.} Observing a user's connection
  1256. will not reveal her destination or data, but it will
  1257. reveal traffic patterns (both sent and received). Profiling via user
  1258. connection patterns requires further processing, because multiple
  1259. application streams may be operating simultaneously or in series over
  1260. a single circuit.
  1261. \emph{Observing user content.} While content at the user end is encrypted,
  1262. connections to responders may not be (indeed, the responding website
  1263. itself may be hostile). While filtering content is not a primary goal
  1264. of Onion Routing, Tor can directly use Privoxy and related
  1265. filtering services to anonymize application data streams.
  1266. \emph{Option distinguishability.} We allow clients to choose
  1267. configuration options. For example, clients concerned about request
  1268. linkability should rotate circuits more often than those concerned
  1269. about traceability. Allowing choice may attract users with different
  1270. %There is economic incentive to attract users by
  1271. %allowing this choice;
  1272. needs; but clients who are
  1273. in the minority may lose more anonymity by appearing distinct than they
  1274. gain by optimizing their behavior~\cite{econymics}.
  1275. \emph{End-to-end timing correlation.} Tor only minimally hides
  1276. such correlations. An attacker watching patterns of
  1277. traffic at the initiator and the responder will be
  1278. able to confirm the correspondence with high probability. The
  1279. greatest protection currently available against such confirmation is to hide
  1280. the connection between the onion proxy and the first Tor node,
  1281. by running the OP on the Tor node or behind a firewall. This approach
  1282. requires an observer to separate traffic originating at the onion
  1283. router from traffic passing through it: a global observer can do this,
  1284. but it might be beyond a limited observer's capabilities.
  1285. \emph{End-to-end size correlation.} Simple packet counting
  1286. will also be effective in confirming
  1287. endpoints of a stream. However, even without padding, we may have some
  1288. limited protection: the leaky pipe topology means different numbers
  1289. of packets may enter one end of a circuit than exit at the other.
  1290. \emph{Website fingerprinting.} All the effective passive
  1291. attacks above are traffic confirmation attacks,
  1292. which puts them outside our design goals. There is also
  1293. a passive traffic analysis attack that is potentially effective.
  1294. Rather than searching exit connections for timing and volume
  1295. correlations, the adversary may build up a database of
  1296. ``fingerprints'' containing file sizes and access patterns for
  1297. targeted websites. He can later confirm a user's connection to a given
  1298. site simply by consulting the database. This attack has
  1299. been shown to be effective against SafeWeb~\cite{hintz-pet02}.
  1300. It may be less effective against Tor, since
  1301. streams are multiplexed within the same circuit, and
  1302. fingerprinting will be limited to
  1303. the granularity of cells (currently 512 bytes). Additional
  1304. defenses could include
  1305. larger cell sizes, padding schemes to group websites
  1306. into large sets, and link
  1307. padding or long-range dummies.\footnote{Note that this fingerprinting
  1308. attack should not be confused with the much more complicated latency
  1309. attacks of~\cite{back01}, which require a fingerprint of the latencies
  1310. of all circuits through the network, combined with those from the
  1311. network edges to the target user and the responder website.}\\
  1312. \noindent{\large\bf Active attacks}\\
  1313. \emph{Compromise keys.} An attacker who learns the TLS session key can
  1314. see control cells and encrypted relay cells on every circuit on that
  1315. connection; learning a circuit
  1316. session key lets him unwrap one layer of the encryption. An attacker
  1317. who learns an OR's TLS private key can impersonate that OR for the TLS
  1318. key's lifetime, but he must
  1319. also learn the onion key to decrypt \emph{create} cells (and because of
  1320. perfect forward secrecy, he cannot hijack already established circuits
  1321. without also compromising their session keys). Periodic key rotation
  1322. limits the window of opportunity for these attacks. On the other hand,
  1323. an attacker who learns a node's identity key can replace that node
  1324. indefinitely by sending new forged descriptors to the directory servers.
  1325. \emph{Iterated compromise.} A roving adversary who can
  1326. compromise ORs (by system intrusion, legal coercion, or extralegal
  1327. coercion) could march down the circuit compromising the
  1328. nodes until he reaches the end. Unless the adversary can complete
  1329. this attack within the lifetime of the circuit, however, the ORs
  1330. will have discarded the necessary information before the attack can
  1331. be completed. (Thanks to the perfect forward secrecy of session
  1332. keys, the attacker cannot force nodes to decrypt recorded
  1333. traffic once the circuits have been closed.) Additionally, building
  1334. circuits that cross jurisdictions can make legal coercion
  1335. harder---this phenomenon is commonly called ``jurisdictional
  1336. arbitrage.'' The Java Anon Proxy project recently experienced the
  1337. need for this approach, when
  1338. a German court forced them to add a backdoor to
  1339. their nodes~\cite{jap-backdoor}.
  1340. \emph{Run a recipient.} An adversary running a webserver
  1341. trivially learns the timing patterns of users connecting to it, and
  1342. can introduce arbitrary patterns in its responses.
  1343. End-to-end attacks become easier: if the adversary can induce
  1344. users to connect to his webserver (perhaps by advertising
  1345. content targeted to those users), he now holds one end of their
  1346. connection. There is also a danger that application
  1347. protocols and associated programs can be induced to reveal information
  1348. about the initiator. Tor depends on Privoxy and similar protocol cleaners
  1349. to solve this latter problem.
  1350. \emph{Run an onion proxy.} It is expected that end users will
  1351. nearly always run their own local onion proxy. However, in some
  1352. settings, it may be necessary for the proxy to run
  1353. remotely---typically, in institutions that want
  1354. to monitor the activity of those connecting to the proxy.
  1355. Compromising an onion proxy compromises all future connections
  1356. through it.
  1357. \emph{DoS non-observed nodes.} An observer who can only watch some
  1358. of the Tor network can increase the value of this traffic
  1359. by attacking non-observed nodes to shut them down, reduce
  1360. their reliability, or persuade users that they are not trustworthy.
  1361. The best defense here is robustness.
  1362. \emph{Run a hostile OR.} In addition to being a local observer,
  1363. an isolated hostile node can create circuits through itself, or alter
  1364. traffic patterns to affect traffic at other nodes. Nonetheless, a hostile
  1365. node must be immediately adjacent to both endpoints to compromise the
  1366. anonymity of a circuit. If an adversary can
  1367. run multiple ORs, and can persuade the directory servers
  1368. that those ORs are trustworthy and independent, then occasionally
  1369. some user will choose one of those ORs for the start and another
  1370. as the end of a circuit. If an adversary
  1371. controls $m>1$ of $N$ nodes, he can correlate at most
  1372. $\left(\frac{m}{N}\right)^2$ of the traffic---although an
  1373. adversary
  1374. could still attract a disproportionately large amount of traffic
  1375. by running an OR with a permissive exit policy, or by
  1376. degrading the reliability of other routers.
  1377. \emph{Introduce timing into messages.} This is simply a stronger
  1378. version of passive timing attacks already discussed earlier.
  1379. \emph{Tagging attacks.} A hostile node could ``tag'' a
  1380. cell by altering it. If the
  1381. stream were, for example, an unencrypted request to a Web site,
  1382. the garbled content coming out at the appropriate time would confirm
  1383. the association. However, integrity checks on cells prevent
  1384. this attack.
  1385. \emph{Replace contents of unauthenticated protocols.} When
  1386. relaying an unauthenticated protocol like HTTP, a hostile exit node
  1387. can impersonate the target server. Clients
  1388. should prefer protocols with end-to-end authentication.
  1389. \emph{Replay attacks.} Some anonymity protocols are vulnerable
  1390. to replay attacks. Tor is not; replaying one side of a handshake
  1391. will result in a different negotiated session key, and so the rest
  1392. of the recorded session can't be used.
  1393. \emph{Smear attacks.} An attacker could use the Tor network for
  1394. socially disapproved acts, to bring the
  1395. network into disrepute and get its operators to shut it down.
  1396. Exit policies reduce the possibilities for abuse, but
  1397. ultimately the network requires volunteers who can tolerate
  1398. some political heat.
  1399. \emph{Distribute hostile code.} An attacker could trick users
  1400. into running subverted Tor software that did not, in fact, anonymize
  1401. their connections---or worse, could trick ORs into running weakened
  1402. software that provided users with less anonymity. We address this
  1403. problem (but do not solve it completely) by signing all Tor releases
  1404. with an official public key, and including an entry in the directory
  1405. that lists which versions are currently believed to be secure. To
  1406. prevent an attacker from subverting the official release itself
  1407. (through threats, bribery, or insider attacks), we provide all
  1408. releases in source code form, encourage source audits, and
  1409. frequently warn our users never to trust any software (even from
  1410. us) that comes without source.\\
  1411. \noindent{\large\bf Directory attacks}\\
  1412. \emph{Destroy directory servers.} If a few directory
  1413. servers disappear, the others still decide on a valid
  1414. directory. So long as any directory servers remain in operation,
  1415. they will still broadcast their views of the network and generate a
  1416. consensus directory. (If more than half are destroyed, this
  1417. directory will not, however, have enough signatures for clients to
  1418. use it automatically; human intervention will be necessary for
  1419. clients to decide whether to trust the resulting directory.)
  1420. \emph{Subvert a directory server.} By taking over a directory server,
  1421. an attacker can partially influence the final directory. Since ORs
  1422. are included or excluded by majority vote, the corrupt directory can
  1423. at worst cast a tie-breaking vote to decide whether to include
  1424. marginal ORs. It remains to be seen how often such marginal cases
  1425. occur in practice.
  1426. \emph{Subvert a majority of directory servers.} An adversary who controls
  1427. more than half the directory servers can include as many compromised
  1428. ORs in the final directory as he wishes. We must ensure that directory
  1429. server operators are independent and attack-resistant.
  1430. \emph{Encourage directory server dissent.} The directory
  1431. agreement protocol assumes that directory server operators agree on
  1432. the set of directory servers. An adversary who can persuade some
  1433. of the directory server operators to distrust one another could
  1434. split the quorum into mutually hostile camps, thus partitioning
  1435. users based on which directory they use. Tor does not address
  1436. this attack.
  1437. \emph{Trick the directory servers into listing a hostile OR.}
  1438. Our threat model explicitly assumes directory server operators will
  1439. be able to filter out most hostile ORs.
  1440. % If this is not true, an
  1441. % attacker can flood the directory with compromised servers.
  1442. \emph{Convince the directories that a malfunctioning OR is
  1443. working.} In the current Tor implementation, directory servers
  1444. assume that an OR is running correctly if they can start a TLS
  1445. connection to it. A hostile OR could easily subvert this test by
  1446. accepting TLS connections from ORs but ignoring all cells. Directory
  1447. servers must actively test ORs by building circuits and streams as
  1448. appropriate. The tradeoffs of a similar approach are discussed
  1449. in~\cite{mix-acc}.\\
  1450. \noindent{\large\bf Attacks against rendezvous points}\\
  1451. \emph{Make many introduction requests.} An attacker could
  1452. try to deny Bob service by flooding his introduction points with
  1453. requests. Because the introduction points can block requests that
  1454. lack authorization tokens, however, Bob can restrict the volume of
  1455. requests he receives, or require a certain amount of computation for
  1456. every request he receives.
  1457. \emph{Attack an introduction point.} An attacker could
  1458. disrupt a location-hidden service by disabling its introduction
  1459. points. But because a service's identity is attached to its public
  1460. key, the service can simply re-advertise
  1461. itself at a different introduction point. Advertisements can also be
  1462. done secretly so that only high-priority clients know the address of
  1463. Bob's introduction points or so that different clients know of different
  1464. introduction points. This forces the attacker to disable all possible
  1465. introduction points.
  1466. \emph{Compromise an introduction point.} An attacker who controls
  1467. Bob's introduction point can flood Bob with
  1468. introduction requests, or prevent valid introduction requests from
  1469. reaching him. Bob can notice a flood, and close the circuit. To notice
  1470. blocking of valid requests, however, he should periodically test the
  1471. introduction point by sending rendezvous requests and making
  1472. sure he receives them.
  1473. \emph{Compromise a rendezvous point.} A rendezvous
  1474. point is no more sensitive than any other OR on
  1475. a circuit, since all data passing through the rendezvous is encrypted
  1476. with a session key shared by Alice and Bob.
  1477. \section{Early experiences: Tor in the Wild}
  1478. \label{sec:in-the-wild}
  1479. As of mid-May 2004, the Tor network consists of 32 nodes
  1480. (24 in the US, 8 in Europe), and more are joining each week as the code
  1481. matures. (For comparison, the current remailer network
  1482. has about 40 nodes.) % We haven't asked PlanetLab to provide
  1483. %Tor nodes, since their AUP wouldn't allow exit nodes (see
  1484. %also~\cite{darkside}) and because we aim to build a long-term community of
  1485. %node operators and developers.}
  1486. Each node has at least a 768Kb/768Kb connection, and
  1487. many have 10Mb. The number of users varies (and of course, it's hard to
  1488. tell for sure), but we sometimes have several hundred users---administrators at
  1489. several companies have begun sending their entire departments' web
  1490. traffic through Tor, to block other divisions of
  1491. their company from reading their traffic. Tor users have reported using
  1492. the network for web browsing, FTP, IRC, AIM, Kazaa, SSH, and
  1493. recipient-anonymous email via rendezvous points. One user has anonymously
  1494. set up a Wiki as a hidden service, where other users anonymously publish
  1495. the addresses of their hidden services.
  1496. Each Tor node currently processes roughly 800,000 relay
  1497. cells (a bit under half a gigabyte) per week. On average, about 80\%
  1498. of each 498-byte payload is full for cells going back to the client,
  1499. whereas about 40\% is full for cells coming from the client. (The difference
  1500. arises because most of the network's traffic is web browsing.) Interactive
  1501. traffic like SSH brings down the average a lot---once we have more
  1502. experience, and assuming we can resolve the anonymity issues, we may
  1503. partition traffic into two relay cell sizes: one to handle
  1504. bulk traffic and one for interactive traffic.
  1505. Based in part on our restrictive default exit policy (we
  1506. reject SMTP requests) and our low profile, we have had no abuse
  1507. issues since the network was deployed in October
  1508. 2003. Our slow growth rate gives us time to add features,
  1509. resolve bugs, and get a feel for what users actually want from an
  1510. anonymity system. Even though having more users would bolster our
  1511. anonymity sets, we are not eager to attract the Kazaa or warez
  1512. communities---we feel that we must build a reputation for privacy, human
  1513. rights, research, and other socially laudable activities.
  1514. As for performance, profiling shows that Tor spends almost
  1515. all its CPU time in AES, which is fast. Current latency is attributable
  1516. to two factors. First, network latency is critical: we are
  1517. intentionally bouncing traffic around the world several times. Second,
  1518. our end-to-end congestion control algorithm focuses on protecting
  1519. volunteer servers from accidental DoS rather than on optimizing
  1520. performance. % Right now the first $500 \times 500\mbox{B}=250\mbox{KB}$
  1521. %of the stream arrives
  1522. %quickly, and after that throughput depends on the rate that \emph{relay
  1523. %sendme} acknowledgments arrive.
  1524. To quantify these effects, we did some informal tests using a network of 4
  1525. nodes on the same machine (a heavily loaded 1GHz Athlon). We downloaded a 60
  1526. megabyte file from {\tt debian.org} every 30 minutes for 54 hours (108 sample
  1527. points). It arrived in about 300 seconds on average, compared to 210s for a
  1528. direct download. We ran a similar test on the production Tor network,
  1529. fetching the front page of {\tt cnn.com} (55 kilobytes):
  1530. % every 20 seconds for 8952 data points
  1531. while a direct
  1532. download consistently took about 0.3s, the performance through Tor varied.
  1533. Some downloads were as fast as 0.4s, with a median at 2.8s, and
  1534. 90\% finishing within 5.3s. It seems that as the network expands, the chance
  1535. of building a slow circuit (one that includes a slow or heavily loaded node
  1536. or link) is increasing. On the other hand, as our users remain satisfied
  1537. with this increased latency, we can address our performance incrementally as we
  1538. proceed with development. %\footnote{For example, we have just begun pushing
  1539. %a pipelining patch to the production network that seems to decrease
  1540. %latency for medium-to-large files; we will present revised benchmarks
  1541. %as they become available.}
  1542. %With the current network's topology and load, users can typically get 1-2
  1543. %megabits sustained transfer rate, which is good enough for now.
  1544. %Indeed, the Tor
  1545. %design aims foremost to provide a security research platform; performance
  1546. %only needs to be sufficient to retain users~\cite{econymics,back01}.
  1547. %We can tweak the congestion control
  1548. %parameters to provide faster throughput at the cost of
  1549. %larger buffers at each node; adding the heuristics mentioned in
  1550. %Section~\ref{subsec:rate-limit} to favor low-volume
  1551. %streams may also help. More research remains to find the
  1552. %right balance.
  1553. % We should say _HOW MUCH_ latency there is in these cases. -NM
  1554. %performs badly on lossy networks. may need airhook or something else as
  1555. %transport alternative?
  1556. Although Tor's clique topology and full-visibility directories present
  1557. scaling problems, we still expect the network to support a few hundred
  1558. nodes and maybe 10,000 users before we're forced to become
  1559. more distributed. With luck, the experience we gain running the current
  1560. topology will help us choose among alternatives when the time comes.
  1561. \section{Open Questions in Low-latency Anonymity}
  1562. \label{sec:maintaining-anonymity}
  1563. In addition to the non-goals in
  1564. Section~\ref{subsec:non-goals}, many questions must be solved
  1565. before we can be confident of Tor's security.
  1566. Many of these open issues are questions of balance. For example,
  1567. how often should users rotate to fresh circuits? Frequent rotation
  1568. is inefficient, expensive, and may lead to intersection attacks and
  1569. predecessor attacks~\cite{wright03}, but infrequent rotation makes the
  1570. user's traffic linkable. Besides opening fresh circuits, clients can
  1571. also exit from the middle of the circuit,
  1572. or truncate and re-extend the circuit. More analysis is
  1573. needed to determine the proper tradeoff.
  1574. %% Duplicated by 'Better directory distribution' in section 9.
  1575. %
  1576. %A similar question surrounds timing of directory operations: how often
  1577. %should directories be updated? Clients that update infrequently receive
  1578. %an inaccurate picture of the network, but frequent updates can overload
  1579. %the directory servers. More generally, we must find more
  1580. %decentralized yet practical ways to distribute up-to-date snapshots of
  1581. %network status without introducing new attacks.
  1582. How should we choose path lengths? If Alice always uses two hops,
  1583. then both ORs can be certain that by colluding they will learn about
  1584. Alice and Bob. In our current approach, Alice always chooses at least
  1585. three nodes unrelated to herself and her destination.
  1586. %% This point is subtle, but not IMO necessary. Anybody who thinks
  1587. %% about it will see that it's implied by the above sentence; anybody
  1588. %% who doesn't think about it is safe in his ignorance.
  1589. %
  1590. %Thus normally she chooses
  1591. %three nodes, but if she is running an OR and her destination is on an OR,
  1592. %she uses five.
  1593. Should Alice choose a random path length (e.g.~from a geometric
  1594. distribution) to foil an attacker who
  1595. uses timing to learn that he is the fifth hop and thus concludes that
  1596. both Alice and the responder are running ORs?
  1597. Throughout this paper, we have assumed that end-to-end traffic
  1598. confirmation will immediately and automatically defeat a low-latency
  1599. anonymity system. Even high-latency anonymity systems can be
  1600. vulnerable to end-to-end traffic confirmation, if the traffic volumes
  1601. are high enough, and if users' habits are sufficiently
  1602. distinct~\cite{statistical-disclosure,limits-open}. Can anything be
  1603. done to
  1604. make low-latency systems resist these attacks as well as high-latency
  1605. systems? Tor already makes some effort to conceal the starts and ends of
  1606. streams by wrapping long-range control commands in identical-looking
  1607. relay cells. Link padding could frustrate passive observers who count
  1608. packets; long-range padding could work against observers who own the
  1609. first hop in a circuit. But more research remains to find an efficient
  1610. and practical approach. Volunteers prefer not to run constant-bandwidth
  1611. padding; but no convincing traffic shaping approach has been
  1612. specified. Recent work on long-range padding~\cite{defensive-dropping}
  1613. shows promise. One could also try to reduce correlation in packet timing
  1614. by batching and re-ordering packets, but it is unclear whether this could
  1615. improve anonymity without introducing so much latency as to render the
  1616. network unusable.
  1617. A cascade topology may better defend against traffic confirmation by
  1618. aggregating users, and making padding and
  1619. mixing more affordable. Does the hydra topology (many input nodes,
  1620. few output nodes) work better against some adversaries? Are we going
  1621. to get a hydra anyway because most nodes will be middleman nodes?
  1622. Common wisdom suggests that Alice should run her own OR for best
  1623. anonymity, because traffic coming from her node could plausibly have
  1624. come from elsewhere. How much mixing does this approach need? Is it
  1625. immediately beneficial because of real-world adversaries that can't
  1626. observe Alice's router, but can run routers of their own?
  1627. To scale to many users, and to prevent an attacker from observing the
  1628. whole network, it may be necessary
  1629. to support far more servers than Tor currently anticipates.
  1630. This introduces several issues. First, if approval by a central set
  1631. of directory servers is no longer feasible, what mechanism should be used
  1632. to prevent adversaries from signing up many colluding servers? Second,
  1633. if clients can no longer have a complete picture of the network,
  1634. how can they perform discovery while preventing attackers from
  1635. manipulating or exploiting gaps in their knowledge? Third, if there
  1636. are too many servers for every server to constantly communicate with
  1637. every other, which non-clique topology should the network use?
  1638. (Restricted-route topologies promise comparable anonymity with better
  1639. scalability~\cite{danezis-pets03}, but whatever topology we choose, we
  1640. need some way to keep attackers from manipulating their position within
  1641. it~\cite{casc-rep}.) Fourth, if no central authority is tracking
  1642. server reliability, how do we stop unreliable servers from making
  1643. the network unusable? Fifth, do clients receive so much anonymity
  1644. from running their own ORs that we should expect them all to do
  1645. so~\cite{econymics}, or do we need another incentive structure to
  1646. motivate them? Tarzan and MorphMix present possible solutions.
  1647. % advogato, captcha
  1648. When a Tor node goes down, all its circuits (and thus streams) must break.
  1649. Will users abandon the system because of this brittleness? How well
  1650. does the method in Section~\ref{subsec:dos} allow streams to survive
  1651. node failure? If affected users rebuild circuits immediately, how much
  1652. anonymity is lost? It seems the problem is even worse in a peer-to-peer
  1653. environment---such systems don't yet provide an incentive for peers to
  1654. stay connected when they're done retrieving content, so we would expect
  1655. a higher churn rate.
  1656. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1657. \section{Future Directions}
  1658. \label{sec:conclusion}
  1659. Tor brings together many innovations into a unified deployable system. The
  1660. next immediate steps include:
  1661. \emph{Scalability:} Tor's emphasis on deployability and design simplicity
  1662. has led us to adopt a clique topology, semi-centralized
  1663. directories, and a full-network-visibility model for client
  1664. knowledge. These properties will not scale past a few hundred servers.
  1665. Section~\ref{sec:maintaining-anonymity} describes some promising
  1666. approaches, but more deployment experience will be helpful in learning
  1667. the relative importance of these bottlenecks.
  1668. \emph{Bandwidth classes:} This paper assumes that all ORs have
  1669. good bandwidth and latency. We should instead adopt the MorphMix model,
  1670. where nodes advertise their bandwidth level (DSL, T1, T3), and
  1671. Alice avoids bottlenecks by choosing nodes that match or
  1672. exceed her bandwidth. In this way DSL users can usefully join the Tor
  1673. network.
  1674. \emph{Incentives:} Volunteers who run nodes are rewarded with publicity
  1675. and possibly better anonymity~\cite{econymics}. More nodes means increased
  1676. scalability, and more users can mean more anonymity. We need to continue
  1677. examining the incentive structures for participating in Tor. Further,
  1678. we need to explore more approaches to limiting abuse, and understand
  1679. why most people don't bother using privacy systems.
  1680. \emph{Cover traffic:} Currently Tor omits cover traffic---its costs
  1681. in performance and bandwidth are clear but its security benefits are
  1682. not well understood. We must pursue more research on link-level cover
  1683. traffic and long-range cover traffic to determine whether some simple padding
  1684. method offers provable protection against our chosen adversary.
  1685. %%\emph{Offer two relay cell sizes:} Traffic on the Internet tends to be
  1686. %%large for bulk transfers and small for interactive traffic. One cell
  1687. %%size cannot be optimal for both types of traffic.
  1688. % This should go in the spec and todo, but not the paper yet. -RD
  1689. \emph{Caching at exit nodes:} Perhaps each exit node should run a
  1690. caching web proxy~\cite{shsm03}, to improve anonymity for cached pages
  1691. (Alice's request never
  1692. leaves the Tor network), to improve speed, and to reduce bandwidth cost.
  1693. On the other hand, forward security is weakened because caches
  1694. constitute a record of retrieved files. We must find the right
  1695. balance between usability and security.
  1696. \emph{Better directory distribution:}
  1697. Clients currently download a description of
  1698. the entire network every 15 minutes. As the state grows larger
  1699. and clients more numerous, we may need a solution in which
  1700. clients receive incremental updates to directory state.
  1701. More generally, we must find more
  1702. scalable yet practical ways to distribute up-to-date snapshots of
  1703. network status without introducing new attacks.
  1704. \emph{Further specification review:} Our public
  1705. byte-level specification~\cite{tor-spec} needs
  1706. external review. We hope that as Tor
  1707. is deployed, more people will examine its
  1708. specification.
  1709. \emph{Multisystem interoperability:} We are currently working with the
  1710. designer of MorphMix to unify the specification and implementation of
  1711. the common elements of our two systems. So far, this seems
  1712. to be relatively straightforward. Interoperability will allow testing
  1713. and direct comparison of the two designs for trust and scalability.
  1714. \emph{Wider-scale deployment:} The original goal of Tor was to
  1715. gain experience in deploying an anonymizing overlay network, and
  1716. learn from having actual users. We are now at a point in design
  1717. and development where we can start deploying a wider network. Once
  1718. we have many actual users, we will doubtlessly be better
  1719. able to evaluate some of our design decisions, including our
  1720. robustness/latency tradeoffs, our performance tradeoffs (including
  1721. cell size), our abuse-prevention mechanisms, and
  1722. our overall usability.
  1723. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1724. %% commented out for anonymous submission
  1725. \section*{Acknowledgments}
  1726. We thank Peter Palfrader, Geoff Goodell, Adam Shostack, Joseph Sokol-Margolis,
  1727. John Bashinski, and Zack Brown
  1728. for editing and comments;
  1729. Matej Pfajfar, Andrei Serjantov, Marc Rennhard for design discussions;
  1730. Bram Cohen for congestion control discussions;
  1731. Adam Back for suggesting telescoping circuits; and
  1732. Cathy Meadows for formal analysis of the \emph{extend} protocol.
  1733. This work has been supported by ONR and DARPA.
  1734. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1735. \bibliographystyle{latex8}
  1736. \bibliography{tor-design}
  1737. \end{document}
  1738. % Style guide:
  1739. % U.S. spelling
  1740. % avoid contractions (it's, can't, etc.)
  1741. % prefer ``for example'' or ``such as'' to e.g.
  1742. % prefer ``that is'' to i.e.
  1743. % 'mix', 'mixes' (as noun)
  1744. % 'mix-net'
  1745. % 'mix', 'mixing' (as verb)
  1746. % 'middleman' [Not with a hyphen; the hyphen has been optional
  1747. % since Middle English.]
  1748. % 'nymserver'
  1749. % 'Cypherpunk', 'Cypherpunks', 'Cypherpunk remailer'
  1750. % 'Onion Routing design', 'onion router' [note capitalization]
  1751. % 'SOCKS'
  1752. % Try not to use \cite as a noun.
  1753. % 'Authorizating' sounds great, but it isn't a word.
  1754. % 'First, second, third', not 'Firstly, secondly, thirdly'.
  1755. % 'circuit', not 'channel'
  1756. % Typography: no space on either side of an em dash---ever.
  1757. % Hyphens are for multi-part words; en dashs imply movement or
  1758. % opposition (The Alice--Bob connection); and em dashes are
  1759. % for punctuation---like that.
  1760. % A relay cell; a control cell; a \emph{create} cell; a
  1761. % \emph{relay truncated} cell. Never ``a \emph{relay truncated}.''
  1762. %
  1763. % 'Substitute ``Damn'' every time you're inclined to write ``very;'' your
  1764. % editor will delete it and the writing will be just as it should be.'
  1765. % -- Mark Twain