tor-design.tex 100 KB

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