You are on page 1of 15

Anonymous Connections and Onion Routing


Michael G. Reed, Paul F. Syverson, and David M. Goldschlag

Naval Research Laboratory

Abstract reveal who they are communicating with to the rest of


the world. In certain cases anonymity may be desir-
Onion Routing is an infrastructure for private com- able also: anonymous e-cash is not very anonymous if
munication over a public network. It provides anony- delivered with a return address. Web based shopping
mous connections that are strongly resistant to both or browsing of public databases should not require re-
eavesdropping and trac analysis. Onion routing's vealing one's identity.
anonymous connections are bidirectional and near real- This paper describes how a freely available system,
time, and can be used anywhere a socket connection onion routing , can be used to protect a variety of In-
can be used. Any identifying information must be in ternet services against both eavesdropping and trac
the data stream carried over an anonymous connec- analysis attacks, from both the network and outside ob-
tion. An onion is a data structure that is treated as the servers. This paper includes a speci cation sucient to
destination address by onion routers; thus, it is used guide both re-implementations and new applications of
to establish an anonymous connection. Onions them- onion routing. We also discuss con gurations of onion
selves appear di erently to each onion router as well as routing networks and applications of onion routing, in-
to network observers. The same goes for data carried cluding Virtual Private Networks (VPN), Web brows-
over the connections they establish. Proxy aware ap- ing, e-mail, remote login, and electronic cash.1
plications, such as web browsing and e-mail, require no A purpose of trac analysis is to reveal who is talk-
modi cation to use onion routing, and do so through ing to whom. The anonymous connections described
a series of proxies. A prototype onion routing network here are designed to be resistant to trac analysis, i.e.,
is running between our lab and other sites. This paper to make it dicult for observers to learn identifying in-
describes anonymous connections and their implemen- formation from the connection (e.g., by reading packet
tation using onion routing. This paper also describes headers, tracking encrypted payloads, etc.). Any iden-
several application proxies for onion routing, as well as tifying information must be passed as data through
con gurations of onion routing networks. the anonymous connections. Our implementation of
anonymous connections, onion routing, provides pro-
tection against eavesdropping as a side e ect. Onion
1 Introduction routing provides bidirectional and near real-time com-
munication similar to TCP/IP socket connections or
Is Internet communication private? Most security ATM AAL5 [6]. The anonymous connections can sub-
concerns focus on preventing eavesdropping [18], i.e., stitute for sockets in a wide variety of unmodi ed Inter-
outsiders listening in on electronic conversations. But net applications by means of proxies. Data may also be
encrypted messages can still be tracked, revealing who passed through a privacy lter before being sent over
is talking to whom. This tracking is called trac analy- an anonymous connection. This removes identifying
sis and may reveal sensitive information. For example, information from the data stream, to make communi-
the existence of inter-company collaboration may be cation anonymous too.
con dential. Similarly, e-mail users may not wish to Although onion routing may be used for anony-
mous communication, it di ers from anonymous re-
 Address: (For Reed and Syverson) Naval Research Labo-
mailers [7, 16] in two ways: Communication is real-time
ratory, Center For High Assurance Computer Systems, Wash- and bidirectional, and the anonymous connections are
ington, D.C. 20375-5337, USA, phone: +1 202.767.2389, fax:
+1 202.404.7942, e-mail: flast nameg@itd.nrl.navy.mil. (For application independent. Onion routing's anonymous
Goldschlag) Divx, 570 Herndon Parkway, Herndon, VA 20170,
USA, phone: +1 703-708-4028. fax: +1 703-708-4088, e-mail: 1 Preliminary versions of portions of this paper have appeared
david.goldschlag@divx.com in [28, 14, 24].

1
connections can support anonymous mail as well as 2.1 Operational Overview
other applications. For example, onion routing may be
used for anonymous Web browsing. A user may wish to The onion routing network is accessed via a series
browse public Web sites without revealing his identity of proxies . An initiating application makes a socket
to those Web sites. That requires removing informa- connection to an application proxy . This proxy mas-
tion that identi es him from his requests to Web servers sages connection message format (and later data) to a
and removing information from the connection itself generic form that can be passed through the onion rout-
that may identify him. Hence, anonymous Web brows- ing network. It then connects to an onion proxy , which
ing uses anonymized communication over anonymous de nes a route through the onion routing network by
connections. The Anonymizer [1] only anonymizes the constructing a layered data structure called an onion .
data stream, not the connection itself. So it does not The onion is passed to the entry funnel , which occu-
prevent trac analysis attacks like tracking data as it pies one of the longstanding connections to an onion
moves through the network. router and multiplexes connections to the onion rout-
This paper is organized in the following way: Sec- ing network at that onion router. That onion router
tion 2 presents an overview of onion routing. Section will be the one for whom the outermost layer of the
3 presents empirical data about our prototype. Sec- onion is intended. Each layer of the onion de nes the
tion 4 de nes our threat model. Section 5 describes next hop in a route. An onion router that receives an
onion routing and the application speci c proxies in onion peels o its layer, identi es the next hop, and
more detail. Section 6 describes the implementation sends the embedded onion to that onion router. The
choices that were made for security reasons. Section 7 last onion router forwards data to an exit funnel , whose
describes how onion routing may be used in a wide va- job is to pass data between the onion routing network
riety of Internet applications. Section 8 contrasts onion and the responder.
routing with related work, and section 9 presents con- In addition to carrying next hop information, each
cluding remarks. onion layer contains key seed material from which keys
are generated for crypting2 data sent forward or back-
ward along the anonymous connection. (We de ne for-
2 Onion Routing Overview ward to be the direction in which the onion travels and
backward as the opposite direction.)
In onion routing, instead of making socket connec- Once the anonymous connection is established, it
tions directly to a responding machine, initiating ap- can carry data. Before sending data over an anony-
plications make connections through a sequence of ma- mous connection, the onion proxy adds a layer of en-
chines called onion routers . The onion routing net- cryption for each onion router in the route. As data
work allows the connection between the initiator and moves through the anonymous connection, each onion
responder to remain anonymous. Anonymous connec- router removes one layer of encryption, so it arrives at
tions hide who is connected to whom, and for what the responder as plaintext. This layering occurs in the
purpose, from both outside eavesdroppers and com- reverse order for data moving back to the initiator. So
promised onion routers. If the initiator also wants to data that has passed backward through the anonymous
remain anonymous to the responder, then all identify- connection must be repeatedly post-crypted to obtain
ing information must be removed from the data stream the plaintext.
before being sent over the anonymous connection. By layering cryptographic operations in this way,
Onion routers in the network are connected by long- we gain an advantage over link encryption. As data
standing (permanent) socket connections. Anonymous moves through the network it appears di erent to each
connections through the network are multiplexed over onion router. Therefore, an anonymous connection is
the longstanding connections. For any anonymous con- as strong as its strongest link, and even one honest node
nection, the sequence of onion routers in a route is is enough to maintain the privacy of the route. In link
strictly de ned at connection setup. However, each encrypted systems, compromised nodes can cooperate
onion router can only identify the previous and next to uncover route information.
hops along a route. Data passed along the anonymous Onion routers keep track of received onions until
connection appears di erent at each onion router, so they expire. Replayed or expired onions are not for-
data cannot be tracked en route, and compromised warded, so they cannot be used to uncover route in-
onion routers cannot cooperate by correlating the data formation, either by outsiders or compromised onion
stream each sees. We will also see that they cannot 2 We de ne the verb crypt to mean the application of a cryp-
make use of replayed onions or replayed data. tographic operation, be it encryption or decryption.

