tor-design.tex 108 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118
  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. % If an URL ends up with '%'s in it, that's because the line *in the .bib/.tex
  11. % file* is too long, so break it there (it doesn't matter if the next line is
  12. % indented with spaces). -DH
  13. %\newif\ifpdf
  14. %\ifx\pdfoutput\undefined
  15. % \pdffalse
  16. %\else
  17. % \pdfoutput=1
  18. % \pdftrue
  19. %\fi
  20. \newenvironment{tightlist}{\begin{list}{$\bullet$}{
  21. \setlength{\itemsep}{0mm}
  22. \setlength{\parsep}{0mm}
  23. % \setlength{\labelsep}{0mm}
  24. % \setlength{\labelwidth}{0mm}
  25. % \setlength{\topsep}{0mm}
  26. }}{\end{list}}
  27. \begin{document}
  28. %% Use dvipdfm instead. --DH
  29. %\ifpdf
  30. % \pdfcompresslevel=9
  31. % \pdfpagewidth=\the\paperwidth
  32. % \pdfpageheight=\the\paperheight
  33. %\fi
  34. \title{Tor: Design of a Second-Generation Onion Router}
  35. %\author{Roger Dingledine \\ The Free Haven Project \\ arma@freehaven.net \and
  36. %Nick Mathewson \\ The Free Haven Project \\ nickm@freehaven.net \and
  37. %Paul Syverson \\ Naval Research Lab \\ syverson@itd.nrl.navy.mil}
  38. \maketitle
  39. \thispagestyle{empty}
  40. \begin{abstract}
  41. We present Tor, a circuit-based low-latency anonymous communication
  42. system. Tor is the successor to Onion Routing
  43. and addresses many limitations in the original Onion Routing design.
  44. Tor works in a real-world Internet environment,
  45. % it's user-space too
  46. requires little synchronization or coordination between nodes, and
  47. provides a reasonable tradeoff between anonymity and usability/efficiency
  48. %protects against known anonymity-breaking attacks as well
  49. %as or better than other systems with similar design parameters.
  50. % and we present a big list of open problems at the end
  51. % and we present a new practical design for rendezvous points
  52. \end{abstract}
  53. %\begin{center}
  54. %\textbf{Keywords:} anonymity, peer-to-peer, remailer, nymserver, reply block
  55. %\end{center}
  56. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  57. \Section{Overview}
  58. \label{sec:intro}
  59. Onion Routing is a distributed overlay network designed to anonymize
  60. low-latency TCP-based applications such as web browsing, secure shell,
  61. and instant messaging. Clients choose a path through the network and
  62. build a \emph{virtual circuit}, in which each node (or ``onion router'')
  63. in the path knows its
  64. predecessor and successor, but no others. Traffic flowing down the circuit
  65. is sent in fixed-size \emph{cells}, which are unwrapped by a symmetric key
  66. at each node (like the layers of an onion) and relayed downstream. The
  67. original Onion Routing project published several design and analysis
  68. papers
  69. \cite{or-ih96,or-jsac98,or-discex00,or-pet00}. While
  70. a wide area Onion Routing network was deployed for some weeks,
  71. the only long-running and publicly accessible
  72. implementation was a fragile proof-of-concept that ran on a single
  73. machine.
  74. % (which nonetheless processed several tens of thousands of connections
  75. %daily from thousands of global users).
  76. %%Do we really want to say this? It softens our motivation for the paper. -RD
  77. %
  78. % In general, I try to emphasize rather than understate past
  79. % accomplishments so I am giving an accurate comparison,
  80. % which strengthens the claims in the paper. This is true whether
  81. % it is my work or someone else's.
  82. % This is also the only experimental basic viability result we
  83. % can point to for Onion Routing in general at this point. -PS
  84. Many critical design and deployment issues were never resolved,
  85. and the design has not been updated in several years.
  86. Here we describe Tor, a protocol for asynchronous, loosely
  87. federated onion routers that provides the following improvements over
  88. the old Onion Routing design:
  89. \begin{tightlist}
  90. \item \textbf{Perfect forward secrecy:} The original Onion Routing
  91. design was vulnerable to a single hostile node recording traffic and later
  92. compromising successive nodes in the circuit and forcing them to
  93. decrypt it.
  94. Rather than using a single onion to lay each circuit,
  95. Tor now uses an incremental or \emph{telescoping}
  96. path-building design, where the initiator negotiates session keys with
  97. each successive hop in the circuit. Once these keys are deleted,
  98. subsequently compromised nodes cannot decrypt old traffic.
  99. As a side benefit, onion replay detection is no longer
  100. necessary, and the process of building circuits is more reliable, since
  101. the initiator knows when a hop fails and can then try extending to a new node.
  102. % Perhaps mention that not all of these are things that we invented. -NM
  103. \item \textbf{Separation of protocol cleaning from anonymity:}
  104. The original Onion Routing design required a separate ``application
  105. proxy'' for each
  106. supported application protocol---most
  107. of which were never written, so many applications were never supported.
  108. Tor uses the standard and near-ubiquitous SOCKS
  109. \cite{socks4,socks5} proxy interface, allowing us to support most TCP-based
  110. programs without modification. This design change allows Tor to
  111. use the filtering features of privacy-enhancing
  112. application-level proxies such as Privoxy \cite{privoxy} without having to
  113. incorporate those features itself.
  114. \item \textbf{Many TCP streams can share one circuit:} The original
  115. Onion Routing design built a separate circuit for each application-level
  116. request.
  117. This hurt performance by requiring multiple public key operations for
  118. every request, and also presented
  119. a threat to anonymity from building so many different circuits; see
  120. Section~\ref{sec:maintaining-anonymity}.
  121. Tor multiplexes multiple TCP streams along each virtual
  122. circuit, to improve efficiency and anonymity.
  123. \item \textbf{No mixing, padding, or traffic shaping:} The original
  124. Onion Routing design called for batching and reordering the cells arriving
  125. from each circuit and the ability to do padding between onion routers and,
  126. in a later design, between onion
  127. proxies (that is, users) and onion routers \cite{or-ih96,or-jsac98}.
  128. The tradeoff between padding protection and cost was discussed, but no
  129. general padding scheme was suggested. In
  130. \cite{or-pet00} it was theorized \emph{traffic shaping} would generally
  131. be used, but details were not provided.
  132. Recent research \cite{econymics} and deployment
  133. experience \cite{freedom21-security} suggest that this level of resource
  134. use is not practical or economical; and even full link padding is still
  135. vulnerable \cite{defensive-dropping}. Thus, until we have a proven and
  136. convenient design for traffic shaping or low-latency mixing that
  137. will improve anonymity against a realistic adversary, we leave these
  138. strategies out.
  139. \item \textbf{Leaky-pipe circuit topology:} Through in-band
  140. signalling within the
  141. circuit, Tor initiators can direct traffic to nodes partway down the
  142. circuit. This allows for long-range padding to frustrate traffic
  143. shape and volume attacks at the initiator \cite{defensive-dropping}.
  144. Because circuits are used by more than one application, it also
  145. allows traffic to exit the circuit from the middle---thus
  146. frustrating traffic shape and volume attacks based on observing the
  147. end of the circuit.
  148. \item \textbf{Congestion control:} Earlier anonymity designs do not
  149. address traffic bottlenecks. Unfortunately, typical approaches to load
  150. balancing and flow control in overlay networks involve inter-node control
  151. communication and global views of traffic. Tor's decentralized congestion
  152. control uses end-to-end acks to maintain reasonable anonymity while
  153. allowing nodes
  154. at the edges of the network to detect congestion or flooding attacks
  155. and send less data until the congestion subsides.
  156. \item \textbf{Directory servers:} The original Onion Routing design
  157. planned to flood link-state information through the network---an
  158. approach which can be unreliable and
  159. open to partitioning attacks or outright deception. Tor takes a simplified
  160. view towards distributing link-state information. Certain more trusted
  161. onion routers also act as directory servers: they provide signed
  162. \emph{directories} which describe the routers they know about and mark
  163. those that
  164. are currently up. Users periodically download these directories via HTTP.
  165. \item \textbf{End-to-end integrity checking:} The original Onion Routing
  166. design did no integrity checking on data. Any onion router on the circuit
  167. could change the contents of cells as they pass by---for example, to
  168. redirect a
  169. connection on the fly so it connects to a different webserver, or to
  170. tag encrypted traffic and look for the tagged traffic at the network
  171. edges \cite{minion-design}. Tor hampers these attacks by checking data
  172. integrity before it leaves the network.
  173. \item \textbf{Robustness to failed nodes:} A failed node in the old design
  174. meant that circuit-building failed, but thanks to Tor's step-by-step
  175. circuit building, users can notice failed
  176. nodes while building circuits and route around them. Additionally,
  177. liveness information from directories allows users to avoid
  178. unreliable nodes in the first place.
  179. %We further provide a
  180. %simple mechanism that allows connections to be established despite recent
  181. %node failure or slightly dated information from a directory server. Tor
  182. %permits onion routers to have \emph{router twins} --- nodes that share
  183. %the same private decryption key. Note that because connections now have
  184. %perfect forward secrecy, an onion router still cannot read the traffic
  185. %on a connection established through its twin even while that connection
  186. %is active. Also, which nodes are twins can change dynamically depending
  187. %on current circumstances, and twins may or may not be under the same
  188. %administrative authority.
  189. %
  190. %[Commented out; Router twins provide no real increase in robustness
  191. %to failed nodes. If a non-twinned node goes down, the
  192. %circuit-builder notices this and routes around it. Circuit-building
  193. %is offline, so there shouldn't even be a latency hit. -NM]
  194. \item \textbf{Variable exit policies:} Tor provides a consistent
  195. mechanism for
  196. each node to specify and advertise a policy describing the hosts and
  197. ports to which it will connect. These exit policies
  198. are critical in a volunteer-based distributed infrastructure, because
  199. each operator is comfortable with allowing different types of traffic
  200. to exit the Tor network from his node.
  201. \item \textbf{Implementable in user-space:} Unlike other anonymity systems
  202. like Freedom \cite{freedom2-arch}, Tor only attempts to anonymize TCP
  203. streams. Thus it does not require patches to an operating system's network
  204. stack (or built-in support) to operate. Although this approach is less
  205. flexible, it has proven valuable to Tor's portability and deployability.
  206. \item \textbf{Rendezvous points and location-protected servers:}
  207. Tor provides an integrated mechanism for responder anonymity via
  208. location-protected servers. Previous Onion Routing designs included
  209. long-lived ``reply onions'' which could be used to build virtual circuits
  210. to a hidden server, but a reply onion becomes useless if any node in
  211. the path goes down or rotates its keys, and it also does not provide
  212. forward security. In Tor's current design, clients negotiate {\it
  213. rendezvous points} to connect with hidden servers; reply onions are no
  214. longer required.
  215. \end{tightlist}
  216. We have implemented most of the above features. Our source code is
  217. available under a free license, and is not encumbered by patents. We have
  218. recently begun deploying a widespread alpha network to see how well the
  219. design works in practice, to get more experience with usability and users,
  220. and to provide a research platform for experimenting with new ideas.
  221. We review previous work in Section~\ref{sec:related-work}, describe
  222. our goals and assumptions in Section~\ref{sec:assumptions},
  223. and then address the above list of improvements in
  224. Sections~\ref{sec:design}-\ref{sec:rendezvous}. We
  225. summarize in Section \ref{sec:analysis}
  226. how our design stands up to known attacks, and conclude with a list of
  227. open problems.
  228. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  229. \Section{Related work}
  230. \label{sec:related-work}
  231. Modern anonymity designs date to Chaum's Mix-Net\cite{chaum-mix} design of
  232. 1981. Chaum proposed hiding sender-recipient linkability by wrapping
  233. messages in layers of public key cryptography, and relaying them
  234. through a path composed of ``Mixes.'' These mixes in turn decrypt, delay,
  235. and re-order messages, before relaying them along the sender-selected
  236. path towards their destinations.
  237. Subsequent relay-based anonymity designs have diverged in two
  238. principal directions. Some have attempted to maximize anonymity at
  239. the cost of introducing comparatively large and variable latencies,
  240. for example, Babel\cite{babel}, Mixmaster\cite{mixmaster-spec}, and
  241. Mixminion\cite{minion-design}. Because of this
  242. trade-off, these \emph{high-latency} networks are well-suited for anonymous
  243. email, but introduce too much lag for interactive tasks such as web browsing,
  244. internet chat, or SSH connections.
  245. Tor belongs to the second category: \emph{low-latency} designs that attempt
  246. to anonymize interactive network traffic. Because these protocols typically
  247. involve a large number of packets that must be delivered quickly, it is
  248. difficult for them to prevent an attacker who can eavesdrop both ends of the
  249. communication from correlating the timing and volume
  250. of traffic entering the anonymity network with traffic leaving it. These
  251. protocols are also vulnerable against active attacks in which an
  252. adversary introduces timing patterns into traffic entering the network, and
  253. looks
  254. for correlated patterns among exiting traffic.
  255. Although some work has been done to frustrate
  256. these attacks,\footnote{
  257. The most common approach is to pad and limit communication to a constant
  258. rate, or to limit
  259. the variation in traffic shape. Doing so can have prohibitive bandwidth
  260. costs and/or performance limitations.
  261. %One can also use a cascade (fixed
  262. %shared route) with a relatively fixed set of users. This assumes a
  263. %significant degree of agreement and provides an easier target for an active
  264. %attacker since the endpoints are generally known.
  265. } most designs protect primarily against traffic analysis rather than traffic
  266. confirmation \cite{or-jsac98}---that is, they assume that the attacker is
  267. attempting to learn who is talking to whom, not to confirm a prior suspicion
  268. about who is talking to whom.
  269. The simplest low-latency designs are single-hop proxies such as the
  270. Anonymizer \cite{anonymizer}, wherein a single trusted server strips the
  271. data's origin before relaying it. These designs are easy to
  272. analyze, but require end-users to trust the anonymizing proxy.
  273. Concentrating the traffic to a single point increases the anonymity set
  274. (the set of people a given user is hiding among), but it can make traffic
  275. analysis easier: an adversary need only eavesdrop on the proxy to observe
  276. the entire system.
  277. More complex are distributed-trust, circuit-based anonymizing systems. In
  278. these designs, a user establishes one or more medium-term bidirectional
  279. end-to-end tunnels to exit servers, and uses those tunnels to deliver
  280. low-latency packets to and from one or more destinations per
  281. tunnel. %XXX reword
  282. Establishing tunnels is expensive and typically
  283. requires public-key cryptography, whereas relaying packets along a tunnel is
  284. comparatively inexpensive. Because a tunnel crosses several servers, no
  285. single server can link a user to her communication partners.
  286. In some distributed-trust systems, such as the Java Anon Proxy (also known
  287. as JAP or Web MIXes), users build their tunnels along a fixed shared route
  288. or \emph{cascade}. As with a single-hop proxy, this approach aggregates
  289. users into larger anonymity sets, but again an attacker only needs to
  290. observe both ends of the cascade to bridge all the system's traffic.
  291. The Java Anon Proxy's design seeks to prevent this by padding
  292. between end users and the head of the cascade \cite{web-mix}. However, the
  293. current implementation does no padding and thus remains vulnerable
  294. to both active and passive bridging.
  295. %XXX fix, yes it does, sort of.
  296. %XXX do a paragraph on p2p vs client-server
  297. \cite{tarzan:ccs02}
  298. \cite{morphmix:fc04}
  299. Systems such as Freedom and the original Onion Routing
  300. build the anonymous channel all at once, using a layered ``onion'' of
  301. public-key encrypted messages, each layer of which provides a set of session
  302. keys and the address of the next server in the channel. Tor as described
  303. herein, Tarzan, Morphmix, Cebolla \cite{cebolla}, and AnonNet
  304. \cite{anonnet} build the
  305. channel in stages, extending it one hop at a time. This approach
  306. makes perfect forward secrecy feasible.
  307. Distributed-trust anonymizing systems differ in how they prevent attackers
  308. from controlling too many servers and thus compromising too many user paths.
  309. Some protocols rely on a centrally maintained set of well-known anonymizing
  310. servers. The current Tor design falls into this category.
  311. Others (such as Tarzan and MorphMix) allow unknown users to run
  312. servers, while using a limited resource (DHT space for Tarzan; IP space for
  313. MorphMix) to prevent an attacker from owning too much of the network.
  314. Crowds uses a centralized ``blender'' to enforce Crowd membership
  315. policy. For small crowds it is suggested that familiarity with all
  316. members is adequate. For large diverse crowds, limiting accounts in
  317. control of any one party is more complex:
  318. ``(e.g., the blender administrator sets up an account for a user only
  319. after receiving a written, notarized request from that user) and each
  320. account to one jondo, and by monitoring and limiting the number of
  321. jondos on any one net- work (using IP address), the attacker would be
  322. forced to launch jondos using many different identities and on many
  323. different networks to succeed'' \cite{crowds-tissec}.
  324. PipeNet \cite{back01, pipenet}, another low-latency design proposed at
  325. about the same time as the original Onion Routing design, provided
  326. stronger anonymity at the cost of allowing a single user to shut
  327. down the network simply by not sending. Low-latency anonymous
  328. communication has also been designed for other environments, including
  329. ISDN \cite{isdn-mixes}
  330. % and mobile applications such as telephones and
  331. %active badging systems \cite{federrath-ih96,reed-protocols97}.
  332. Some systems, such as Crowds \cite{crowds-tissec}, do not rely on changing the
  333. appearance of packets to hide the path; rather they try to prevent an
  334. intermediary from knowing whether it is talking to an initiator
  335. or just another intermediary. Crowds uses no public-key
  336. encryption, but the responder and all data are visible to all
  337. nodes on the path; so anonymity of the connection initiator depends on
  338. filtering all identifying information from the data stream. Crowds only
  339. supports HTTP traffic.
  340. Hordes \cite{hordes-jcs} is based on Crowds but also uses multicast
  341. responses to hide the initiator. Herbivore \cite{herbivore} and
  342. P5 \cite{p5} go even further, requiring broadcast.
  343. Each uses broadcast in different ways, and trade-offs are made to
  344. make broadcast more practical. Both Herbivore and P5 are designed primarily
  345. for communication between communicating peers, although Herbivore
  346. permits external connections by requesting a peer to serve as a proxy.
  347. Allowing easy connections to nonparticipating responders or recipients
  348. is a practical requirement for many users, e.g., to visit
  349. nonparticipating Web sites or to exchange mail with nonparticipating
  350. recipients.
  351. Tor is not primarily designed for censorship resistance but rather
  352. for anonymous communication. However, Tor's rendezvous points, which
  353. enable connections between mutually anonymous entities, also
  354. facilitate connections to hidden servers. These building blocks to
  355. censorship resistance and other capabilities are described in
  356. Section~\ref{sec:rendezvous}. Location-hidden servers are an
  357. essential component for the anonymous publishing systems such as
  358. Eternity\cite{eternity}, Publius\cite{publius},
  359. Free Haven\cite{freehaven-berk}, and Tangler\cite{tangler}.
  360. STILL NOT MENTIONED:
  361. real-time mixes\\
  362. rewebbers\\
  363. cebolla\\
  364. [XXX Close by mentioning where Tor fits.]
  365. \Section{Design goals and assumptions}
  366. \label{sec:assumptions}
  367. \SubSection{Goals}
  368. Like other low-latency anonymity designs, Tor seeks to frustrate
  369. attackers from linking communication partners, or from linking
  370. multiple communications to or from a single point. Within this
  371. main goal, however, several design considerations have directed
  372. Tor's evolution.
  373. \begin{tightlist}
  374. \item[Deployability:] The design must be one which can be implemented,
  375. deployed, and used in the real world. This requirement precludes designs
  376. that are expensive to run (for example, by requiring more bandwidth than
  377. volunteers are willing to provide); designs that place a heavy liability
  378. burden on operators (for example, by allowing attackers to implicate onion
  379. routers in illegal activities); and designs that are difficult or expensive
  380. to implement (for example, by requiring kernel patches, or separate proxies
  381. for every protocol). This requirement also precludes systems in which
  382. users who do not benefit from anonymity are required to run special
  383. software in order to communicate with anonymous parties.
  384. % Our rendezvous points require clients to use our software to get to
  385. % the location-hidden servers.
  386. % Or at least, they require somebody near the client-side running our
  387. % software. We haven't worked out the details of keeping it transparent
  388. % for Alice if she's using some other http proxy somewhere. I guess the
  389. % external http proxy should route through a Tor client, which automatically
  390. % translates the foo.onion address? -RD
  391. %
  392. % 1. Such clients do benefit from anonymity: they can reach the server.
  393. % Recall that our goal for location hidden servers is to continue to
  394. % provide service to priviliged clients when a DoS is happening or
  395. % to provide access to a location sensitive service. I see no contradiction.
  396. % 2. A good idiot check is whether what we require people to download
  397. % and use is more extreme than downloading the anonymizer toolbar or
  398. % privacy manager. I don't think so, though I'm not claiming we've already
  399. % got the installation and running of a client down to that simplicity
  400. % at this time. -PS
  401. \item[Usability:] A hard-to-use system has fewer users---and because
  402. anonymity systems hide users among users, a system with fewer users
  403. provides less anonymity. Usability is not only a convenience for Tor:
  404. it is a security requirement \cite{econymics,back01}. Tor
  405. should work with most of a user's unmodified applications; shouldn't
  406. introduce prohibitive delays; and should require the user to make as few
  407. configuration decisions as possible.
  408. \item[Flexibility:] The protocol must be flexible and
  409. well-specified, so that it can serve as a test-bed for future research in
  410. low-latency anonymity systems. Many of the open problems in low-latency
  411. anonymity networks (such as generating dummy traffic, or preventing
  412. pseudospoofing attacks) may be solvable independently from the issues
  413. solved by Tor; it would be beneficial if future systems were not forced to
  414. reinvent Tor's design decisions. (But note that while a flexible design
  415. benefits researchers, there is a danger that differing choices of
  416. extensions will render users distinguishable. Thus, experiments
  417. on extensions should be limited and should not significantly affect
  418. the distinguishability of ordinary users.
  419. % To run an experiment researchers must file an
  420. % anonymity impact statement -PS
  421. of implementations should
  422. not permit different protocol extensions to coexist in a single deployed
  423. network.)
  424. \item[Conservative design:] The protocol's design and security parameters
  425. must be conservative. Because additional features impose implementation
  426. and complexity costs, Tor should include as few speculative features as
  427. possible. (We do not oppose speculative designs in general; however, it is
  428. our goal with Tor to embody a solution to the problems in low-latency
  429. anonymity that we can solve today before we plunge into the problems of
  430. tomorrow.)
  431. % This last bit sounds completely cheesy. Somebody should tone it down. -NM
  432. \end{tightlist}
  433. \SubSection{Non-goals}
  434. \label{subsec:non-goals}
  435. In favoring conservative, deployable designs, we have explicitly deferred
  436. a number of goals. Many of these goals are desirable in anonymity systems,
  437. but we choose to defer them either because they are solved elsewhere,
  438. or because they present an area of active research lacking a generally
  439. accepted solution.
  440. \begin{tightlist}
  441. \item[Not Peer-to-peer:] Tarzan and Morphmix aim to
  442. scale to completely decentralized peer-to-peer environments with thousands
  443. of short-lived servers, many of which may be controlled by an adversary.
  444. Because of the many open problems in this approach, Tor uses a more
  445. conservative design.
  446. \item[Not secure against end-to-end attacks:] Tor does not claim to provide a
  447. definitive solution to end-to-end timing or intersection attacks. Some
  448. approaches, such as running an onion router, may help; see
  449. Section~\ref{sec:analysis} for more discussion.
  450. \item[No protocol normalization:] Tor does not provide \emph{protocol
  451. normalization} like Privoxy or the Anonymizer. In order to make clients
  452. indistinguishable when they use complex and variable protocols such as HTTP,
  453. Tor must be layered with a filtering proxy such as Privoxy to hide
  454. differences between clients, expunge protocol features that leak identity,
  455. and so on. Similarly, Tor does not currently integrate tunneling for
  456. non-stream-based protocols like UDP; this too must be provided by
  457. an external service.
  458. % Actually, tunneling udp over tcp is probably horrible for some apps.
  459. % Should this get its own non-goal bulletpoint? The motivation for
  460. % non-goal-ness would be burden on clients / portability.
  461. \item[Not steganographic:] Tor does not try to conceal which users are
  462. sending or receiving communications; it only tries to conceal whom they are
  463. communicating with.
  464. \end{tightlist}
  465. \SubSection{Threat Model}
  466. \label{subsec:threat-model}
  467. A global passive adversary is the most commonly assumed threat when
  468. analyzing theoretical anonymity designs. But like all practical low-latency
  469. systems, Tor is not secure against this adversary. Instead, we assume an
  470. adversary that is weaker than global with respect to distribution, but that
  471. is not merely passive. Our threat model expands on that from
  472. \cite{or-pet00}.
  473. %%%% This is really keen analytical stuff, but it isn't our threat model:
  474. %%%% we just go ahead and assume a fraction of hostile nodes for
  475. %%%% convenience. -NM
  476. %
  477. %% The basic adversary components we consider are:
  478. %% \begin{tightlist}
  479. %% \item[Observer:] can observe a connection (e.g., a sniffer on an
  480. %% Internet router), but cannot initiate connections. Observations may
  481. %% include timing and/or volume of packets as well as appearance of
  482. %% individual packets (including headers and content).
  483. %% \item[Disrupter:] can delay (indefinitely) or corrupt traffic on a
  484. %% link. Can change all those things that an observer can observe up to
  485. %% the limits of computational ability (e.g., cannot forge signatures
  486. %% unless a key is compromised).
  487. %% \item[Hostile initiator:] can initiate (or destroy) connections with
  488. %% specific routes as well as vary the timing and content of traffic
  489. %% on the connections it creates. A special case of the disrupter with
  490. %% additional abilities appropriate to its role in forming connections.
  491. %% \item[Hostile responder:] can vary the traffic on the connections made
  492. %% to it including refusing them entirely, intentionally modifying what
  493. %% it sends and at what rate, and selectively closing them. Also a
  494. %% special case of the disrupter.
  495. %% \item[Key breaker:] can break the key used to encrypt connection
  496. %% initiation requests sent to a Tor-node.
  497. %% % Er, there are no long-term private decryption keys. They have
  498. %% % long-term private signing keys, and medium-term onion (decryption)
  499. %% % keys. Plus short-term link keys. Should we lump them together or
  500. %% % separate them out? -RD
  501. %% %
  502. %% % Hmmm, I was talking about the keys used to encrypt the onion skin
  503. %% % that contains the public DH key from the initiator. Is that what you
  504. %% % mean by medium-term onion key? (``Onion key'' used to mean the
  505. %% % session keys distributed in the onion, back when there were onions.)
  506. %% % Also, why are link keys short-term? By link keys I assume you mean
  507. %% % keys that neighbor nodes use to superencrypt all the stuff they send
  508. %% % to each other on a link. Did you mean the session keys? I had been
  509. %% % calling session keys short-term and everything else long-term. I
  510. %% % know I was being sloppy. (I _have_ written papers formalizing
  511. %% % concepts of relative freshness.) But, there's some questions lurking
  512. %% % here. First up, I don't see why the onion-skin encryption key should
  513. %% % be any shorter term than the signature key in terms of threat
  514. %% % resistance. I understand that how we update onion-skin encryption
  515. %% % keys makes them depend on the signature keys. But, this is not the
  516. %% % basis on which we should be deciding about key rotation. Another
  517. %% % question is whether we want to bother with someone who breaks a
  518. %% % signature key as a particular adversary. He should be able to do
  519. %% % nearly the same as a compromised tor-node, although they're not the
  520. %% % same. I reworded above, I'm thinking we should leave other concerns
  521. %% % for later. -PS
  522. %% \item[Hostile Tor node:] can arbitrarily manipulate the
  523. %% connections under its control, as well as creating new connections
  524. %% (that pass through itself).
  525. %% \end{tightlist}
  526. %
  527. %% All feasible adversaries can be composed out of these basic
  528. %% adversaries. This includes combinations such as one or more
  529. %% compromised Tor-nodes cooperating with disrupters of links on which
  530. %% those nodes are not adjacent, or such as combinations of hostile
  531. %% outsiders and link observers (who watch links between adjacent
  532. %% Tor-nodes). Note that one type of observer might be a Tor-node. This
  533. %% is sometimes called an honest-but-curious adversary. While an observer
  534. %% Tor-node will perform only correct protocol interactions, it might
  535. %% share information about connections and cannot be assumed to destroy
  536. %% session keys at end of a session. Note that a compromised Tor-node is
  537. %% stronger than any other adversary component in the sense that
  538. %% replacing a component of any adversary with a compromised Tor-node
  539. %% results in a stronger overall adversary (assuming that the compromised
  540. %% Tor-node retains the same signature keys and other private
  541. %% state-information as the component it replaces).
  542. First, we assume that a threshold of directory servers are honest,
  543. reliable, accurate, and trustworthy.
  544. %% the rest of this isn't needed, if dirservers do threshold concensus dirs
  545. % To augment this, users can periodically cross-check
  546. %directories from each directory server (trust, but verify).
  547. %, and that they always have access to at least one directory server that they trust.
  548. Second, we assume that somewhere between ten percent and twenty
  549. percent\footnote{In some circumstances---for example, if the Tor network is
  550. running on a hardened network where all operators have had background
  551. checks---the number of compromised nodes could be much lower.}
  552. of the Tor nodes accepted by the directory servers are compromised, hostile,
  553. and collaborating in an off-line clique. These compromised nodes can
  554. arbitrarily manipulate the connections that pass through them, as well as
  555. creating new connections that pass through themselves. They can observe
  556. traffic, and record it for later analysis. Honest participants do not know
  557. which servers these are.
  558. (In reality, many adversaries might have `bad' servers that are not
  559. fully compromised but simply under observation, or that have had their keys
  560. compromised. But for the sake of analysis, we ignore, this possibility,
  561. since the threat model we assume is strictly stronger.)
  562. % This next paragraph is also more about analysis than it is about our
  563. % threat model. Perhaps we can say, ``users can connect to the network and
  564. % use it in any way; we consider abusive attacks separately.'' ? -NM
  565. Third, we constrain the impact of hostile users. Users are assumed to vary
  566. widely in both the duration and number of times they are connected to the Tor
  567. network. They can also be assumed to vary widely in the volume and shape of
  568. the traffic they send and receive. Hostile users are, by definition, limited
  569. to creating and varying their own connections into or through a Tor
  570. network. They may attack their own connections to try to gain identity
  571. information of the responder in a rendezvous connection. They can also try to
  572. attack sites through the Onion Routing network; however we will consider this
  573. abuse rather than an attack per se (see
  574. Section~\ref{subsec:exitpolicies}). Other than abuse, a hostile user's
  575. motivation to attack his own connections is limited to the network effects of
  576. such actions, such as denial of service (DoS) attacks. Thus, in this case,
  577. we can view user as simply an extreme case of the ordinary user; although
  578. ordinary users are not likely to engage in, e.g., IP spoofing, to gain their
  579. objectives.
  580. In general, we are more focused on traffic analysis attacks than
  581. traffic confirmation attacks.
  582. %A user who runs a Tor proxy on his own
  583. %machine, connects to some remote Tor-node and makes a connection to an
  584. %open Internet site, such as a public web server, is vulnerable to
  585. %traffic confirmation.
  586. That is, an active attacker who suspects that
  587. a particular client is communicating with a particular server can
  588. confirm this if she can modify and observe both the
  589. connection between the Tor network and the client and that between the
  590. Tor network and the server. Even a purely passive attacker can
  591. confirm traffic if the timing and volume properties of the traffic on
  592. the connection are unique enough. (This is not to say that Tor offers
  593. no resistance to traffic confirmation; it does. We defer discussion
  594. of this point and of particular attacks until Section~\ref{sec:attacks},
  595. after we have described Tor in more detail.)
  596. % XXX We need to say what traffic analysis is: How about...
  597. On the other hand, we {\it do} try to prevent an attacker from
  598. performing traffic analysis: that is, attempting to learn the communication
  599. partners of an arbitrary user.
  600. % XXX If that's not right, what is? It would be silly to have a
  601. % threat model section without saying what we want to prevent the
  602. % attacker from doing. -NM
  603. % XXX Also, do we want to mention linkability or building profiles? -NM
  604. Our assumptions about our adversary's capabilities imply a number of
  605. possible attacks against users' anonymity. Our adversary might try to
  606. mount passive attacks by observing the edges of the network and
  607. correlating traffic entering and leaving the network: either because
  608. of relationships in packet timing; relationships in the volume of data
  609. sent; [XXX simple observation??]; or relationships in any externally
  610. visible user-selected options. The adversary can also mount active
  611. attacks by trying to compromise all the servers' keys in a
  612. path---either through illegitimate means or through legal coercion in
  613. unfriendly jurisdiction; by selectively DoSing trustworthy servers; by
  614. introducing patterns into entering traffic that can later be detected;
  615. or by modifying data entering the network and hoping that trashed data
  616. comes out the other end. The attacker can additionally try to
  617. decrease the network's reliability by performing antisocial activities
  618. from reliable servers and trying to get them taken down.
  619. % XXX Should there be more or less? Should we turn this into a
  620. % bulleted list? Should we cut it entirely?
  621. We consider these attacks and more, and describe our defenses against them
  622. in Section~\ref{sec:attacks}.
  623. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  624. \Section{The Tor Design}
  625. \label{sec:design}
  626. The Tor network is an overlay network; each node is called an onion router
  627. (OR). Onion routers run as normal user-level processes without needing
  628. any special
  629. privileges. Currently, each OR maintains a long-term TLS \cite{TLS}
  630. connection to every other
  631. OR. (We examine some ways to relax this clique-topology assumption in
  632. Section~\ref{subsec:restricted-routes}.) A subset of the ORs also act as
  633. directory servers, tracking which routers are currently in the network;
  634. see Section~\ref{subsec:dirservers} for directory server details. Users
  635. run local software called an onion proxy (OP) to fetch directories,
  636. establish paths (called \emph{virtual circuits}) across the network,
  637. and handle connections from user applications. Onion proxies accept
  638. TCP streams and multiplex them across the virtual circuit. The onion
  639. router on the other side
  640. % I don't mean other side, I mean wherever it is on the circuit. But
  641. % don't want to introduce complexity this early? Hm. -RD
  642. of the circuit connects to the destinations of
  643. the TCP streams and relays data.
  644. Each onion router uses three public keys: a long-term identity key, a
  645. short-term onion key, and a short-term link key. The identity
  646. (signing) key is used to sign TLS certificates, to sign its router
  647. descriptor (a summary of its keys, address, bandwidth, exit policy,
  648. etc), and to sign directories if it is a directory server. Changing
  649. the identity key of a router is considered equivalent to creating a
  650. new router. The onion (decryption) key is used for decrypting requests
  651. from users to set up a circuit and negotiate ephemeral keys. Finally,
  652. link keys are used by the TLS protocol when communicating between
  653. onion routers. We discuss rotating these keys in
  654. Section~\ref{subsec:rotating-keys}.
  655. Section~\ref{subsec:cells} discusses the structure of the fixed-size
  656. \emph{cells} that are the unit of communication in Tor. We describe
  657. in Section~\ref{subsec:circuits} how virtual circuits are
  658. built, extended, truncated, and destroyed. Section~\ref{subsec:tcp}
  659. describes how TCP streams are routed through the network, and finally
  660. Section~\ref{subsec:congestion} talks about congestion control and
  661. fairness issues.
  662. \SubSection{Cells}
  663. \label{subsec:cells}
  664. % I think we should describe connections before cells. -NM
  665. Traffic passes from one OR to another, or between a user's OP and an OR,
  666. in fixed-size cells. Each cell is 256
  667. bytes, and consists of a header and a payload. The header includes an
  668. anonymous circuit identifier (ACI) that specifies which circuit the
  669. % Should we replace ACI with circID ? What is this 'anonymous circuit'
  670. % thing anyway? -RD
  671. cell refers to
  672. (many circuits can be multiplexed over the single TCP connection between
  673. ORs or between an OP and an OR), and a command to describe what to do
  674. with the cell's payload. Cells are either \emph{control} cells, which are
  675. interpreted by the node that receives them, or \emph{relay} cells,
  676. which carry end-to-end stream data. Controls cells can be one of:
  677. \emph{padding} (currently used for keepalive, but also usable for link
  678. padding); \emph{create} or \emph{created} (used to set up a new circuit);
  679. or \emph{destroy} (to tear down a circuit).
  680. % We need to say that ACIs are connection-specific: each circuit has
  681. % a different ACI along each connection. -NM
  682. % agreed -RD
  683. Relay cells have an additional header (the relay header) after the
  684. cell header, containing the stream identifier (many streams can
  685. be multiplexed over a circuit); an end-to-end checksum for integrity
  686. checking; the length of the relay payload; and a relay command. Relay
  687. commands can be one of: \emph{relay
  688. data} (for data flowing down the stream), \emph{relay begin} (to open a
  689. stream), \emph{relay end} (to close a stream), \emph{relay connected}
  690. (to notify the OP that a relay begin has succeeded), \emph{relay
  691. extend} and \emph{relay extended} (to extend the circuit by a hop,
  692. and to acknowledge), \emph{relay truncate} and \emph{relay truncated}
  693. (to tear down only part of the circuit, and to acknowledge), \emph{relay
  694. sendme} (used for congestion control), and \emph{relay drop} (used to
  695. implement long-range dummies).
  696. We describe each of these cell types in more detail below.
  697. % Nick: should there have been a table here? -RD
  698. % Maybe. -NM
  699. \SubSection{Circuits and streams}
  700. \label{subsec:circuits}
  701. % I think when we say ``the user,'' maybe we should say ``the user's OP.''
  702. The original Onion Routing design built one circuit for each
  703. TCP stream. Because building a circuit can take several tenths of a
  704. second (due to public-key cryptography delays and network latency),
  705. this design imposed high costs on applications like web browsing that
  706. open many TCP streams.
  707. In Tor, each circuit can be shared by many TCP streams. To avoid
  708. delays, users construct circuits preemptively. To limit linkability
  709. among the streams, users rotate connections by building a new circuit
  710. periodically (currently every minute) if the previous one has been
  711. used, and expire old used circuits that are no longer in use. Thus
  712. even heavy users spend a negligible amount of time and CPU in
  713. building circuits, but only a limited number of requests can be linked
  714. to each other by a given exit node. Also, because circuits are built
  715. in the background, failed routers do not affects user experience.
  716. \subsubsection{Constructing a circuit}
  717. Users construct each incrementally, negotiating a symmetric key with
  718. each hop one at a time. To begin creating a new circuit, the user
  719. (call her Alice) sends a \emph{create} cell to the first node in her
  720. chosen path. The cell's payload is the first half of the
  721. Diffie-Hellman handshake, encrypted to the onion key of the OR (call
  722. him Bob). Bob responds with a \emph{created} cell containg the second
  723. half of the DH handshake, along with a hash of the negotiated key
  724. $K=g^{xy}$. This protocol tries to achieve unilateral entity
  725. authentication (Alice knows she's handshaking with Bob, Bob doesn't
  726. care who is opening the circuit---Alice has no key and is trying to
  727. remain anonymous); unilateral key authentication (Alice and Bob
  728. agree on a key, and Alice knows Bob is the only other person who could
  729. know it). We also want perfect forward
  730. secrecy, key freshness, etc.
  731. \begin{equation}
  732. \begin{aligned}
  733. \mathrm{Alice} \rightarrow \mathrm{Bob}&: E_{PK_{Bob}}(g^x) \\
  734. \mathrm{Bob} \rightarrow \mathrm{Alice}&: g^y, H(K | \mathrm{``handshake"}) \\
  735. \end{aligned}
  736. \end{equation}
  737. The second step shows both that it was Bob
  738. who received $g^x$, and that it was Bob who came up with $y$. We use
  739. PK encryption in the first step (rather than, e.g., using the first two
  740. steps of STS, which has a signature in the second step) because we
  741. don't have enough room in a single cell for a public key and also a
  742. signature. Preliminary analysis with the NRL protocol analyzer \cite{meadows96}
  743. shows the above protocol to be secure (including providing PFS) under the
  744. traditional Dolev-Yao model.
  745. % cite Cathy? -RD
  746. % did I use the buzzwords correctly? -RD
  747. % Hm. I think that this paragraph could go earlier in expository
  748. % order: we describe how to build whole circuit, then explain the
  749. % protocol in more detail. -NM
  750. To extend a circuit past the first hop, Alice sends a \emph{relay extend}
  751. cell to the last node in the circuit, specifying the address of the new
  752. OR and an encrypted $g^x$ for it. That node copies the half-handshake
  753. into a \emph{create} cell, and passes it to the new OR to extend the
  754. circuit. When it responds with a \emph{created} cell, the penultimate OR
  755. copies the payload into a \emph{relay extended} cell and passes it back.
  756. % Nick: please fix my "that OR" pronouns -RD
  757. \subsubsection{Relay cells}
  758. Once Alice has established the circuit (so she shares a key with each
  759. OR on the circuit), she can send relay cells.
  760. The stream ID in the relay header indicates to which stream the cell belongs.
  761. A relay cell can be addressed to any of the ORs on the circuit. To
  762. construct a relay cell addressed to a given OR, Alice iteratively
  763. encrypts the cell payload (that is, the relay header and payload)
  764. with the symmetric key of each hop up to that OR. Then, at each hop
  765. down the circuit, the OR decrypts the cell payload and checks whether
  766. it recognizes the stream ID. A stream ID is recognized either if it
  767. is an already open stream at that OR, or if it is equal to zero. The
  768. zero stream ID is treated specially, and is used for control messages,
  769. e.g. starting a new stream. If the stream ID is unrecognized, the OR
  770. passes the relay cell downstream. This \emph{leaky pipe} circuit topology
  771. allows Alice's streams to exit at different ORs on a single circuit.
  772. Alice may choose different exit points because of their exit policies,
  773. or to keep the ORs from knowing that two streams
  774. originate at the same person.
  775. To tear down a circuit, Alice sends a destroy control cell. Each OR
  776. in the circuit receives the destroy cell, closes all open streams on
  777. that circuit, and passes a new destroy cell forward. But since circuits
  778. can be built incrementally, they can also be torn down incrementally:
  779. Alice can instead send a relay truncate cell to a node along the circuit. That
  780. node will send a destroy cell forward, and reply with an acknowledgment
  781. (relay truncated). Alice might truncate her circuit so she can extend it
  782. to different nodes without signaling to the first few nodes (or somebody
  783. observing them) that she is changing her circuit. That is, nodes in the
  784. middle are not even aware that the circuit was truncated, because the
  785. relay cells are encrypted. Similarly, if a node on the circuit goes down,
  786. the adjacent node can send a relay truncated back to Alice. Thus the
  787. ``break a node and see which circuits go down'' attack is weakened.
  788. \SubSection{Opening and closing streams}
  789. \label{subsec:tcp}
  790. When Alice's application wants to open a TCP connection to a given
  791. address and port, it asks the OP (via SOCKS) to make the connection. The
  792. OP chooses the newest open circuit (or creates one if none is available),
  793. chooses a suitable OR on that circuit to be the exit node (usually the
  794. last node, but maybe others due to exit policy conflicts; see
  795. Section~\ref{sec:exit-policies}), chooses a new random stream ID for
  796. this stream,
  797. and delivers a relay begin cell to that exit node. It uses a stream ID
  798. of zero for the begin cell (so the OR will recognize it), and the relay
  799. payload lists the new stream ID and the destination address and port.
  800. Once the exit node completes the connection to the remote host, it
  801. responds with a relay connected cell through the circuit. Upon receipt,
  802. the OP notifies the application that it can begin talking.
  803. There's a catch to using SOCKS, though -- some applications hand the
  804. alphanumeric address to the proxy, while others resolve it into an IP
  805. address first and then hand the IP to the proxy. When the application
  806. does the DNS resolution first, Alice broadcasts her destination. Common
  807. applications like Mozilla and ssh have this flaw.
  808. In the case of Mozilla, we're fine: the filtering web proxy called Privoxy
  809. does the SOCKS call safely, and Mozilla talks to Privoxy safely. But a
  810. portable general solution, such as for ssh, is an open problem. We could
  811. modify the local nameserver, but this approach is invasive, brittle, and
  812. not portable. We could encourage the resolver library to do resolution
  813. via TCP rather than UDP, but this approach is hard to do right, and also
  814. has portability problems. Our current answer is to encourage the use of
  815. privacy-aware proxies like Privoxy wherever possible, and also provide
  816. a tool similar to \emph{dig} that can do a private lookup through the
  817. Tor network.
  818. Ending a Tor stream is analogous to ending a TCP stream: it uses a
  819. two-step handshake for normal operation, or a one-step handshake for
  820. errors. If one side of the stream closes abnormally, that node simply
  821. sends a relay teardown cell, and tears down the stream. If one side
  822. % Nick: mention relay teardown in 'cell' subsec? good enough name? -RD
  823. of the stream closes the connection normally, that node sends a relay
  824. end cell down the circuit. When the other side has sent back its own
  825. relay end, the stream can be torn down. This two-step handshake allows
  826. for TCP-based applications that, for example, close a socket for writing
  827. but are still willing to read.
  828. \SubSection{Integrity checking on streams}
  829. In the old Onion Routing design, traffic was vulnerable to a
  830. malleability attack: an attacker could make changes to an encrypted
  831. cell to create corresponding changes to the data leaving the network.
  832. (Even an external adversary could do this, despite link encryption!)
  833. This weakness allowed an adversary to change a create cell to a destroy
  834. cell; change the destination address in a relay begin cell to the
  835. adversary's webserver; or change a user on an ftp connection from
  836. typing ``dir'' to typing ``delete *''. Any node or observer along the
  837. path could introduce such corruption in a stream.
  838. Tor prevents external adversaries by mounting this attack simply by
  839. using TLS. Addressing the insider malleability attack, however, is
  840. more complex.
  841. Rather than doing integrity checking of the relay cells at each hop,
  842. which would increase packet size
  843. by a function of path length\footnote{This is also the argument against
  844. using recent cipher modes like EAX \cite{eax} --- we don't want the added
  845. message-expansion overhead at each hop, and we don't want to leak the path
  846. length (or pad to some max path length).}, we choose to
  847. % accept passive timing attacks,
  848. % (How? I don't get it. Do we mean end-to-end traffic
  849. % confirmation attacks? -NM)
  850. and perform integrity
  851. checking only at the edges of the circuit. When Alice negotiates a key
  852. with the exit hop, they both start a SHA-1 with some derivative of that key,
  853. thus starting out with randomness that only the two of them know. From
  854. then on they each incrementally add all the data bytes flowing across
  855. the stream to the SHA-1, and each relay cell includes the first 4 bytes
  856. of the current value of the hash.
  857. The attacker must be able to guess all previous bytes between Alice
  858. and Bob on that circuit (including the pseudorandomness from the key
  859. negotiation), plus the bytes in the current cell, to remove or modify the
  860. cell. Attacks on SHA-1 where the adversary can incrementally add to a
  861. hash to produce a new valid hash don't work,
  862. because all hashes are end-to-end encrypted across the circuit.
  863. The computational overhead isn't so bad, compared to doing an AES
  864. % XXX We never say we use AES. Say it somewhere above? -RD
  865. crypt at each hop in the circuit. We use only four bytes per cell to
  866. minimize overhead; the chance that an adversary will correctly guess a
  867. valid hash, plus the payload the current cell, is acceptly low, given
  868. that Alice or Bob tear down the circuit if they receive a bad hash.
  869. \SubSection{Rate limiting and fairness}
  870. Volunteers are generally more willing to run services that can limit
  871. their bandwidth usage. To accomodate them, Tor servers use a token
  872. bucket approach to limit the number of bytes they
  873. receive. Tokens are added to the bucket each second (when the bucket is
  874. full, new tokens are discarded.) Each token represents permission to
  875. receive one byte from the network --- to receive a byte, the connection
  876. must remove a token from the bucket. Thus if the bucket is empty, that
  877. connection must wait until more tokens arrive. The number of tokens we
  878. add enforces a long-term average rate of incoming bytes, while still
  879. permitting short-term bursts above the allowed bandwidth. Current bucket
  880. sizes are set to ten seconds worth of traffic.
  881. Further, we want to avoid starving any Tor streams. Entire circuits
  882. could starve if we read greedily from connections and one connection
  883. uses all the remaining bandwidth. We solve this by dividing the number
  884. of tokens in the bucket by the number of connections that want to read,
  885. and reading at most that number of bytes from each connection. We iterate
  886. this procedure until the number of tokens in the bucket is under some
  887. threshold (eg 10KB), at which point we greedily read from connections.
  888. Because the Tor protocol generates roughly the same number of outgoing
  889. bytes as incoming bytes, it is sufficient in practice to rate-limit
  890. incoming bytes.
  891. % Is it? Fun attack: I send you lots of 1-byte-at-a-time TCP frames.
  892. % In response, you send lots of 256 byte cells. Can I use this to
  893. % make you exceed your outgoing bandwidth limit by a factor of 256? -NM
  894. % Can we resolve this by, when reading from edge connections, rounding up
  895. % the bytes read (wrt buckets) to the nearest multiple of 256? -RD
  896. Further, inspired by Rennhard et al's design in \cite{anonnet}, a
  897. circuit's edges heuristically distinguish interactive streams from bulk
  898. streams by comparing the frequency with which they supply cells. We can
  899. provide good latency for interactive streams by giving them preferential
  900. service, while still getting good overall throughput to the bulk
  901. streams. Such preferential treatment presents a possible end-to-end
  902. attack, but an adversary who can observe both
  903. ends of the stream can already learn this information through timing
  904. attacks.
  905. \SubSection{Congestion control}
  906. \label{subsec:congestion}
  907. Even with bandwidth rate limiting, we still need to worry about
  908. congestion, either accidental or intentional. If enough users choose the
  909. same OR-to-OR connection for their circuits, that connection can become
  910. saturated. For example, an adversary could make a large HTTP PUT request
  911. through the onion routing network to a webserver he runs, and then
  912. refuse to read any of the bytes at the webserver end of the
  913. circuit. Without some congestion control mechanism, these bottlenecks
  914. can propagate back through the entire network. We describe our
  915. responses below.
  916. \subsubsection{Circuit-level}
  917. To control a circuit's bandwidth usage, each OR keeps track of two
  918. windows. The \emph{package window} tracks how many relay data cells the OR is
  919. allowed to package (from outside streams) for transmission back to the OP,
  920. and the \emph{deliver window} tracks how many relay data cells it is willing
  921. to deliver to streams outside the network. Each window is initialized
  922. (say, to 1000 data cells). When a data cell is packaged or delivered,
  923. the appropriate window is decremented. When an OR has received enough
  924. data cells (currently 100), it sends a relay sendme cell towards the OP,
  925. with stream ID zero. When an OR receives a relay sendme cell with stream
  926. ID zero, it increments its packaging window. Either of these cells
  927. increments the corresponding window by 100. If the packaging window
  928. reaches 0, the OR stops reading from TCP connections for all streams
  929. on the corresponding circuit, and sends no more relay data cells until
  930. receiving a relay sendme cell.
  931. The OP behaves identically, except that it must track a packaging window
  932. and a delivery window for every OR in the circuit. If a packaging window
  933. reaches 0, it stops reading from streams destined for that OR.
  934. \subsubsection{Stream-level}
  935. The stream-level congestion control mechanism is similar to the
  936. circuit-level mechanism above. ORs and OPs use relay sendme cells
  937. to implement end-to-end flow control for individual streams across
  938. circuits. Each stream begins with a package window (e.g. 500 cells),
  939. and increments the window by a fixed value (50) upon receiving a relay
  940. sendme cell. Rather than always returning a relay sendme cell as soon
  941. as enough cells have arrived, the stream-level congestion control also
  942. has to check whether data has been successfully flushed onto the TCP
  943. stream; it sends a relay sendme only when the number of bytes pending
  944. to be flushed is under some threshold (currently 10 cells worth).
  945. Currently, non-data relay cells do not affect the windows. Thus we
  946. avoid potential deadlock issues, e.g. because a stream can't send a
  947. relay sendme cell because its packaging window is empty.
  948. \subsubsection{Needs more research}
  949. We don't need to reimplement full TCP windows (with sequence numbers,
  950. the ability to drop cells when we're full and retransmit later, etc),
  951. because the TCP streams already guarantee in-order delivery of each
  952. cell. But we need to investigate further the effects of the current
  953. parameters on throughput and latency, while also keeping privacy in mind;
  954. see Section~\ref{sec:maintaining-anonymity} for more discussion.
  955. \Section{Other design decisions}
  956. \SubSection{Resource management and DoS prevention}
  957. \label{subsec:dos}
  958. Providing Tor as a public service provides many opportunities for an
  959. attacker to mount denial-of-service attacks against the network. While
  960. flow control and rate limiting (discussed in
  961. section~\ref{subsec:congestion}) prevents users from consuming more
  962. bandwidth than nodes are willing to provide, opportunities remain for
  963. consume more network resources than their fair share, or to render the
  964. network unusable for other users.
  965. First of all, there are a number of CPU-consuming denial-of-service
  966. attacks wherein an attacker can force an OR to perform expensive
  967. cryptographic operations. For example, an attacker who sends a
  968. \emph{create} cell full of junk bytes can force an OR to perform an RSA
  969. decrypt its half of the Diffie-Helman handshake. Similarly, an attacker
  970. fake the start of a TLS handshake, forcing the OR to carry out its
  971. (comparatively expensive) half of the handshake at no real computational
  972. cost to the attacker.
  973. To address these attacks, several approaches exist. First, ORs may
  974. demand proof-of-computation tokens \cite{hashcash} before beginning new
  975. TLS handshakes or accepting \emph{create} cells. So long as these
  976. tokens are easy to verify and computationally expensive to produce, this
  977. approach limits the DoS attack multiplier. Additionally, ORs may limit
  978. the rate at which they accept create cells and TLS connections, so that
  979. the computational work of doing so does not drown out the (comparatively
  980. inexpensive) work of symmetric cryptography needed to keep users'
  981. packets flowing. This rate limiting could, however, allows an attacker
  982. to slow down other users as they build new circuits.
  983. % What about link-to-link rate limiting?
  984. % This paragraph needs more references.
  985. More worrisome are distributed denial of service attacks wherein an
  986. attacker uses a large number of compromised hosts throughout the network
  987. to consume the Tor network's resources. Although these attacks are not
  988. new to the networking literature, some proposed approaches are a poor
  989. fit to anonymous networks. For example, solutions based on backtracking
  990. harmful traffic present a significant risk that an anonymity-breaking
  991. adversary could exploit the backtracking mechanism to compromise users'
  992. anonymity. [XXX So, what should we say here? -NM]
  993. % Now would be a good point to talk about twins. What the do, what
  994. % they can't.
  995. Attackers also have an opportunity to attack the Tor network by mounting
  996. attacks on the hosts and network links running it. If an attacker can
  997. successfully disrupt a single circuit or link along a virtual circuit,
  998. all currently open streams passing along that part of the circuit
  999. become unrecoverable, and are closed. The current Tor design treats
  1000. such attacks as intermittent network failures, and depends on users and
  1001. applications to respond or recover as appropriate. A possible future
  1002. design could use an end-to-end based TCP-like acknowledgment protocol,
  1003. so that no streams are lost unless the entry or exit point themselves
  1004. are disrupted. This solution would require more buffering at exits,
  1005. however, and its network properties still need to be investigated. [XXX
  1006. That sounds really evasive. We should say more.]
  1007. %[XXX Mention that OR-to-OR connections should be highly reliable
  1008. % (whatever that means). If they aren't, everything can stall.]
  1009. %=====================
  1010. % This stuff should go elsewhere. Probably section 2.
  1011. Channel-based anonymity designs must choose which protocol layer to
  1012. anonymize. They may choose to intercept IP packets directly, and relay
  1013. them whole (stripping the source address) as the contents of their
  1014. anonymous channels \cite{tarzan:ccs02,freedom2-arch}. Alternatively,
  1015. they may
  1016. accept TCP streams and relay the data in those streams along the
  1017. channel, ignoring the breakdown of that data into TCP frames. (Tor
  1018. takes this approach, as does Rennhard's anonymity network \cite{anonnet}
  1019. and Morphmix \cite{morphmix:fc04}.) Finally, they may accept
  1020. application-level protocols (such as HTTP) and relay the application
  1021. requests themselves along their anonymous channels.
  1022. This protocol-layer decision represents a compromise between flexibility
  1023. and anonymity. For example, a system that understands HTTP can strip
  1024. identifying information from those requests; can take advantage of
  1025. caching to limit the number of requests that leave the network; and can
  1026. batch or encode those requests in order to minimize the number of
  1027. connections. On the other hand, an IP-level anonymizer can handle
  1028. nearly any protocol, even ones unforeseen by their designers. TCP-level
  1029. anonymity networks like Tor present a middle approach: they are fairly
  1030. application neutral (so long as the application supports, or can be
  1031. tunneled across, TCP), but by treating application connections as data
  1032. streams rather than raw TCP packets, they avoid the well-known
  1033. inefficiencies of tunneling TCP over TCP \cite{tcp-over-tcp-is-bad}.
  1034. % Is there a better tcp-over-tcp-is-bad reference?
  1035. %Also mention that weirdo IP trickery requires kernel patches to most
  1036. %operating systems? -NM
  1037. \SubSection{Exit policies and abuse}
  1038. \label{subsec:exitpolicies}
  1039. Exit abuse is a serious barrier to wide-scale Tor deployment. Not
  1040. only does anonymity present would-be vandals and abusers with an
  1041. opportunity to hide the origins of their activities---but also,
  1042. existing sanctions against abuse present an easy way for attackers to
  1043. harm the Tor network by implicating exit servers for their abuse.
  1044. Thus, must block or limit attacks and other abuse that travel through
  1045. the Tor network.
  1046. Also, applications that commonly use IP-based authentication (such
  1047. institutional mail or web servers) can be fooled by the fact that
  1048. anonymous connections appear to originate at the exit OR. Rather than
  1049. expose a private service, an administrator may prefer to prevent Tor
  1050. users from connecting to those services from a local OR.
  1051. To mitigate abuse issues, in Tor, each onion router's \emph{exit
  1052. policy} describes to which external addresses and ports the router
  1053. will permit stream connections. On one end of the spectrum are
  1054. \emph{open exit} nodes that will connect anywhere. As a compromise,
  1055. most onion routers will function as \emph{restricted exits} that
  1056. permit connections to the world at large, but prevent access to
  1057. certain abuse-prone addresses and services. on the other end are
  1058. \emph{middleman} nodes that only relay traffic to other Tor nodes, and
  1059. \emph{private exit} nodes that only connect to a local host or
  1060. network. (Using a private exit (if one exists) is a more secure way
  1061. for a client to connect to a given host or network---an external
  1062. adversary cannot eavesdrop traffic between the private exit and the
  1063. final destination, and so is less sure of Alice's destination and
  1064. activities.) is less sure of Alice's destination. More generally,
  1065. nodes can require a variety of forms of traffic authentication
  1066. \cite{or-discex00}.
  1067. %Tor offers more reliability than the high-latency fire-and-forget
  1068. %anonymous email networks, because the sender opens a TCP stream
  1069. %with the remote mail server and receives an explicit confirmation of
  1070. %acceptance. But ironically, the private exit node model works poorly for
  1071. %email, when Tor nodes are run on volunteer machines that also do other
  1072. %things, because it's quite hard to configure mail transport agents so
  1073. %normal users can send mail normally, but the Tor process can only deliver
  1074. %mail locally. Further, most organizations have specific hosts that will
  1075. %deliver mail on behalf of certain IP ranges; Tor operators must be aware
  1076. %of these hosts and consider putting them in the Tor exit policy.
  1077. %The abuse issues on closed (e.g. military) networks are different
  1078. %from the abuse on open networks like the Internet. While these IP-based
  1079. %access controls are still commonplace on the Internet, on closed networks,
  1080. %nearly all participants will be honest, and end-to-end authentication
  1081. %can be assumed for important traffic.
  1082. Many administrators will use port restrictions to support only a
  1083. limited set of well-known services, such as HTTP, SSH, or AIM.
  1084. This is not a complete solution, since abuse opportunities for these
  1085. protocols are still well known. Nonetheless, the benefits are real,
  1086. since administrators seem used to the concept of port 80 abuse not
  1087. coming from the machine's owner.
  1088. A further solution may be to use proxies to clean traffic for certain
  1089. protocols as it leaves the network. For example, much abusive HTTP
  1090. behavior (such as exploiting buffer overflows or well-known script
  1091. vulnerabilities) can be detected in a straightforward manner.
  1092. Similarly, one could run automatic spam filtering software (such as
  1093. SpamAssassin) on email exiting the OR network. A generic
  1094. intrusion detection system (IDS) could be adapted to these purposes.
  1095. ORs may also choose to rewrite exiting traffic in order to append
  1096. headers or other information to indicate that the traffic has passed
  1097. through an anonymity service. This approach is commonly used, to some
  1098. success, by email-only anonymity systems. When possible, ORs can also
  1099. run on servers with hostnames such as {\it anonymous}, to further
  1100. alert abuse targets to the nature of the anonymous traffic.
  1101. %we should run a squid at each exit node, to provide comparable anonymity
  1102. %to private exit nodes for cache hits, to speed everything up, and to
  1103. %have a buffer for funny stuff coming out of port 80. we could similarly
  1104. %have other exit proxies for other protocols, like mail, to check
  1105. %delivered mail for being spam.
  1106. %[XXX Um, I'm uncomfortable with this for several reasons.
  1107. %It's not good for keeping honest nodes honest about discarding
  1108. %state after it's no longer needed. Granted it keeps an external
  1109. %observer from noticing how often sites are visited, but it also
  1110. %allows fishing expeditions. ``We noticed you went to this prohibited
  1111. %site an hour ago. Kindly turn over your caches to the authorities.''
  1112. %I previously elsewhere suggested bulk transfer proxies to carve
  1113. %up big things so that they could be downloaded in less noticeable
  1114. %pieces over several normal looking connections. We could suggest
  1115. %similarly one or a handful of squid nodes that might serve up
  1116. %some of the more sensitive but common material, especially if
  1117. %the relevant sites didn't want to or couldn't run their own OR.
  1118. %This would be better than having everyone run a squid which would
  1119. %just help identify after the fact the different history of that
  1120. %node's activity. All this kind of speculation needs to move to
  1121. %future work section I guess. -PS]
  1122. A mixture of open and restricted exit nodes will allow the most
  1123. flexibility for volunteers running servers. But while a large number
  1124. of middleman nodes is useful to provide a large and robust network,
  1125. having only a small number of exit nodes reduces the number of nodes
  1126. an adversary needs to monitor for traffic analysis, and places a
  1127. greater burden on the exit nodes. This tension can be seen in the JAP
  1128. cascade model, wherein only one node in each cascade needs to handle
  1129. abuse complaints---but an adversary only needs to observe the entry
  1130. and exit of a cascade to perform traffic analysis on all that
  1131. cascade's users. The Hydra model (many entries, few exits) presents a
  1132. different compromise: only a few exit nodes are needed, but an
  1133. adversary needs to work harder to watch all the clients.
  1134. Finally, we note that exit abuse must not be dismissed as a peripheral
  1135. issue: when a system's public image suffers, it can reduce the number
  1136. and diversity of that system's users, and thereby reduce the anonymity
  1137. of the system itself. Like usability, public perception is also a
  1138. security parameter. Sadly, preventing abuse of open exit nodes is an
  1139. unsolved problem, and will probably remain an arms race for the
  1140. forseeable future. The abuse problems faced by Princeton's CoDeeN
  1141. project \cite{darkside} give us a glimpse of likely issues.
  1142. \SubSection{Directory Servers}
  1143. \label{subsec:dirservers}
  1144. First-generation Onion Routing designs \cite{or-jsac98,freedom2-arch} did
  1145. % is or-jsac98 the right cite here? what's our stock OR cite? -RD
  1146. in-band network status updates: each router flooded a signed statement
  1147. to its neighbors, which propagated it onward. But anonymizing networks
  1148. have different security goals than typical link-state routing protocols.
  1149. For example, delays (accidental or intentional)
  1150. that can cause different parts of the network to have different pictures
  1151. of link-state and topology are not only inconvenient---they give
  1152. attackers an opportunity to exploit differences in client knowledge.
  1153. We also worry about attacks to deceive a
  1154. client about the router membership list, topology, or current network
  1155. state. Such \emph{partitioning attacks} on client knowledge help an
  1156. adversary with limited resources to efficiently deploy those resources
  1157. when attacking a target.
  1158. Instead of flooding, Tor uses a small group of redundant, well-known
  1159. directory servers to track changes in network topology and node state,
  1160. including keys and exit policies. Directory servers are a small group
  1161. of well-known, mostly-trusted onion routers. They listen on a
  1162. separate port as an HTTP server, so that participants can fetch
  1163. current network state and router lists (a \emph{directory}), and so
  1164. that other onion routers can upload their router descriptors. Onion
  1165. routers now periodically publish signed statements of their state to
  1166. the directories only. The directories themselves combine this state
  1167. information with their own views of network liveness, and generate a
  1168. signed description of the entire network state whenever its contents
  1169. have changed. Client software is pre-loaded with a list of the
  1170. directory servers and their keys, and uses this information to
  1171. bootstrap each client's view of the network.
  1172. When a directory receives a signed statement from and onion router, it
  1173. recognizes the onion router by its identity (signing) key.
  1174. Directories do not automatically advertise ORs that they do not
  1175. recognize. (If they did, an adversary could take over the network by
  1176. creating many servers \cite{sybil}.) Instead, new nodes must be
  1177. approved by the directory administrator before they are included.
  1178. Mechanisms for automated node approval are an area of active research,
  1179. and are discussed more in section~\ref{sec:maintaining-anonymity}.
  1180. Of course, a variety of attacks remain. An adversary who controls a
  1181. directory server can track certain clients by providing different
  1182. information --- perhaps by listing only nodes under its control
  1183. as working, or by informing only certain clients about a given
  1184. node. Moreover, an adversary without control of a directory server can
  1185. still exploit differences among client knowledge. If Eve knows that
  1186. node $M$ is listed on server $D_1$ but not on $D_2$, she can use this
  1187. knowledge to link traffic through $M$ to clients who have queried $D_1$.
  1188. Thus these directory servers must be synchronized and redundant. The
  1189. software is distributed with the signature public key of each directory
  1190. server, and directories must be signed by a threshold of these keys.
  1191. The directory servers in Tor are modeled after those in Mixminion
  1192. \cite{minion-design}, but our situation is easier. First, we make the
  1193. simplifying assumption that all participants agree on who the
  1194. directory servers are. Second, Mixminion needs to predict node
  1195. behavior, whereas Tor only needs a threshold consensus of the current
  1196. state of the network.
  1197. % Cite dir-spec or dir-agreement?
  1198. Tor directory servers build a consensus directory through a simple
  1199. four-round broadcast protocol. In round one, each server dates and
  1200. signs its current opinion, and broadcasts it to the other directory
  1201. servers; then in round two, each server rebroadcasts all the signed
  1202. opinions it has received. At this point all directory servers check
  1203. to see whether any server has signed multiple opinions in the same
  1204. period. If so, the server is either broken or cheating, so protocol
  1205. stops and notifies the administrators, who either remove the cheater
  1206. or wait for the broken server to be fixed. If there are no
  1207. discrepancies, each directory server then locally computes algorithm
  1208. on the set of opinions, resulting in a uniform shared directory. In
  1209. round three servers sign this directory and broadcast it; and finally
  1210. in round four the servers rebroadcast the directory and all the
  1211. signatures. If any directory server drops out of the network, its
  1212. signature is not included on the file directory.
  1213. The rebroadcast steps ensure that a directory server is heard by
  1214. either all of the other servers or none of them, assuming that any two
  1215. directories can talk directly, or via a third directory (some of the
  1216. links between directory servers may be down). Broadcasts are feasible
  1217. because there are relatively few directory servers (currently 3, but we expect
  1218. to use as many as 9 as the network scales). The actual local algorithm
  1219. for computing the shared directory is a straightforward threshold
  1220. voting process: we include an OR if a majority of directory servers
  1221. believe it to be good.
  1222. When a client Alice retrieves a consensus directory, she uses it if it
  1223. is signed by a majority of the directory servers she knows.
  1224. Using directory servers rather than flooding provides simplicity and
  1225. flexibility. For example, they don't complicate the analysis when we
  1226. start experimenting with non-clique network topologies. And because
  1227. the directories are signed, they can be cached by other onion routers,
  1228. or indeed by any server. Thus directory servers are not a performance
  1229. bottleneck when we have many users, and do not aid traffic analysis by
  1230. forcing clients to periodically announce their existence to any
  1231. central point.
  1232. % Mention Hydra as an example of non-clique topologies. -NM, from RD
  1233. % also find some place to integrate that dirservers have to actually
  1234. % lay test circuits and use them, otherwise routers could connect to
  1235. % the dirservers but discard all other traffic.
  1236. % in some sense they're like reputation servers in \cite{mix-acc} -RD
  1237. \Section{Rendezvous points: location privacy}
  1238. \label{sec:rendezvous}
  1239. Rendezvous points are a building block for \emph{location-hidden
  1240. services} (also known as ``responder anonymity'') in the Tor
  1241. network. Location-hidden services allow a server Bob to a TCP
  1242. service, such as a webserver, without revealing the IP of his service.
  1243. Besides allowing Bob to provided services anonymously, location
  1244. privacy also seeks to provide some protection against DDoS attacks:
  1245. attackers are forced to attack the onion routing network as a whole
  1246. rather than just Bob's IP.
  1247. \subsection{Goals for rendezvous points}
  1248. \label{subsec:rendezvous-goals}
  1249. In addition to our other goals, have tried to provide the following
  1250. properties in our design for location-hidden servers:
  1251. \begin{tightlist}
  1252. \item[Flood-proof:] An attacker should not be able to flood Bob with traffic
  1253. simply by sending may requests to Bob's public location. Thus, Bob needs a
  1254. way to filter incoming requests.
  1255. \item[Robust:] Bob should be able to maintain a long-term pseudonymous
  1256. identity even in the presence of OR failure. Thus, Bob's identity must not
  1257. be tied to a single OR.
  1258. \item[Smear-resistant:] An attacker should not be able to use rendezvous
  1259. points to smear an OR. That is, if a social attacker tries to host a
  1260. location-hidden service that is illegal or disreputable, it should not
  1261. appear---even to a casual observer---that the OR is hosting that service.
  1262. \item[Application-transparent:] Although we are willing to require users to
  1263. run special software to access location-hidden servers, we are not willing
  1264. to require them to modify their applications.
  1265. \end{tightlist}
  1266. \subsection{Rendezvous design}
  1267. We provide location-hiding for Bob by allowing him to advertise
  1268. several onion routers (his \emph{Introduction Points}) as his public
  1269. location. (He may do this on any robust efficient distributed
  1270. key-value lookup system with authenticated updates, such as CFS
  1271. \cite{cfs:sosp01}\footnote{
  1272. Each onion router could run a node in this lookup
  1273. system; also note that as a stopgap measure, we can start by running a
  1274. simple lookup system on the directory servers.})
  1275. Alice, the client, chooses a node for her
  1276. \emph{Meeting Point}. She connects to one of Bob's introduction
  1277. points, informs him about her rendezvous point, and then waits for him
  1278. to connect to the rendezvous point. This extra level of indirection
  1279. helps Bob's introduction points avoid problems associated with serving
  1280. unpopular files directly, as could occur, for example, if Bob chooses
  1281. an introduction point in Texas to serve anti-ranching propaganda,
  1282. or if Bob's service tends to get DDoS'ed by network vandals.
  1283. The extra level of indirection also allows Bob to respond to some requests
  1284. and ignore others.
  1285. The steps of a rendezvous as follows. These steps are performed on
  1286. behalf of Alice and Bob by their local onion proxies, which they both
  1287. must run; application integration is described more fully below.
  1288. \begin{tightlist}
  1289. \item Bob chooses some introduction ppoints, and advertises them via
  1290. CFS (or some other distributed key-value publication system).
  1291. \item Bob establishes a Tor virtual circuit to each of his
  1292. Introduction Points, and waits.
  1293. \item Alice learns about Bob's service out of band (perhaps Bob told her,
  1294. or she found it on a website). She looks up the details of Bob's
  1295. service from CFS.
  1296. \item Alice chooses an OR to serve as a Rendezvous Point (RP) for this
  1297. transaction. She establishes a virtual circuit to her RP, and
  1298. tells it to wait for connections. [XXX how?]
  1299. \item Alice opens an anonymous stream to one of Bob's Introduction
  1300. Points, and gives it message (encrypted for Bob) which tells him
  1301. about herself, her chosen RP, and the first half of an ephemeral
  1302. key handshake. The Introduction Point sends the message to Bob.
  1303. \item Bob may decide to ignore Alice's request. [XXX Based on what?]
  1304. Otherwise, he creates a new virtual circuit to Alice's RP, and
  1305. authenticates himself. [XXX how?]
  1306. \item If the authentication is successful, the RP connects Alice's
  1307. virtual circuit to Bob's. Note that RP can't recognize Alice,
  1308. Bob, or the data they transmit (they share a session key).
  1309. \item Alice now sends a Begin cell along the circuit. It arrives at Bob's
  1310. onion proxy. Bob's onion proxy connects to Bob's webserver.
  1311. \item An anonymous stream has been established, and Alice and Bob
  1312. communicate as normal.
  1313. \end{tightlist}
  1314. [XXX We need to modify the above to refer people down to these next
  1315. paragraphs. -NM]
  1316. When establishing an introduction point, Bob provides the onion router
  1317. with a public ``introduction'' key. The hash of this public key
  1318. identifies a unique service, and (since Bob is required to sign his
  1319. messages) prevents anybody else from usurping Bob's introduction point
  1320. in the future. Bob uses the same public key when establishing the other
  1321. introduction points for that service.
  1322. The message that Alice gives the introduction point includes a hash of Bob's
  1323. public key to identify the service, an optional initial authentication
  1324. token (the introduction point can do prescreening, eg to block replays),
  1325. and (encrypted to Bob's public key) the location of the rendezvous point,
  1326. a rendezvous cookie Bob should tell RP so he gets connected to
  1327. Alice, an optional authentication token so Bob can choose whether to respond,
  1328. and the first half of a DH key exchange. When Bob connects to RP
  1329. and gets connected to Alice's pipe, his first cell contains the
  1330. other half of the DH key exchange.
  1331. The authentication tokens can be used to provide selective access to users
  1332. proportional to how important it is that they main uninterrupted access
  1333. to the service. During normal situations, Bob's service might simply be
  1334. offered directly from mirrors; Bob can also give out authentication cookies
  1335. to high-priority users. If those mirrors are knocked down by DDoS attacks,
  1336. those users can switch to accessing Bob's service via the Tor
  1337. rendezvous system.
  1338. \SubSection{Integration with user applications}
  1339. For each service Bob offers, he configures his local onion proxy to know
  1340. the local IP and port of the server, a strategy for authorizing Alices,
  1341. and a public key. Bob publishes
  1342. the public key, an expiration
  1343. time (``not valid after''), and the current introduction points for
  1344. his
  1345. service into CFS, all indexed by the hash of the public key
  1346. Note that Bob's webserver is unmodified, and doesn't even know
  1347. that it's hidden behind the Tor network.
  1348. Because Alice's applications must work unchanged, her client interface
  1349. remains a SOCKS proxy. Thus we must encode all of the necessary
  1350. information into the fully qualified domain name Alice uses when
  1351. establishing her connections. Location-hidden services use a virtual
  1352. top level domain called `.onion': thus hostnames take the form
  1353. x.y.onion where x encodes the hash of PK, and y is the authentication
  1354. cookie. Alice's onion proxy examines hostnames and recognizes when
  1355. they're destined for a hidden server. If so, it decodes the PK and
  1356. starts the rendezvous as described in the table above.
  1357. \subsection{Previous rendezvous work}
  1358. Ian Goldberg developed a similar notion of rendezvous points for
  1359. low-latency anonymity systems \cite{ian-thesis}. His ``service tags''
  1360. play the same role in his design as the hashes of services' public
  1361. keys play in ours. We use public key hashes so that they can be
  1362. self-authenticating, and so the client can recognize the same service
  1363. with confidence later on. His design also differs from ours in the
  1364. following ways: First, Goldberg suggests that the client should
  1365. manually hunt down a current location of the service via Gnutella;
  1366. whereas our use of the DHT makes lookup faster, more robust, and
  1367. transparent to the user. Second, in Tor the client and server
  1368. negotiate ephemeral keys via Diffie-Hellman, so at no point in the
  1369. path is the plaintext exposed. Third, our design tries to minimize the
  1370. exposure associated with running the service, so as to make volunteers
  1371. more willing to offer introduction and rendezvous point services.
  1372. Tor's introduction points do not output any bytes to the clients, and
  1373. the rendezvous points don't know the client, the server, or the data
  1374. being transmitted. The indirection scheme is also designed to include
  1375. authentication/authorization---if the client doesn't include the right
  1376. cookie with its request for service, the server need not even
  1377. acknowledge its existence.
  1378. \Section{Analysis}
  1379. \label{sec:analysis}
  1380. In this section, we discuss how well Tor meets our stated design goals
  1381. and its resistance to attacks.
  1382. \SubSection{Meeting Basic Goals}
  1383. \begin{tightlist}
  1384. \item [Basic Anonymity:] Because traffic is encrypted, changing in
  1385. appearance, and can flow from anywhere to anywhere within the
  1386. network, a simple observer that cannot see both the initiator
  1387. activity and the corresponding activity where the responder talks to
  1388. the network will not be able to link the initiator and responder.
  1389. Nor is it possible to directly correlate any two communication
  1390. sessions as coming from a single source without additional
  1391. information. Resistance to specific anonymity threats will be discussed
  1392. below.
  1393. \item[Deployability:] Tor requires no specialized hardware. Tor
  1394. requires no kernel modifications; it runs in user space (currently
  1395. on Linux, various BSDs, and Windows). All of these imply a low
  1396. technical barrier to running a Tor node. There is an assumption that
  1397. Tor nodes have good relatively persistent net connectivity
  1398. (currently T1 or better);
  1399. % Is that reasonable to say? We haven't really discussed it -P.S.
  1400. however, there is no padding overhead, and operators can limit
  1401. bandwidth on any link. Tor is freely available under the modified
  1402. BSD license, and operators are able to choose there own exit
  1403. strategies. These reduce legal and social liability barriers to
  1404. running a node.
  1405. \item[Usability:] As noted, Tor runs in user space. So does the onion
  1406. proxy, which is easy to install and run. And SOCKS aware
  1407. applications require nothing more than to be pointed at this proxy.
  1408. \item[Flexibility:] Tor's design and implementation is modular. So,
  1409. for example, a scalable P2P replacement for the directory servers
  1410. would not substantially impact other aspects of the system. Tor
  1411. runs on top of TCP, so design options that could not easily do so
  1412. would be difficult to test on the current network. However, most
  1413. low-latency protocols are designed to run over TCP. We are currently
  1414. discussing with the designers of Morphmix interoperability of the
  1415. two systems, which seems to be relatively straightforward. This will
  1416. allow testing and direct comparison of the two rather different
  1417. designs.
  1418. \item[Conservative design:] Tor opts for practicality when there is no
  1419. clear resolution of anonymity tradeoffs or practical means to
  1420. achieve resolution. Thus, we do not currently pad or mix; although
  1421. it would be easy to add either of these. Indeed, our system allows
  1422. longrange and variable padding if this should ever be shown to have
  1423. a clear advantage. Similarly, we do not currently attempt to
  1424. resolve such issues as pseudospoofing to dominate the network except
  1425. by such direct means as personal familiarity of director operators
  1426. with all node operators.
  1427. \end{tightlist}
  1428. \SubSection{Attacks and Defenses}
  1429. \label{sec:attacks}
  1430. Below we summarize a variety of attacks and how well our design withstands
  1431. them.
  1432. \subsubsection*{Passive attacks}
  1433. \begin{tightlist}
  1434. \item \emph{Observing user traffic patterns.} Observations of connection
  1435. between an end user and a first onion router will not reveal to whom
  1436. the user is connecting or what information is being sent. It will
  1437. reveal patterns of user traffic (both sent and received). Simple
  1438. profiling of user connection patterns is not generally possible,
  1439. however, because multiple application connections (streams) may be
  1440. operating simultaneously or in series over a single circuit. Thus,
  1441. further processing is necessary to try to discern even these usage
  1442. patterns.
  1443. \item \emph{Observing user content.} At the user end, content is
  1444. encrypted; however, connections from the network to arbitrary
  1445. websites may not be. Further, a responding website may itself be
  1446. considered an adversary. Filtering content is not a primary goal of
  1447. Onion Routing; nonetheless, Tor can directly make use of Privoxy and
  1448. related services via SOCKS and thus provide their application data
  1449. stream anonymization.
  1450. \item \emph{Option distinguishability.} Configuration options can be a
  1451. source of distinguishable patterns. In general there is economic
  1452. incentive to allow preferential services \cite{econymics}, and some
  1453. degree of configuration choice is a factor in attracting large
  1454. numbers of users to provide anonymity. We offer a standardized set
  1455. of client option configurations to maximize attractiveness of the
  1456. system while minimizing affect on anonymity set size.
  1457. % This needs to go into the spec at least, yes? How else are we
  1458. % making this true? -PS
  1459. \item \emph{End-to-end Timing correlation.} Onion Routing only
  1460. minimally hides end-to-end timing correlations. If an attacker
  1461. suspects communication between a given initiator and responder, and
  1462. can watch patterns of traffic at the initiator end and the responder
  1463. end, then he will be able to confirm the correspondence with high
  1464. probability. The greatest protection currently against such
  1465. confirmation is if the connection between the onion proxy and the
  1466. first Tor node is hidden, e.g., because it is local or behind a
  1467. firewall. Except for obscuring multiple users behind one such
  1468. firewall, this just requires the observer to separate the traffic
  1469. that terminates at the onion router from that which passes through
  1470. it, and to filter the greater volume of terminating traffic than a
  1471. single initiator would multiplex. We do not expect that to be a
  1472. large problem for an attacker who can observe traffic at both ends
  1473. of an application connection.
  1474. \item \emph{End-to-end Size correlation.} Simple packet counting
  1475. without timing consideration will also be somewhat effective in
  1476. confirming endpoints of a connection through Onion Routing; although
  1477. slightly less so. This is because, even without padding, the leaky
  1478. pipe topology means different numbers of packets may enter one end
  1479. of a circuit than exit at the other.
  1480. \item \emph{Website fingerprinting.} All the above passive
  1481. attacks that are at all effective are traffic confirmation attacks.
  1482. This puts them outside our general design goals. There is also
  1483. passive traffic analysis attack that is potentially effective.
  1484. Instead of searching far end connections for timing and volume
  1485. correlations it is possible to build up a database of
  1486. ``fingerprints'' for large numbers of websites. If one now wants to
  1487. monitor the activity of a user, it may be possible to confirm a
  1488. connection to a site simply by consulting the database. This has
  1489. been shown to be effective against SafeWeb \cite{hintz-pet02}. Onion
  1490. Routing is not as vulnerable as SafeWeb to this attack: There is the
  1491. possibility that multiple streams are exiting the circuit at
  1492. different places concurrently. Also, fingerprinting is limited to
  1493. the granularity of cells, currently 256 bytes. Larger cell sizes
  1494. and/or minimal padding schemes that group websites into large sets
  1495. are possible responses. But this remains an open problem. Note that
  1496. such fingerprinting should not be confused with the latency attacks
  1497. of \cite{back01}. Those require a fingerprint of the latencies of
  1498. all circuits through the network, combined with those from the
  1499. network edges to the targetted user and the responder website. While
  1500. these are in principal feasible and surprises are always possible,
  1501. these constitute a much more complicated attack, and there is no
  1502. current evidence of their practicality.
  1503. \item Content analysis. Not our main thing, but, Privoxy to
  1504. anonymization of data stream.
  1505. \end{tightlist}
  1506. \subsubsection*{Active attacks}
  1507. \begin{tightlist}
  1508. \item \emph{Key compromise.} Onion Routing makes use of several kinds
  1509. of keys. Links between Tor nodes are protected by TLS negotiated
  1510. session keys over which all traffic is multiplexed. Long-term
  1511. signature keys sign information about Tor nodes, directory servers
  1512. and the like. Medium-term encryption keys are used to send a
  1513. Diffie-Hellman key from an onion proxy to an onion router. And,
  1514. session keys encrypt traffic between onion routers and the onion
  1515. proxy. Session key compromise will obviate for the lifetime of the
  1516. circuit the change in appearance of cells on a circuit passing
  1517. through a specific onion router if that compromise is done by the
  1518. immediate neighboring onion routers in a circuit. Compromise of the
  1519. mid-term keys will result in a similar compromise of all session
  1520. keys until the mid-term key changes. Note that, because of perfect
  1521. forward secrecy, this does not affect previously established keys or
  1522. indeed any session keys unless the node is also compromised.
  1523. Compromise of a long-term key means that all information about a
  1524. node can be forged following the compromise. This includes what the
  1525. correct mid-term keys are, and in the case of directory servers,
  1526. information about which nodes are in the network, which keys they
  1527. are current for those nodes, etc.
  1528. \item \emph{Iterated subpoena.} A roving adversary can march down the
  1529. length of a circuit compromising the nodes until he reaches both of
  1530. the endpoints. In \cite{or-pet00} the algorithmic structure of this
  1531. attack was described. But, only the unlikely case of compromise
  1532. during the lifetime of a circuit was considered. Far more likely is
  1533. that nodes in a circuit will be compromised after the fact, by legal
  1534. means, rubber-hose cryptanalysis, etc. Perfect forward secrecy of
  1535. session keys makes this attack unaffective against Tor as long as
  1536. Diffie-Hellman keys are discarded as soon as they are no longer
  1537. needed.
  1538. \item \emph{Run recipient.} By running a Web server, an adversary can
  1539. try to identify the initiator of connections to it and possibly also
  1540. attrack users to itself by providing attractive content. There is
  1541. always a danger that the application protocols and associated
  1542. programs can be induced to reveal information about the initiator's
  1543. system. This is not directly in Onion Routing's protection area, so,
  1544. to the extent it is a concern, we are dependent on Privoxy and
  1545. others to keep up with the issue. A Web server can also attempt to
  1546. provide recognizable volume and timing signatures. This is simply a
  1547. stronger version of the passive confirmation adversary against which
  1548. we already acknowledged vulnerability.
  1549. \item \emph{Run an onion proxy.} It is expected that end users will
  1550. nearly always run their own local onion proxy. However, in some
  1551. settings, it may be necessary for the proxy to run remotely.
  1552. Typically this would be in a secure setting where it was necessary
  1553. to monitor the activity of those connecting to the proxy. But, if
  1554. the onion proxy is compromised, then all future connections through
  1555. it are completely compromised.
  1556. \item \emph{Run a hostile node.} A hostile node can reveal everything
  1557. about circuits passing through it. It can also create circuits
  1558. through itself to affect traffic at other nodes. Its ability to
  1559. directly DoS a neighbor is now limited by bandwidth throttling. It
  1560. can enhance the amount of network traffic it can see by attacking
  1561. other nodes sufficiently to shut them down or greatly reduce their
  1562. service. Nonetheless, in terms of compromising anonymity of the
  1563. endpoints of a circuit by its observations, a hostile node is only
  1564. significant if it is immediately adjacent to that endpoint.
  1565. \item \emph{Compromise entire path.} Anyone compromising both
  1566. endpoints of a circuit can confirm this with high probability. If
  1567. the entire path is compromised, this becomes a certainty; however,
  1568. the added benefit to the adversary of such an attack is such that it
  1569. is most likely only as a coincidence.
  1570. \item \emph{Run a hostile directory server.} Directory servers control
  1571. admission to the network. However, because the network directory
  1572. must be signed by a majority of servers, the threat of a single
  1573. hostile server is minimized.
  1574. \item \emph{Selectively DoS a Tor node.} As noted, neighbors are
  1575. bandwidth limited; however, it is possible to open up sufficient
  1576. numbers of circuits that converge at a single onion router to
  1577. overwhelm its network connection, its ability to process new
  1578. circuits or both. This threat is diminished by router twins since
  1579. now the attack must be run on all twins of the attacked node to be
  1580. successful.
  1581. %OK so I noticed that twins are completely removed from the paper above,
  1582. % but it's after 5 so I'll leave that problem to you guys. -PS
  1583. \item \emph{Introduce timing into messages.} This is simply a stronger
  1584. version of passive timing attacks already discussed above.
  1585. \item \emph{Tagging attacks.} A hostile node could try to ``tag'' a
  1586. cell by altering it. This would render it unreadable, but if the
  1587. connection is, e.g., an unencrypted one to a Web site, the garbled
  1588. content coming out at the appropriate time could confirm the
  1589. association. However, integrity checks on cells will prevent this
  1590. from succeeding.
  1591. [XXXX Damn it's 5:10. So, I'm stopping here. Good luck with what's left
  1592. tonight. Hopefully less than it looks. -PS]
  1593. \item sub of the above on exit policy\\
  1594. Partitioning based on exit policy.
  1595. Run a rare exit server/something other people won't allow.
  1596. DOS three of the 4 who would allow a certain exit.
  1597. Subcase of running a hostile node:
  1598. the exit node can change the content you're getting to try to
  1599. trick you. similarly, when it rejects you due to exit policy,
  1600. it could give you a bad IP that sends you somewhere else.
  1601. \item \emph{replaying traffic} Can't in Tor. NonSSL anonymizer.
  1602. \item Do bad things with the Tor network, so we are hated and
  1603. get shut down. Now the user you want to watch has to use anonymizer.
  1604. Exit policy's are a start.
  1605. \item Send spam through the network. Exit policy (no open relay) and
  1606. rate limiting. We won't send to more than 8 people at a time. See
  1607. section 5.1.
  1608. we rely on DNS being globally consistent. if people in africa resolve
  1609. IPs differently, then asking to extend a circuit to a certain IP can
  1610. give away your origin.
  1611. \end{tightlist}
  1612. \subsubsection*{Directory attacks}
  1613. \begin{tightlist}
  1614. \item knock out a dirserver
  1615. \item knock out half the dirservers
  1616. \item trick user into using different software (with different dirserver
  1617. keys)
  1618. \item OR connects to the dirservers but nowhere else
  1619. \item foo
  1620. \end{tightlist}
  1621. \subsubsection*{Attacks against rendezvous points}
  1622. \begin{tightlist}
  1623. \item foo
  1624. \end{tightlist}
  1625. Basic
  1626. How well do we resist chosen adversary?
  1627. How well do we meet stated goals?
  1628. Mention jurisdictional arbitrage.
  1629. Pull attacks and defenses into analysis as a subsection
  1630. \Section{Open Questions in Low-latency Anonymity}
  1631. \label{sec:maintaining-anonymity}
  1632. % There must be a better intro than this! -NM
  1633. In addition to the open problems discussed in
  1634. section~\ref{subsec:non-goals}, many other questions remain to be
  1635. solved by future research before we can be truly confident that we
  1636. have built a secure low-latency anonymity service.
  1637. Many of these open issues are questions of balance. For example,
  1638. how often should users rotate to fresh circuits? Too-frequent
  1639. rotation is inefficient and expensive, but too-infrequent rotation
  1640. makes the user's traffic linkable. Instead of opening a fresh
  1641. circuit; clients can also limit linkability exit from a middle point
  1642. of the circuit, or by truncating and re-extending the circuit, but
  1643. more analysis is needed to determine the proper trade-off.
  1644. [XXX mention predecessor attacks?]
  1645. A similar question surrounds timing of directory operations:
  1646. how often should directories be updated? With too-infrequent
  1647. updates clients receive an inaccurate picture of the network; with
  1648. too-frequent updates the directory servers are overloaded.
  1649. %do different exit policies at different exit nodes trash anonymity sets,
  1650. %or not mess with them much?
  1651. %
  1652. %% Why would they? By routing traffic to certain nodes preferentially?
  1653. [XXX Choosing paths and path lengths: I'm not writing this bit till
  1654. Arma's pathselection stuff is in. -NM]
  1655. %%%% Roger said that he'd put a path selection paragraph into section
  1656. %%%% 4 that would replace this.
  1657. %
  1658. %I probably should have noted that this means loops will be on at least
  1659. %five hop routes, which should be rare given the distribution. I'm
  1660. %realizing that this is reproducing some of the thought that led to a
  1661. %default of five hops in the original onion routing design. There were
  1662. %some different assumptions, which I won't spell out now. Note that
  1663. %enclave level protections really change these assumptions. If most
  1664. %circuits are just two hops, then just a single link observer will be
  1665. %able to tell that two enclaves are communicating with high probability.
  1666. %So, it would seem that enclaves should have a four node minimum circuit
  1667. %to prevent trivial circuit insider identification of the whole circuit,
  1668. %and three hop minimum for circuits from an enclave to some nonclave
  1669. %responder. But then... we would have to make everyone obey these rules
  1670. %or a node that through timing inferred it was on a four hop circuit
  1671. %would know that it was probably carrying enclave to enclave traffic.
  1672. %Which... if there were even a moderate number of bad nodes in the
  1673. %network would make it advantageous to break the connection to conduct
  1674. %a reformation intersection attack. Ahhh! I gotta stop thinking
  1675. %about this and work on the paper some before the family wakes up.
  1676. %On Sat, Oct 25, 2003 at 06:57:12AM -0400, Paul Syverson wrote:
  1677. %> Which... if there were even a moderate number of bad nodes in the
  1678. %> network would make it advantageous to break the connection to conduct
  1679. %> a reformation intersection attack. Ahhh! I gotta stop thinking
  1680. %> about this and work on the paper some before the family wakes up.
  1681. %This is the sort of issue that should go in the 'maintaining anonymity
  1682. %with tor' section towards the end. :)
  1683. %Email from between roger and me to beginning of section above. Fix and move.
  1684. Throughout this paper, we have assumed that end-to-end traffic
  1685. analysis cannot yet be defeated. But even high-latency anonymity
  1686. systems can be vulnerable to end-to-end traffic analysis, if the
  1687. traffic volumes are high enough, and if users' habits are sufficiently
  1688. distinct \cite{limits-open,statistical-disclosure}. \emph{What can be
  1689. done to limit the effectiveness of these attacks against low-latency
  1690. systems?} Tor already makes some effort to conceal the starts and
  1691. ends of streams by wrapping all long-range control commands in
  1692. identical-looking relay cells, but more analysis is needed. Link
  1693. padding could frustrate passive observer who count packets; long-range
  1694. padding could work against observers who own the first hop in a
  1695. circuit. But more research needs to be done in order to find an
  1696. efficient and practical approach. Volunteers prefer not to run
  1697. constant-bandwidth padding; but more sophisticated traffic shaping
  1698. approaches remain somewhat unanalyzed. [XXX is this so?] Recent work
  1699. on long-range padding \cite{defensive-dropping} shows promise. One
  1700. could also try to reduce correlation in packet timing by batching and
  1701. re-ordering packets, but it is unclear whether this could improve
  1702. anonymity without introducing so much latency as to render the
  1703. network unusable.
  1704. Even if passive timing attacks were wholly solved, active timing
  1705. attacks would remain. \emph{What can
  1706. be done to address attackers who can introduce timing patterns into
  1707. a user's traffic?} [XXX mention likely approaches]
  1708. %%% I think we cover this by framing the problem as ``Can we make
  1709. %%% end-to-end characteristics of low-latency systems as good as
  1710. %%% those of high-latency systems?'' Eliminating long-term
  1711. %%% intersection is a hard problem.
  1712. %
  1713. %Even regardless of link padding from Alice to the cloud, there will be
  1714. %times when Alice is simply not online. Link padding, at the edges or
  1715. %inside the cloud, does not help for this.
  1716. In order to scale to large numbers of users, and to prevent an
  1717. attacker from observing the whole network at once, it may be necessary
  1718. for low-latency anonymity systems to support far more servers than Tor
  1719. currently anticipates. This introduces several issues. First, if
  1720. approval by a centralized set of directory servers is no longer
  1721. feasible, what mechanism should be used to prevent adversaries from
  1722. signing up many spurious servers?
  1723. Second, if clients can no longer have a complete
  1724. picture of the network at all times, how can should they perform
  1725. discovery while preventing attackers from manipulating or exploiting
  1726. gaps in client knowledge? Third, if there are to many servers
  1727. for every server to constantly communicate with every other, what kind
  1728. of non-clique topology should the network use? Restricted-route
  1729. topologies promise comparable anonymity with better scalability
  1730. \cite{danezis-pets03}, but whatever topology we choose, we need some
  1731. way to keep attackers from manipulating their position within it.
  1732. Fourth, since no centralized authority is tracking server reliability,
  1733. How do we prevent unreliable servers from rendering the network
  1734. unusable? Fifth, do clients receive so much anonymity benefit from
  1735. running their own servers that we should expect them all to do so, or
  1736. do we need to find another incentive structure to motivate them?
  1737. (Tarzan and Morphmix present possible solutions.)
  1738. [[ XXX how to approve new nodes (advogato, sybil, captcha (RTT));]
  1739. Alternatively, it may be the case that one of these problems proves
  1740. intractable, or that the drawbacks to many-server systems prove
  1741. greater than the benefits. Nevertheless, we may still do well to
  1742. consider non-clique topologies. A cascade topology may provide more
  1743. defense against traffic confirmation confirmation.
  1744. % Why would it? Cite. -NM
  1745. Does the hydra (many inputs, few outputs) topology work
  1746. better? Are we going to get a hydra anyway because most nodes will be
  1747. middleman nodes?
  1748. %%% Do more with this paragraph once The TCP-over-TCP paragraph is
  1749. %%% more integrated into Related works.
  1750. %
  1751. As mentioned in section\ref{where-is-it-now}, Tor could improve its
  1752. robustness against node failure by buffering stream data at the
  1753. network's edges, and performing end-to-end acknowledgments. The
  1754. efficacy of this approach remains to be tested, however, and there
  1755. may be more effective means for ensuring reliable connections in the
  1756. presence of unreliable nodes.
  1757. %%% Keeping this original paragraph for a little while, since it
  1758. %%% is not the same as what's written there now.
  1759. %
  1760. %Because Tor depends on TLS and TCP to provide a reliable transport,
  1761. %when one of the servers goes down, all the circuits (and thus streams)
  1762. %traveling over that server must break. This reduces anonymity because
  1763. %everybody needs to reconnect right then (does it? how much?) and
  1764. %because exit connections all break at the same time, and it also harms
  1765. %usability. It seems the problem is even worse in a peer-to-peer
  1766. %environment, because so far such systems don't really provide an
  1767. %incentive for nodes to stay connected when they're done browsing, so
  1768. %we would expect a much higher churn rate than for onion routing.
  1769. %there ways of allowing streams to survive the loss of a node in the
  1770. %path?
  1771. % Roger or Paul suggested that we say something about incentives,
  1772. % too, but I think that's a better candidate for our future work
  1773. % section. After all, we will doubtlessly learn very much about why
  1774. % people do or don't run and use Tor in the near future. -NM
  1775. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1776. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1777. \Section{Future Directions}
  1778. \label{sec:conclusion}
  1779. % Mention that we need to do TCP over tor for reliability.
  1780. Tor brings together many innovations into
  1781. a unified deployable system. But there are still several attacks that
  1782. work quite well, as well as a number of sustainability and run-time
  1783. issues remaining to be ironed out. In particular:
  1784. % Many of these (Scalability, cover traffic) are duplicates from open problems.
  1785. %
  1786. \begin{itemize}
  1787. \item \emph{Scalability:} Tor's emphasis on design simplicity and
  1788. deployability has led us to adopt a clique topology, a
  1789. semi-centralized model for directories and trusts, and a
  1790. full-network-visibility model for client knowledge. None of these
  1791. properties will scale to more than a few hundred servers, at most.
  1792. Promising approaches to better scalability exist (see
  1793. section~\ref{sec:maintaining-anonymity}), but more deployment
  1794. experience would be helpful in learning the relative importance of
  1795. these bottlenecks.
  1796. \item \emph{Cover traffic:} Currently we avoid cover traffic because
  1797. of its clear costs in performance and bandwidth, and because its
  1798. security benefits have not well understood. With more research
  1799. \cite{SS03,defensive-dropping}, the price/value ratio may change,
  1800. both for link-level cover traffic and also long-range cover traffic.
  1801. \item \emph{Better directory distribution:} Even with the threshold
  1802. directory agreement algorithm described in \ref{subsec:dirservers},
  1803. the directory servers are still trust bottlenecks. We must find more
  1804. decentralized yet practical ways to distribute up-to-date snapshots of
  1805. network status without introducing new attacks. Also, directory
  1806. retrieval presents a scaling problem, since clients currently
  1807. download a description of the entire network state every 15
  1808. minutes. As the state grows larger and clients more numerous, we
  1809. may need to move to a solution in which clients only receive
  1810. incremental updates to directory state, or where directories are
  1811. cached at the ORs to avoid high loads on the directory servers.
  1812. \item \emph{Implementing location-hidden servers:} While
  1813. Section~\ref{sec:rendezvous} describes a design for rendezvous
  1814. points and location-hidden servers, these feature has not yet been
  1815. implemented. While doing so, will likely encounter additional
  1816. issues, both in terms of usability and anonymity, that must be
  1817. resolved.
  1818. \item \emph{Further specification review:} Although we have a public,
  1819. byte-level specification for the Tor protocols, this protocol has
  1820. not received extensive external review. We hope that as Tor
  1821. becomes more widely deployed, more people will become interested in
  1822. examining our specification.
  1823. \item \emph{Wider-scale deployment:} The original goal of Tor was to
  1824. gain experience in deploying an anonymizing overlay network, and
  1825. learn from having actual users. We are now at the point in design
  1826. and development where we can start deploying a wider network. Once
  1827. we have are ready for actual users, we will doubtlessly be better
  1828. able to evaluate some of our design decisions, including our
  1829. robustness/latency tradeoffs, our abuse-prevention mechanisms, and
  1830. our overall usability.
  1831. \end{itemize}
  1832. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1833. %% commented out for anonymous submission
  1834. %\Section{Acknowledgments}
  1835. % Peter Palfrader for editing
  1836. % Bram Cohen for congestion control discussions
  1837. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1838. \bibliographystyle{latex8}
  1839. \bibliography{tor-design}
  1840. \end{document}
  1841. % Style guide:
  1842. % U.S. spelling
  1843. % avoid contractions (it's, can't, etc.)
  1844. % prefer ``for example'' or ``such as'' to e.g.
  1845. % prefer ``that is'' to i.e.
  1846. % 'mix', 'mixes' (as noun)
  1847. % 'mix-net'
  1848. % 'mix', 'mixing' (as verb)
  1849. % 'middleman' [Not with a hyphen; the hyphen has been optional
  1850. % since Middle English.]
  1851. % 'nymserver'
  1852. % 'Cypherpunk', 'Cypherpunks', 'Cypherpunk remailer'
  1853. % 'Onion Routing design', 'onion router' [note capitalization]
  1854. % 'SOCKS'
  1855. % Try not to use \cite as a noun.
  1856. % 'Authorizating' sounds great, but it isn't a word.
  1857. % 'First, second, third', not 'Firstly, secondly, thridly'.
  1858. %
  1859. % 'Substitute ``Damn'' every time you're inclined to write ``very;'' your
  1860. % editor will delete it and the writing will be just as it should be.'
  1861. % -- Mark Twain