tor-design.tex 100 KB

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