2
routers. Note that clock skew between onion routers tracking of trac originating or terminating within the
can only cause an onion router to reject a fresh onion sensitive site, this onion router should also route data
or to keep track of processed onions longer than nec- between other onion routers. This con guration might
essary. Also, since data is encrypted using stream ci- represent the system interface from a typical corporate
phers, replayed data will look di erent each time it or government site. Here the application proxies (to-
passes through a properly operating onion router. gether with any privacy lters), and the onion proxies
Although we call this system onion routing, the would typically live at the rewall as well. (Typically,
routing that occurs here does so at the application there might only be one onion proxy.)
layer of the protocol stack and not at the IP layer. There are three important features of this basic con-
More speci cally, we rely upon IP routing to route data guration:
passed through the longstanding socket connections.
An anonymous connection is comprised of portions of  Connections between machines behind onion
several linked longstanding multiplexed socket connec- routers are protected against both eavesdropping
tions. Therefore, although the series of onion routers and trac analysis. Since the data stream never
in an anonymous connection is xed for the lifetime appears in the clear on the public network, this
of that anonymous connection, the route that data ac- data may carry identifying information, but com-
tually travels between individual onion routers is de- munication is still private. (This feature is used
termined by the underlying IP network. Thus, onion in section 7.1.)
routing may be compared to loose source routing.
Onion routing depends upon connection based ser-  The onion router at the originating protected site
vices that deliver data uncorrupted and in-order. This knows both the source and destination of a con-
simpli es the speci cation of the system. TCP socket nection. This protects the anonymity of con-
connections, which are layered on top of a connection- nections from observers outside the rewall but
less service like IP, provide these guarantees. Similarly, also simpli es enforcement of and monitoring for
onion routing could easily be layered on top of other compliance with corporate or governmental usage
connection based services, like ATM AAL5. policy.
Our current prototype of onion routing considers the  The use of anonymous connections between two
network topology to be static and does not have mecha- sensitive sites that both control onion routers
nisms to automatically distribute or update public keys e ectively hides their communication from out-
or network topology. These issues, though important, siders. However, if the responder is not in a sen-
are not the key parts of onion routing and will be ad- sitive site (e.g., the responder is some arbitrary
dressed in a later prototype. Web server) the data stream from the sensitive
initiator must also be anonymized. If the con-
2.2 Configurations nection between the exit funnel and the respond-
ing server is unencrypted, the data stream might
As mentioned above neighboring onion routers are otherwise identify the initiator. For example, an
neighbors in virtue of having longstanding socket con- attacker could simply listen in on the connections
nections between them, and the network as a whole is to a Web server and identify initiators of any con-
accessed from the outside through a series of proxies. nection to it.
By adjusting where those proxies reside it is possible to
vary which elements of the system are trusted by users 2.2.2 Remote Proxy Con guration
and in what way. (For some con gurations it may be ef-
cient to combine proxies that reside in the same place, What happens if an initiator does not control an onion
thus they may be only conceptually distinct.) router? If the initiator can make encrypted connections
to some remote onion router, then he can function as
2.2.1 Firewall Con guration if he is in the rewall con guration just described, ex-
cept that both observers and the network can tell when
In the rewall con guration , an onion router sits on he makes connections to the onion router. However, if
the rewall of a sensitive site. This onion router serves the initiator trusts the onion router to build onions, his
as an interface between machines behind the rewall association with the anonymous connection from that
and the external network. Connections from machines onion router to the responder is hidden from observers
behind the rewall to the onion router are protected and the network. In a similar way, an encrypted con-
by other means (e.g., physical security). To complicate nection from an exit funnel to a responder hides the

