tor-design.tex 97 KB

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