tor-design.tex 97 KB

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