3
association of the responder with the anonymous con- 3 Empirical Data
nection .
Therefore, if an initiator makes an anonymous con- We invite readers to experiment with our pro-
nection to some responder, and layers end-to-end en- totype of onion routing by using it to anony-
cryption over that anonymous connection, the initia- mously surf the Web, send anonymous e-mail, and
tor and responder can identify themselves to one an- do remote logins. For instructions please see
other, yet hide their communication from the rest of http://www.itd.nrl.navy.mil/ITD/5540/projects/
the world. So we can build virtual private networks onion-routing/.
without protected sites. One should be aware that accessing a remote onion
Notice, however, that the initiator trusts the remote router does not completely preserve anonymity, be-
onion router to conceal that the initiator wants to com- cause the connection between a remote machine and
municate with the responder, and to build an anony- the rst onion router is not protected. If that connec-
mous connection through other onion routers. The tion were protected, one would be in the remote proxy
next section describes how to shift some of this trust con guration, but there would would still be no rea-
from the rst onion router to the initiator. son to trust the remote onion router. If one had a
secured connection to an onion router one trusted, our
onion router could be used as one of several intermedi-
ate routers to further complicate trac analysis.
We have recently set up a thirteen node distributed
2.2.3 The Customer{ISP Con guration network of government, academic, and private sites.
However, at press time we have not yet gathered per-
Suppose, for example, an Internet Services Provider formance data for this network. The data we present
(ISP) runs a funnel that accepts connections from are for a network running on a single machine. In our
onion proxies running on subscribers' machines. In experimental onion routing network, ve onion routers
this con guration, users generate onions specifying a run on a single Sun Ultra 2 2170. This machine has two
path through the ISP to the destination. Although the 167 MHz processors, and 256MB of memory. Anony-
ISP would know who initiates the connection, the ISP mous connections are routed through a random se-
would not know with whom the customer is communi- quence of ve onion routers. Connection setup time
cating, nor would it be able to see data content. So the should be comparable to a more distributed topol-
customer need not trust the ISP to maintain her pri- ogy. Data latency, however, is more dicult to judge.
vacy. Furthermore, the ISP becomes a common carrier, Clearly, data will travel faster over socket connections
who carries data for its customers. This may relieve the between onion routers on the same machine than over
ISP of responsibility both for whom users are commu- socket connections between di erent machines. How-
nicating with and the content of those conversations. ever, on a single machine the removal or addition of
The ISP may or may not be running an onion router as layers of encryption is not pipelined, so data latency
well. If he is running an onion router, then it is more may be worse.
dicult to identify connections that terminate with his Onion routing's overhead is mainly due to public
customers; however, he is serving as a routing point for key cryptography and is incurred while setting up an
other trac. On the other hand, if he simply runs a anonymous connection. On our Ultra 2 running a fast
funnel to an onion router elsewhere, it will be possible implementation of RSA [2], a single public key decryp-
to identify connections terminating with him, but his tion of a 1024 bit plaintext block using a 1024 bit pri-
overall trac load will be less. Which of these would be vate key and a 1024 bit modulus takes 90 milliseconds.
the case for a given ISP would probably depend on a va- Encryption is much faster, because the public keys are
riety of service, cost, and pricing considerations. Note only 16 bits long. (This is why RSA signature veri-
that in this con guration the entry funnel must have an cation is cheaper than signing). So, the public key
established longstanding connection to an onion router cryptographic overhead for routes spanning ve onion
just like any neighboring onion router. (Cf. section 5.6 routers is just under 0.5 seconds. This overhead can
for a description of how these are established.) But, in be further reduced, either with specialized hardware,
most other cases, where the funnel resides on the same or even simply on di erent hardware (a 200 MHz Pen-
machine as the onion router, establishing an encrypted tium would be almost twice as fast).
longstanding connection should not be necessary since In practice, our connection setup overhead does not
the funnel can be directly incorporated into the onion appear to add intolerably to the overhead of typical
router. socket connections. Still, it can be further reduced.

4
There is no reason that the same anonymous connec- load on the system makes the network easier to analyze
tion could not be used to carry the trac for several (and makes the system not uniformly busy).
`real' socket connections, either sequentially or multi- Passive internal attacks require at least two com-
plexed. In fact, the speci cation for HTTP 1.1 de nes promised onion routers. Since onion routers can assign
pipelined connections to amortize the cost of socket markers to a session, both the marker and timing at-
setup, and pipelined connections would also transpar- tacks are possible. Speci cally, timing signatures can
ently amortize the increased cost of anonymous connec- be broadcast, and other compromised onion routers can
tion setup. We are currently updating our Web proxy attempt to nd connections with matching timing sig-
to be HTTP 1.1 compliant. natures.
Another attack that is only feasible as an internal at-
4 Threat Model tack is the volume attack. Compromised onion routers
can keep track of the number of cells that have passed
This section outlines our threat model. It does not over any given anonymous connection. They can then
simply broadcast totals to other compromised onion
intend to quantify the cost of attacks, but to de ne routers. Cell totals that are close to the same amount
possible attacks. Future work will quantify the threat. at the same time at di erent onion routers are likely to
First some vocabulary. A session is the data carried belong to the same anonymous connection.3
over a single anonymous connection. Data is carried Active internal attacks amplify these risks, since in-
in xed length cells. Since these cells are multiply en- dividual onion routers can selectively limit trac on
crypted and change as they move through an anony- particular connections. An onion router could, for ex-
mous connection, tracking cells is equivalent to track- ample, force a particular timing signature on a connec-
ing markers that indicate when cells begin. In a marker tion, and advertise that signature.
attack, the attacker identi es the set of outbound con-
nections that some distinguished marker may have
been forwarded upon. By intersecting these sets for 5 Onion Routing Speci cs
a series of distinguished markers belonging to the same
session, an attacker may determine, or at least narrow, 5.1 Onion Routing Proxies
the set of possible next hops. In a timing attack, the
attacker records a timing signature for a session that A proxy is a transparent service between two appli-
correlates data rate over time. A session may have a cations that would usually make a direct socket con-
very similar timing signature wherever it is measured nection to each other but cannot. For example, a re-
over a route, so cooperating attackers may determine wall might prevent direct socket connections between
if they carry a particular session. internal and external machines. A proxy running on
We assume that the network is subject to both pas- the rewall may enable such connections. Proxy aware
sive and active attacks. Trac may be monitored and applications are becoming quite common.
modi ed by both external observers and internal net- Our goal has been to design an architecture for pri-
work elements, including compromised onion routers. vate communication that would interface with unmodi-
Attackers may cooperate and share information and in- ed applications, so we chose to use proxies as the inter-
ferences. We assume roving attackers that can monitor face between applications and onion routing's anony-
part, but not all, of the network at a time. mous connections. For applications that are designed
Our goal is to prevent trac analysis, not trac con- to be proxy aware, (e.g., WWW browsers), we sim-
rmation. If an attacker wants to con rm that two end- ply design appropriate interface proxies. Surprisingly,
points often communicate, and he observes that they for certain applications that are not proxy aware (e.g.,
each connect to an anonymous connection at roughly RLOGIN), we have also been able to design interface
the same time, more often than is statistically ex- proxies.
pected, it is reasonable to infer that the endpoints are Because it is necessary to bridge between applica-
indeed communicating. Notice that this attack is in- tions and the onion routing network, proxies must un-
feasible if endpoints live in protected networks behind derstand both application protocols and onion routing
trusted onion routers on rewalls. protocols. Therefore, we modularize the design into
If the onion routing infrastructure is uniformly busy, components: the application proxy, the onion proxy,
then passive external attacks are ine ective. Speci - and the entry funnel. The application proxy bridges
cally, neither the marker nor timing attacks are feasi- between a socket connection from an application and
ble, since external observers cannot assign markers to 3 Thanks to Gene Tsudik for noting this attack and for helpful
sessions. Active attacks are possible since reducing the discussions.

5
a socket connection to the onion proxy. It is the obli- The application proxy is listening for new requests.
gation of the application proxy to massage the data Once it obtains the GET request, it creates the standard
stream so the onion proxy, the entry funnel and the exit structure and sends it (along a new socket connection)
funnel can be application independent. Speci cally, the to the onion proxy, to inform the onion proxy of the
application proxy must prepend to the data stream a service and destination of the anonymous connection.
standard structure that identi es the ultimate destina- The application proxy then modi es the GET request
tion by either hostname/port or IP address/port. Ad- to GET /showcase/ HTTP/1.0 and sends it directly
ditionally, it must process a one byte return code from (through the anonymous connection) to the HTTP
the exit funnel and either continue if no error is re- server www.domino.com, followed by the optional elds.
ported or report the onion routing error code in some Notice that the server name and http:// are elimi-
application speci c meaningful way. The application nated from the GET request because the connection is
proxy may also contain an optional privacy lter for made directly to the HTTP server.
sanitizing the data stream. The application proxy essentially makes a connec-
Upon receiving a new request, the onion proxy tion to www.domino.com, and issues a request as if it
builds an onion de ning the route of an anonymous were a client. Once this request is transmitted to the
connection. (It may use the destination address in server, all proxies blindly forward data in both direc-
the prepended structure to help de ne the route.) It tions between the client and the server until the socket
then passes the onion to the funnel, and repeatedly is broken by either side.
precrypts the standard structure. Finally, it passes For the anonymizing onion routing HTTP proxy, the
the precrypted standard structure through the anony- application proxy proceeds as outlined above with one
mous connection to the exit funnel, thus specifying the change: it is now necessary to sanitize the optional
ultimate destination. From this point on, the onion elds that follow the GET command because they may
proxy blindly relays data back and forth between the contain identity information. Furthermore, the data
application proxy and the onion routing network (and stream during a connection must be monitored, to san-
thus the exit funnel at the other end of the anonymous itize additional headers that might occur during the
connection). Of course, it must apply the appropri- connection. For our current anonymizing HTTP proxy,
ate keystreams to incoming and outgoing data when operations that store cookies on the user's browser (to
blindly relaying data. track a user, for example) are removed. This reduces
The entry funnel multiplexes connections from onion function, so applications that depend upon cookies
proxies to the onion routing network. For the services (like online shopping baskets) may not work properly.
we have considered to date, a nearly generic exit funnel
is adequate. Its function is to demultiplex connections 5.2 Implementation
from the last onion router to the outside. When it
reads a data stream from the terminating onion router This section presents the interface speci cation be-
the rst datum received will be the standard structure tween the components in an onion routing system. To
specifying the ultimate destination. The exit funnel provide some structure to this speci cation, we will
makes a socket connection to that IP address/port, re- discuss components in the order that data would move
ports a one byte status message back to the onion rout- from an initiating client to a responding server.
ing network (and thus back to the onion proxy which There are four phases in an onion routing sys-
in turn forwards it back to the application proxy), and tem: network setup, which establishes the longstanding
subsequently moves data between the onion routing connections between onion routers; connection setup,
network and the new socket. (For certain services, which establishes anonymous connections through the
like RLOGIN, the exit funnel also infers that the new onion router network; data movement over an anony-
socket must originate from a trusted port.) Entry and mous connection; and the destruction and cleanup of
exit funnels are not application speci c but must un- anonymous connections. We will commingle the dis-
derstand the onion routing protocol, which de nes how cussion of these below.
multiplexed connections are handled.
As an example, consider the application proxy for 5.3 Application Proxy
HTTP. The user con gures his browser to use the
onion routing proxy. His browser may send the proxy The interface between an application and the ap-
a request like plication proxy is application speci c. The interface
GET http://www.domino.com/showcase/ HTTP/1.0 between the application proxy and the onion proxy is
followed by optional elds. de ned as follows. For each new proxy request, the

6
application proxy rst determines if it will handle or 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
deny the request. If rejected, it reports an application +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

speci c error message and then closes the socket and |0| Version |Back F|Forw F| Destination Port
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|

waits for the next request. If accepted, it creates a | Destination Address |

socket to the onion proxy's well known port. The ap- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Expiration Time (GMT) |
plication proxy then sends a standard structure to the +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

onion proxy of the form: |


+
|
+
| |
0 1 2 3 + Key Seed Material +
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + +
| Version | Protocol | Retry Count | Addr Format | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Version is currently de ned to be 1. Protocol is


either 1 for RLOGIN, 2 for HTTP, or 3 for SMTP. As we will see below, the rst bit must be zero for
Retry Count speci es how many times the exit funnel RSA public key cryptography to succeed. Following
should attempt to retry connecting to the ultimate des- the zero bit is the Version Number of the onion routing
tination. Finally, the Addr Format eld speci es the system, currently de ned to be 1.
form of the ultimate destination address: 1 for a NULL The Back F eld denotes the cryptographic function
terminated ASCII string with the hostname or IP ad- to be applied to data moving in the backward direction
dress (in ASCII form) immediately followed by another (de ned as data moving in the direction opposite that
NULL terminated ASCII string with the destination which the onion traveled, usually toward the initiator's
port number, and all others currently unde ned. The end of the anonymous socket connection) using key2
ultimate destination address is sent after this standard de ned below. The Forw F eld denotes the crypto-
structure, and the application proxy waits for a one graphic function to be applied to data moving in the
byte error code before sending data. forward direction (de ned as data moving in the same
direction as that which the onion traveled, usually to-
5.4 Onion Proxy ward the responder's end of the anonymous socket con-
nection) using key3 de ned below. Currently de ned
Upon receiving the standard structure, the onion cryptographic functions are: 0 for Identity (no encryp-
proxy can decide whether to accept or reject the re- tion), 1 for DES OFB (output feedback mode) (56 bit
quest based on the protocol, destination host, desti- key), and 2 for RC4 (128 bit key). The Destination
nation port, or the identity of the application proxy. Address and Destination Port indicate the next onion
If rejected, it sends an appropriate error code back to router in network order and are both 0 for the exit fun-
the application proxy, closes the socket, and waits for nel. The Expiration Time is given in network order in
the next request. If accepted, it proceeds to build the seconds relative to 00:00:00 UTC January 1, 1970 (i.e.,
onion and connects to the entry funnel of the rst onion standard UNIX time(2) format) and speci es how long
router, through the network, and to the exit funnel of the onion router at this hop in the anonymous connec-
the last. It next sends the standard structure to the tion must track the onion against replays before it ex-
exit funnel over the anonymous connection, and then pires. Key Seed Material is 128 bits long and is hashed
passes all future data to and from the application proxy three times with SHA to produce three cryptographic
and anonymous connection. The repeated pre and post keys (key1, key2, and key3 ) of 128-bits each (the rst
cryptions and packaging of the standard structure and eight bytes of each SHA output are used for DES and
subsequent data is discussed later in section 5.6. the rst 16 bytes for RC4 keys).4
Since we use RSA public key cryptography with a
5.5 Onions
modulus size of 1024-bits, the plaintext block size is
1024 bits and must be strictly less than the modulus
numerically. To avoid problems, we force this relation
To build the anonymous connection to the exit fun- by putting the most-signi cant bit rst and setting it
nel, the onion proxy creates an onion. An onion is to 0 (the leading 0 above). Furthermore, the inner-
a multi-layered data structure that encapsulates the most layer of the onion is padded on the end with an
route of the anonymous connection starting from the additional 100 bytes prior to RSA encryption being
onion router for that exit funnel and working backward
to the onion router at the entry funnel. 4 Details on the cryptographic operations used in this paper
Each layer has the following structure: can be found in [20, 26].

7
performed. the multiplexing of both anonymous connections and
In version 1, an onion has ve layers, but routes can control information over the longstanding connections.
be shorter. An onion is formed iteratively, innermost (Cell size was chosen to be compliant with ATM.) In
layer rst. At each iteration, the rst 128 bytes of the version 1 of the onion routing system, there are four
onion are encrypted with the public key of the onion types of cells: PADDING (0), CREATE (1), DATA
router that is intended to decrypt that layer. The re- (2), and DESTROY (3).
mainder of the onion is encrypted, using DES OFB Cells have the following structure:
with an IV (initialization vector) of 0 and key1 (de-
rived from Key Seed Material in that layer as de ned 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
above).5 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Before discussing how onions and data are sent be- | ACI | Command | Length
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|

tween onion routers, we will de ne onion router inter- | |

connection. .......................Payload (44 bytes).......................


| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

5.6 Onion Router Interconnection


The ACI (anonymous connection identi er) and
During onion network setup (not to be confused Command elds are always encrypted using the link
with anonymous connection setup), longstanding con- encryption between neighboring nodes. Additionally,
nections between neighboring onion routers are estab- the Length and Payload elds are encrypted using the
lished and keyed. The network topology is prede ned link encryption between neighboring nodes if the com-
and each onion router knows its neighbors. mand is either PADDING (0) or DESTROY (3). For
To remain connected to each of its neighbors, onion CREATE (1) commands, the length is link encrypted,
routers must both listen for connections from neigh- but the payload is already encrypted because it car-
bors and attempt to initiate connections to neighbors. ries the onion. For DATA (2) commands, the length
To avoid deadlock and collision issues between pairs of and entire payload are encrypted using the anonymous
neighbors, an onion router listens for connections from connection's forward or backward cryptographic oper-
neighbors with \higher" IP/port addresses and initi- ations.
ates connections to neighbors with \lower" IP/port ad- Each anonymous connection is assigned an ACI at
dresses. \Higher" and \Lower" are de ned with respect each onion router, which labels an anonymous connec-
to network byte ordering. (This was an expedient way tion when it is multiplexed over the longstanding con-
to break symmetry. Ultimately we will want a more nection to the next onion router. ACIs must be unique
exible solution. For example, when an onion router on their longstanding connection but need not be glob-
goes down, it should contact its neighbors upon com- ally unique.
ing back up. Requiring the neighbors to try to contact To move an onion through the system, an onion
the down router until it responds is less ecient. This router peels o the outermost layer, identifying the
is not dicult to implement and we will do so in the next hop. It checks the freshness (not expired and
future.) not replayed) of the onion, computes the necessary
The protocol has two phases: connection setup and cryptographic keys, initializes the forward and back-
keying. The initiating onion router opens a socket to ward cryptographic engines, chooses a new ACI for
a well known port of its neighboring onion router, and the next hop in the new connection, and then builds a
sends its IP address and well known port (the port is data structure associated with that connection which
included to allow multiple onion routers to run on a maps incoming to outgoing ACIs and the cryptographic
single machine) in network order to identify itself. The engines associated with forward and backward data.
keying phase ensues, using STS [9] which will gener- Since neighboring onion routers choose ACIs for each
ate two DES 56-bit keys. The link encryption over the other on the thick pipe that they share, each is assigned
longstanding connections is done by DES OFB with half of the naming space. The neighboring onion router
IVs of 0 and these two keys (one for data in each di- with a \higher address" chooses ACIs in the top half
rection). of that space, while its neighbor with the lower address
Once keyed, communication between onion routers chooses ACIs from the bottom half of that space. After
is packaged into xed sized cells , which allows for the outermost layer of onion is peeled o , the rest of the
5 We use DES to encrypt the onion, and for link encryption
onion is padded randomly to its original length, placed
between onion routers, because it has no licensing fees and can be into CREATE cells, and then sent out in order to the
used as a pseudorandom number generator. However, we would appropriate neighbor. The payload of the last cell is
be happy to use a stronger pseudorandom number generator. padded with random bits to ll the cell if necessary (to

8
avoid traceability). 6 Implementation Vulnerabilities
Data moves through an anonymous connection in
DATA cells. At each onion router both the length and An implementation of a secure design can be inse-
payload elds of a cell are crypted using the appro- cure. In this section, we describe several implementa-
priate cryptographic engine. The new cell is sent out tion decisions that were made for security considera-
to the appropriate neighbor. The onion proxy must tions.
repeatedly crypt data to either add the appropriate Onions are packaged in a sequence of cells that must
layers of cryption on outgoing data, or remove layers be processed together. This onion processing involves a
of cryption from incoming data. When constructing public key decryption operation which is relatively ex-
a DATA cell from a plaintext data stream, the cell is pensive. Therefore, it is possible to imagine an imple-
(partially) lled, its true length is set, and all 45 bytes mentation that clears outgoing queues while an onion
of the length and payload elds are repeatedly crypted is being processed, and then outputs the onion. There-
using the stream ciphers de ned by the onion. There- fore, any period of inactivity on the out-bound queues
fore, when the cell arrives at the exit funnel, the length is likely to be followed by a sequence of onion cells be-
eld re ects the length of the actual data carried in the ing output on a single queue. Such an implementation
payload. makes tracking easier and should be avoided.
If a connection is broken, a DESTROY command After processing at each onion router, onions are
is sent to clean up state information. The ACI eld padded at the end to compensate for the removed layer.
of the DESTROY command carries the ACI of the This padding must be random, since onions are not
broken connection. The length and payload must be link encrypted between onion routers. Similarly, the
random. Upon receipt of a DESTROY command, it length and payload of a DESTROY command must be
is the responsibility of an onion router to forward the new random content at each onion router; otherwise,
DESTROY appropriately and to acknowledge receipt compromised onion routers could track that payload.
by sending another DESTROY command back to the In a multi-threaded implementation, there is a sig-
previous sender. After sending a DESTROY command ni cant lure to rely upon apparent randomness in
about a particular ACI, an onion router may not send scheduling to reorder events. If reordering is impor-
any more cells along that anonymous connection. Once tant to the secure operation of the system, deliberate
an acknowledgment DESTROY message is received, an reordering is crucial, since low level system randomness
onion routing node considers the anonymous connec- may in fact be predictable.
tion destroyed and the ACI can be used as a label for There are two vulnerabilities for which we do not
a new anonymous connection. have good solutions. If part of the onion routing net-
The PADDING command is used to inject data into work is taken down, trac analysis may be simpli ed.
a longstanding socket to further confuse trac analysis. Also, if a longstanding connection between two onion
PADDING cells are discarded upon receipt. routers is broken, it will result in many DESTROY
Each onion router also reorders cells moving through messages, one for each anonymous connection that was
it. All cells that arrive at an onion router within a xed routed through that longstanding connection. There-
interval of time on any connection are mixed pseudo- fore, a compromised onion router may infer from near
randomly, except that the order of cells in each anony- simultaneous DESTROY messages that the associated
mous connection is preserved. anonymous connections had some common route. De-
laying DESTROY messages hurts performance, since
5.7 Exit Funnel we require that a DESTROY message propagate to the
endpoints to take down the connection that is visible
When a routing node receives an onion with Des- to the user. Carrying the DESTROY message through
tination Address and Destination Port of 0, it knows the anonymous connection and garbage collecting dor-
it is the terminal onion router for the connection and mant anonymous connections later would be ideal, but
passes the connection not to another onion router but we do not know how to eciently insert control infor-
to its own exit funnel. The funnel proceeds to read the mation into a raw data channel, especially consider-
standard structure that will be the rst data across the ing our layered encryption. One possibility is for the
anonymous socket connection, establishes a connection onion router on the initiator side of a break to send
to the ultimate destination as indicated, and returns some large predetermined number of one bits back to
the status code. After this, it will blindly forward data the initiator followed by a message that the connec-
between the anonymous connection and the connection tion is destroyed. The onion proxy could then check
to the responder's machine. for such a signal after it strips o each layer of each

9
packet, and notify the application proxy if it receives 7.2 Anonymous Chatting
the signal. The initiator can contact the responder out
of band, presumably through another anonymous con- Anonymous connections can be used in a service
nection, authenticate itself by some means as the initia- similar to IRC, where many parties meet to chat at
tor of the broken connection, and notify the responder some central server. The chat server may mate sev-
of the break. Onion routers can either be noti ed di- eral anonymous connections carrying matching tokens.
rectly by the onion proxy after some random delay or Each party de nes the part of the connection lead-
possibly garbage collect least recently used ACIs. We ing back to itself, so no party has to trust the other
will continue to explore the feasibility of this and other to maintain its privacy. If the communicating parties
possibilities.6 layer end-to-end encryption over the mated anonymous
connections, they also prevent the central server from
7 Applications listening in on the conversation.
7.3 Anonymous Cash
We rst describe how to use anonymous connection
in VPNs, anonymous chatting services, and anonymous Certain forms of e-cash are designed to be anony-
cash. We then describe onion routing proxies for three mous and untraceable, unless they are double spent
Internet services: Web browsing, e-mail, and remote or otherwise misused. However, if a customer can-
logins. These three onion routing proxies have been not contact a vendor without identifying himself, the
implemented. Anonymizing versions of these proxies anonymity of e-cash is undermined. For transactions
that remove the identifying information that may be where both payment and product can be conveyed elec-
present in the headers of these services' data streams tronically, anonymous connections can be used to hide
have been implemented as well. the identities of the parties from one another [27].
How can the customer be prevented from taking his
7.1 Virtual Private Networks purchase without paying for it (e.g., by closing the con-
nection early) or the vendor be prevented from taking
the customer's e-cash without completing the transac-
If two sites wanted to collaborate, they could estab- tion? This is a hard problem [12, 4]. In the case of
lish one or more long term tunnels that would multiplex a well known vendor, a practical solution is to require
many socket connections, or even raw IP packets, over customers to pay rst. The vendor is unlikely to delib-
a single anonymous connection. This would e ectively erately cheat its customers since it may be caught in
hide who is collaborating with whom and what they an audit.
are working on, without requiring the construction of
an individual anonymous connection for each connec- 7.4 Remote Login
tion made. Such long term anonymous connections be-
tween enclaves provide the analog of a leased line over
a public network. Note that the protection provided a We proxy remote login requests by taking advan-
VPN by onion routing is broader than that provided by tage of the option -l username to rlogin. The usual
rlogin command is of the form:
encrypting rewalls. Basic encrypting rewalls encrypt
payloads only. Thus, they protect con dentiality, but rlogin -l username server
do nothing to protect against trac analysis. IPSEC To use rlogin through an onion routing proxy, one
will protect trac for individual connections by encap- would type
sulating packets in encrypted packets from the rewall, rlogin -l username@server proxy
but this will not protect against institutional level traf- where proxy refers to the onion routing proxy to be
c analysis. Communication between two such rewalls used and both username and server are the same as
will still indicate a collaboration between the sites be- speci ed above. A normal rlogin request is transmitted
hind them. Constant padding may be added, but this from a privileged port on the client to the well known
is very expensive. And, unless many unrelated sites port for rlogin (513) on the server as:
agree to do it, it still does not hide the existence of
the VPN established between those sites that are so \0 username on client \0 username on server \0 terminal type \0
padding.
where username on client is the username of the in-
6Thanks to Gene Tsudik for some of the fundamental ele- dividual invoking the command on the client machine,
ments of this proposal. username on server is either the -l eld (if speci ed) or

10
the username of the individual invoking the command client. Therefore, the request must be massaged to
on the client machine (if no -l is speci ed), and the remove the server name and scheme, and transmit-
terminal type is a standard termcap/linespeed speci - ted to www.server.com over the anonymous connec-
cation. The server responds with a single zero byte if tion. Once this request is transmitted to the server,
it will accept the connection or breaks the socket con- the proxy blindly forwards data in both directions be-
nection if an error has occurred or the connection is tween the client and server until the socket is broken
rejected. Our normal rlogin proxy therefore receives by either side.
the initial request: For privacy ltering of HTTP, the proxy proceeds
as outlined above with one change. It is now neces-
\0 username on client \0 username@server \0 terminal type \0 sary to sanitize the optional elds that follow the GET
command because they may contain identity informa-
The proxy creates an anonymous connection to the tion. Furthermore, the data stream during a connec-
RLOGIN port on the server machine and proceeds to tion must be monitored, to sanitize additional headers
send it a massaged request of the form: that might occur during the connection.
The Anonymizer [1] also provides anonymous Web
\0 username \0 username \0 terminal type \0 browsing. Users can connect to servers through the
Anonymizer and it strips o identifying headers. This
Once this request is transmitted to the server, the is essentially what our ltering HTTP proxy does.
proxy blindly forwards data in both directions between But packets can still be tracked and monitored. The
the client and server until the socket is broken by either Anonymizer could be used as a front end to the onion
side. routing network to provide e ective protection against
Notice that the onion router does not send the server trac analysis. We discuss this further in section 8.
the client's username on the client, so communication
is anonymous, unless the data-stream subsequently re- 7.6 Electronic Mail
veals more information.
Electronic mail is proxied by utilizing the
7.5 Web Browsing user%host@proxy form of e-mail address instead of the
normal user@host form. This form should work with
Proxying HTTP requests follows the IETF HTTP most current and older mail systems. Under this form,
V1.0 Speci cation [3]. An HTTP request from a client the client contacts the proxy server's well known SMTP
through an HTTP proxy is of the form: port (25). Instead of the normal mail daemon listening
to that port, the proxy listens and interprets what it re-
GET http://www.server.com/file.html HTTP/1.0 ceives following a strict state machine: wait for a valid
HELO command, wait for a valid MAIL From: command,
followed by optional elds. Notice that an HTTP and then wait for a valid RCPT To: command. Each
request from a client to a server is of the form: command argument is temporarily bu ered. Once the
RCPT To: command has been received, the proxy pro-
GET file.html HTTP/1.0
ceeds to create an anonymous connection to the des-
also followed by optional elds. The server name and tination server and relays the HELO and MAIL From:
protocol scheme are missing, because the connection is commands exactly as received. The RCPT To: com-
made directly to the server. mand is massaged and forwarded. Any subsequent
RCPT To: commands are rejected. Once the DATA
As an example, a complete request from Netscape
Navigator to an onion router HTTP proxy may look request is transmitted to the server, the proxy for-
like this: wards data in both directions from the client and
server. An example of e-mail from joe@sender.com
GET http://www.server.com/file.html HTTP/1.0 on the machine sender.com to mary@recipient.com
Referer: http://www.server.com/index.html via the onion.com onion router is given below. Joe
Proxy-Connection: Keep-Alive types mail mary%recipient.com@onion.com. First
User-Agent: Mozilla/3.0 (X11; I; SunOS 5.4 sun4m) the communications from the client on sender.com to
Host: www.server.com the onion router SMTP proxy on onion.com is given,
Accept: image/gif, image/x-xbitmap, image/jpeg followed by the communications from the exit funnel
to recipient.com:
The proxy must create an anonymous connection to
www.server.com, and issue a request as if it were a 220 onion.com SMTP Onion Routing Network.

11
HELO sender.com 8 Comparisons with Related Work
250-onion.com -- Connection from
250 sender.com (2.0.0.1).
MAIL From: joe@sender.com Chaum [5] de nes a layered object that routes data
250 Sender is joe@sender.com. through intermediate nodes, called mixes . These in-
RCPT To: mary%recipient.com@onion.com termediate nodes may reorder, delay, and pad trac to
complicate trac analysis. In mixes, the assumption is
The proxy massages the RCPT To: line to make the that a single perfect mix adequately complicates trac
address mary@recipient.com and makes an anony- analysis, but a sequence of multiple mixes is typically
mous connection to recipient.com. It then replays used because real mixes are not ideal. Because of this,
the massaged protocol to recipient.com: mix applications can use mixes in xed order, and of-
220-recipient.com Sendmail 4.1/SMI-4.1 ready ten do. Onion routers di er from mixes in at least two
220 at Wed, 28 Aug 96 15:15:00 EDT ways: onion routers are more limited in the extent to
HELO Onion.Routing.Network which they delay trac at each node because of the
250-recipient.com Hello Onion.Routing.Network real-time expectations that the applications demand
250 [2.0.0.5], pleased to meet you of socket connections. Also, in a typical onion routing
MAIL From: joe@sender.com
250 joe@sender.com... Sender ok
con guration, onion routers are also entry points to the
RCPT To: mary@recipient.com
onion routing network, and trac entering or exiting
250 mary@recipient.com... Recipient ok
at those nodes may not be visible. This makes it hard
DATA to track packets, because they may drop out of the net-
354 Enter mail, end with "." on a line by itself work at any node, and new packets may be introduced
at each node. While onion routing cannot delay traf-
At this point, the proxy forwards data in both di- c to the extent that mixes can, trac between onion
rections, until a line containing only a period is sent routers is multiplexed over a single channel and is link
from the sender to the recipient: encrypted with a stream cipher. This makes it hard to
This is a note parse the stream.
. Anonymous remailers like Penet [17] strip headers
The proxy forwards the line containing only a period from received mail and forward it to the intended re-
to the recipient, and forwards the recipient's response cipient. They may also replace the sender's address
to the sender. At that point, the proxy sends QUIT to with some alias, permitting replies. These sorts of re-
the recipient, reads the response and closes the con- mailers store sensitive state: the mapping between the
nection to the recipient. The proxy then waits for a alias and the true return address. Also, mail forwarded
command from the sender; if that command is QUIT, through a chain of remailers may be tracked because it
the proxy sends a response and closes its connection to appears the same to each remailer.
the sender: Mix based remailers like [7, 16] use mixes to provide
anonymous e-mail services. Essentially, the mail mes-
250 Mail accepted sage is carried in the innermost layer of the onion data
QUIT
221 onion.com Service closing transmission channel.
structure. Another onion type structure, used for a re-
turn address, can be contained in the message. This
If the command is not QUIT, then it is MAIL, and makes the return path self contained, and the remailer
the protocol repeats. Anything else prompts an error essentially stateless. Onion routing shares many struc-
response, and the proxy waits for the next correct com- tures with Babel [16] but it uses them to build (possibly
mand. long lived) application independent connections. This
For the privacy ltered proxying of electronic mail, makes anonymous connections accessible to a wide va-
the proxy proceeds as outlined above with a few riety of applications. For application to e-mail it has
changes. It is now necessary to sanitize both the both advantages and disadvantages. Onion routing's
MAIL From: command and the header portion of the service makes an anonymous connection directly to the
actual message body. Sanitization of the MAIL From: recipient's sendmail daemon. A disadvantage is that,
command is trivial with a simple substitution of since the connection is made in real-time, there is less
anonymous for joe@sender.com. For the header san- freedom in mixing, which therefore might not be done
itization, we have taken the conservative approach of as well. An advantage is that the anonymous connec-
deleting all headers, but this may be modi ed in the tion is separated from the application, so anonymous
future to only remove identifying information and leave e-mail systems are considerably simpli ed because the
the remaining header information intact. application speci c part does not have to move data

12
through the network. Furthermore, because the onion data. Most importantly, the network topology of the
routing network can carry many types of data, it has Internet is more akin to the network topology of the
the potential to be more heavily utilized than a net- long distance network between switches, where capac-
work that is devoted only to e-mail. Heavy utilization ity is a shared resource. In anonymous ISDN, the mixes
is the key to anonymity. hide communication within the local switch, but con-
In [10], a structure similar to an onion is used to nections between switches are not hidden. This implies
forward individual IP packets through a network. By that all calls between two businesses, each large enough
maintaining tracking information at each router, ICMP to use an entire switch, reveal which businesses are
error messages can be moved back along the hidden communicating. In onion routing, mixing is dispersed
route. Essentially, a connection is built for each packet throughout the Internet, which improves hiding.
in a connectionless service. Although a followup paper Pipe-net [8] is a proposal similar to onion routing. It
[11] suggests that performance will be good, especially has not been implemented, however. Pipe-net's threat
with hardware based public key cryptography, our ex- model is more paranoid than onion routing's: it at-
perience suggests that both the cryptographic overhead tempts to resist active attacks by global observers. For
of building onions and the tracking of onions against example, Pipe-net's connections carry constant traf-
replay is not eciently done on a packet-by-packet ba- c (to resist timing signature attacks) and disruptions
sis. However, it is easy to imagine an onion routing to any connection are propagated throughout the net-
proxy that collects IP packets and forwards them over work.
some anonymous connection. In this way, communi- The Anonymizer is a Web proxy that lters the
cation is anonymous at the IP layer, but connections HTTP data stream to remove a user's identifying in-
need not be built for each IP packet. This anonymous formation, essentially as our ltering HTTP proxy
IP communication may be more robust than our cur- does. For example, the Anonymizer will \strip out
rent architecture: it could survive a broken anonymous all references to your e-mail address, computer type,
connection, since IP does not expect reliable delivery. and previous page visited before forwarding your re-
In [22], mixes are used to provide untraceable com- quest" [1]. This makes Web browsing private in the
munication in an ISDN network. Here is a summary absence of any eavesdropping or trac analysis. The
of that paper. In a phone system, each telephone line Anonymizer is vulnerable in three ways: First, it must
is assigned to a particular local switch (i.e., local ex- be trusted. Second, trac between a browser and the
change), and switches are interconnected by a (long Anonymizer is sent in the clear, so that trac identi-
distance) network. Anonymous calls in ISDN rely upon es the true destination of a query, and includes the
an anonymous connection between the caller and the identifying information that the Anonymizer would l-
long distance network. These connections are made ter. Third, even if trac between the browser and the
anonymous by routing calls through a prede ned se- Anonymizer were encrypted, passive external observers
ries of mixes within each switch. The long distance could mount the volume attack mentioned in section 4.
endpoints of the connection are then mated to com- The Anonymizer, however, is now readily available to
plete the call. (Notice that observers can tell which everyone on the Web.
local switches are connected.) Also, since each phone NetAngels [21] is similar to the Anonymizer, ex-
line has a control circuit connection to the switch, the cept that it builds personal pro les of its subscribers
switch can broadcast messages to each line using these and targets advertisements to match the pro le. How-
control circuits. So, within a switch a truly anonymous ever, the pro le is not released to the advertiser and
connection can be established: A phone line makes an is deleted when a subscription is canceled. Subscribers
anonymous connection to some mix. That mix broad- must trust NetAngels, and connections to the service
casts a token identifying itself and the connection. A are subject to the same attacks as the Anonymizer.
recipient of that token can make another anonymous LPWA [19, 13] (formerly known as Janus) is a
connection to the speci ed mix, which mates the two \proxy server that generates consistent untraceable
connections to complete the call. aliases for you that enable you to browse the Web,
Our goal of anonymous connections over the Inter- register at web sites and open accounts, and be `recog-
net di ers from anonymous remailers and anonymous nized' upon returning to your accounts, all while still
ISDN. The data is di erent, with real-time constraints preserving your privacy." Like the previous two, the
more severe than mail, but somewhat looser than voice. LPWA proxy is at a server that is remote from the
Both HTTP and ISDN connections are bidirectional, user application. It is thus subject to the same trust
but, unlike ISDN, HTTP connections are likely to be and vulnerability limitations.
small requests followed by short bursts of returned It is possible, however, to shift trusted elements to

13
the user's machine (or to a machine on the boundary The onion routing network supporting anonymous
between his trusted LAN and the Internet). Shifting connections can be con gured in several ways, includ-
trust in this way can improve the security of other ing a rewall con guration and a customer-ISP con gu-
privacy services like the Anonymizer, NetAngels, and ration, which moves privacy to the user's computer and
LPWA. Currently, those are centralized to provide an may relieve the carrier of responsibility for the user's
intermediary that masks the true source of a connec- connections.
tion. If anonymous connections are used to hide the Onion routing moves the anonymous communica-
source address instead, the other functions of these ser- tions infrastructure below the application level, prop-
vices may run as a local proxy on the user's desktop. erly separating communication and applications. Since
Security is improved because privacy ltering and other the ecacy of mixes depends upon sucient network
services are done on a trusted machine and because trac, allowing di erent applications to share the same
communication is resistant to trac analysis. Also, communications infrastructure increases the ability of
there is no central point of failure. the network to resist trac analysis.
Another approach to anonymous Web connections
is Crowds [25]. Crowds is essentially a distributed Acknowledgments
and chained Anonymizer, with encrypted links between
crowd members. Web trac is forwarded to a crowd
member, who ips a weighted coin and, depending on We have had helpful comments from and discussion
the result, forwards it either to some other crowd mem- with people too numerous to mention. We note espe-
ber or to the destination. This makes communication cially the help of Birgit P tzmann, Gene Tsudik, and
resistant to local observers. James Washington. We also thank the anonymous ref-
erees, the Levien family for hosting the onion dinner,
and the Isaac Newton Institute for hosting one of the
9 Conclusion authors while some of this work was done. The fast
UltraSparc implementation of RSA was done by Tolga
This paper describes anonymous connections, their Acar and Cetin Kaya Koc. This work was supported
realization in onion routing, and some of their appli- by ONR and DARPA.
cations. Anonymous connections are resistant to both
eavesdropping and trac analysis. They separate the
anonymity of the connection from the anonymity of References
communication over that connection. For example,
two parties controlling onion routers can identify them- [1] The Anonymizer. http://www.anonymizer.com
selves to each other without revealing the existence of
a connection between them. This paper demonstrates [2] T. Acar, B. S. Kaliski, Jr., and C. Koc. \Analyzing
the versatility of anonymous connections by exploring and Comparing Montgomery Multiplication Algo-
their use in a variety of Internet applications. These ap- rithms", IEEE Micro , 16(3):26-33, June 1996.
plications include standard Internet services like Web [3] T. Berners-Lee, R. Fielding, and H. Frystyk. Hy-
browsing, remote login, and electronic mail. Anony- pertext Transfer Protocol { HTTP/1.0,
mous connections can also be used to support virtual ftp://ds.internic.net/rfc/rfc1945.txt
private networks with connections that are resistant to
trac analysis and that can carry connectionless traf- [4] L. J. Camp, M. Harkavey, B. Yee, J. D. Ty-
c. gar, \Anonymous Atomic Transactions", Sec-
Anonymous connections may be used as a new prim- ond USENIX Workshop on Electronic Commerce ,
itive that enables novel applications in addition to facil- 1996.
itating secure versions of existing services [24]. Besides
exploring other novel applications, future work includes [5] D. Chaum. \Untraceable Electronic Mail, Return
a system redesign to improve throughput and an im- Addresses, and Digital Pseudonyms", Communi-
plementation of reply onions [15, 23]. Reply onions cations of the ACM , v. 24, n. 2, Feb. 1981, pp.
are basically reply addresses that enable connections 84-88.
to be established back to an anonymous party. We will
be implementing other mechanisms for responding to [6] D. E. Comer. Internetworking with TCP/IP,
anonymous connections as well. We are also beginning Volume 1: Principles, Protocols, and Architec-
a detailed analysis of onion routing to enable a quan- ture, Prentice{Hall, Engelwood Cli s, New Jersey,
titative assessment of resistance to trac analysis. 1995.

14
[7] L. Cottrell. Mixmaster and Remailer Attacks, [22] A. P tzmann, B. P tzmann, and M. Waidner.
http://obscura.obscura.com/~loki/remailer \ISDN-Mixes: Untraceable Communication with
/remailer-essay.html Very Small Bandwidth Overhead", GI/ITG Con-
ference: Communication in Distributed Systems ,
[8] W. Dai. Pipe-net, February 1995, post to the Mannheim Feb, 1991, Informatik-Fachberichte
cypherpunks mailing list. 267, Springer-Verlag, Heidelberg 1991, pp. 451-
[9] Whit eld Die, Paul C. van Oorschot, and 463.
Michael J. Wiener. \Authentication and Authenti- [23] M. G. Reed, P. F. Syverson, and D. M. Goldschlag.
cated Key Exchanges". Designs, Codes, and Cryp- \Proxies for Anonymous Routing", Proc. 12th An-
tography, 2:107{125, 1992. nual Computer Security Applications Conference ,
[10] A. Fasbender, D. Kesdogan, O. Kubitz. \Vari- San Diego, CA, IEEE CS Press, December, 1996,
able and Scalable Security: Protection of Loca- pp. 95{104.
tion Information in Mobile IP", 46th IEEE Ve- [24] M. Reed, P. Syverson, and D. Goldschlag. \Proto-
hicular Technology Society Conference , Atlanta, cols using Anonymous Connections: Mobile Ap-
March 1996. plications", 1997 Security Protocols Workshop ,
[11] A. Fasbender, D. Kesdogan, O. Kubitz. \Analysis Paris, April 1997, nal proceedings to appear.
of Security and Privacy in Mobile IP", 4th Interna- [25] M. Reiter and A. Rubin. Crowds: Anonymity for
tional Conference on Telecommunication Systems Web Transactions (preliminary announcement),
Modeling and Analysis , Nashville, March 1996. DIMACS Technical Reports 97-15, April 1997.
[12] M. Franklin and M. Reiter, \Fair Exchange with a [26] B. Schneier. Applied Cryptography: Protocols, Al-
Semi-Trusted Third Party", Fourth ACM Confer- gorithms and Source Code in C, John Wiley and
ence on Computer and Communications Security , Sons, 1994.
Zurich, April 1997.
[27] D. Simon, \Anonymous Communication and
[13] E. Gabber, P. Gibbons, Y. Matias, and A. Mayer. Anonymous Cash", in Advances in Cryptology{
\How to Make Personalized Web Browsing Simple, CRYPTO`96 , N. Koblitz, ed., LNCS vol. 1109,
Secure, and Anonymous", Financial Cryptography Springer-Verlag, 1996, pp. 61{73.
'97 , February 1997, nal proceedings to appear.
[28] P. Syverson, D. Goldschlag, and M. Reed.
[14] D. Goldschlag, M. Reed, and P. Syverson. \Pri- \Anonymous Connections and Onion Routing",
vacy on the Internet", INET '97, Kuala Lumpur, Proceedings of the 1997 IEEE Symposium on Se-
June 1997. curity and Privacy , Oakland, CA, IEEE CS Press,
[15] D. Goldschlag, M. Reed, P. Syverson. \Hiding May 1997, pp. 44{54.
Routing Information", in Information Hiding , R.
Anderson, ed., LNCS vol. 1174, Springer-Verlag,
1996, pp. 137{150.
[16] C. Gulcu and G. Tsudik. \Mixing Email with Ba-
bel ", 1996 Symposium on Network and Distributed
System Security , San Diego, February 1996.
[17] J. Helsingius. www.penet. .
[18] Internet Engineering Task Force.
http://www.ietf.org/

[19] http://lpwa.com:8000/
[20] A. Menezes, P. van Oorschot, and S. Vanstone.
Handbook of Applied Cryptography , CRC Press,
1997.
[21] http://www.netangels.com

15

You might also like