Tor's Three-Node Circuit: Nested Encryption Isolates Identity from Destination
By wrapping data in nested layers of encryption and routing it through three independent servers, the Tor network ensures no single machine can link a user's IP address to the website they are visiting.
By Naina Verma
Share this story
In short
- The Tor protocol routes traffic through three independent servers to separate a user's identity from their destination.
- Data is wrapped in three layers of encryption, which are peeled off one by one at each node.
- The Entry Guard knows the user's IP address but not the destination, while the Exit relay knows the destination but not the user.
When a user opens the Tor Browser and navigates to a website, their internet service provider sees only an encrypted connection to a random server, while the destination website sees traffic arriving from an entirely different machine. The link between the human at the keyboard and the server hosting the content is mathematically severed.[2]
This separation is not achieved by trusting a commercial virtual private network to keep no logs. Instead, it relies on "onion routing," a protocol originally developed by the US Naval Research Laboratory in the 1990s and detailed in the seminal 2004 USENIX paper by computer scientists Roger Dingledine, Nick Mathewson, and Paul Syverson.[1][4]
The architecture forces every piece of data through a circuit of exactly three volunteer-operated servers, known as relays. "The design of Tor is intended to prevent attackers from linking communication partners, or from linking multiple communications to or from a single user," the 2004 USENIX paper states.[1]
To understand the isolation, consider the encryption process before the data ever leaves the user's device. The Tor client software selects three relays from a directory of approximately 8,000 global nodes: an Entry Guard, a Middle relay, and an Exit relay.[2][6]
The client then encrypts the data three times, utilizing 128-bit AES encryption and 1024-bit RSA keys for identity verification, using the public keys of the chosen relays in reverse order. The innermost layer is encrypted for the Exit relay, the middle layer for the Middle relay, and the outermost layer for the Entry Guard.[1][5]
This nested encryption resembles the layers of an onion. When the packet, fixed at exactly 512 bytes to prevent traffic analysis based on size, leaves the user's computer, it travels to the Entry Guard.[1][7]
The Entry Guard is the only node in the circuit that knows the user's actual IP address. However, because the data is still wrapped in two layers of encryption, the Entry Guard cannot read the payload or know the final destination. It only knows it must forward the 512-byte cell to the Middle relay.[4][5]
Upon receiving the packet, the Middle relay strips off its layer of encryption. The Middle relay knows the identity of the Entry Guard and the Exit relay, but it is entirely blind to both the user's IP address and the website being accessed. It serves as the cryptographic air gap.[2][6]
Finally, the packet arrives at the Exit relay. The Exit relay removes the final layer of encryption, revealing the actual destination, such as a web server. The Exit relay sends the traffic to the open internet.[5]
Crucially, the Exit relay knows what data is being requested and where it is going, but it has no idea who requested it. The traffic appears to originate from the Exit relay's own IP address.[2][4]
"Tor provides a distributed network of servers... so no single point can link you to your destination," the Electronic Frontier Foundation explained in its 2012 anonymity guide.[3]
This three-node architecture fundamentally shifts the trust model. A traditional VPN requires absolute trust in the provider, who can see both the user and the destination. Tor requires only that at least one of the three relays in the circuit is honest and not colluding with the others.[1][6]
The protocol also rotates these circuits automatically. By default, the Tor client builds a new circuit every 10 minutes for new connections, meaning a user browsing for an hour will route traffic through six entirely different paths. This limits the window of exposure if a circuit happens to be compromised by an adversary controlling multiple nodes.[2]
However, this privacy comes with a strict performance penalty. Because every 512-byte cell must be encrypted three times, routed across the globe to three different servers, and decrypted at each hop, the latency is inherently high.[1][7]
Furthermore, the Exit relay represents a vulnerability if the underlying traffic is not independently encrypted. If a user connects to an unencrypted HTTP website, the Exit relay can read the plaintext data, even though it does not know the user's identity.[3][5]
The protocol's reliance on volunteer relays means its capacity is permanently constrained by the bandwidth those volunteers donate. The mathematical guarantee of anonymity holds firm, but it dictates that the network will always trade speed for the certainty that identity and destination remain isolated.[2][7]
Terms to know
- Entry Guard
- The first node in a Tor circuit, which knows the user's IP address but cannot read the encrypted data or know the final destination.
- Middle Relay
- The second node in the circuit, which only knows the identity of the Entry Guard and the Exit relay, serving as a cryptographic air gap.
- Exit Relay
- The final node in the circuit, which decrypts the last layer of encryption and forwards the traffic to its final destination on the open internet.
- Onion Routing
- A technique for anonymous communication over a computer network where messages are encapsulated in layers of encryption, analogous to layers of an onion.
- Cell
- The standardized 512-byte packet of data used by the Tor protocol to prevent adversaries from tracking traffic based on packet size.
Questions readers ask
Does Tor hide my IP address?
Yes. The website you visit only sees the IP address of the Exit relay, not your actual IP address.
Can the Exit relay see my passwords?
If you are visiting a standard HTTPS website, the Exit relay cannot see your passwords. It can only see the encrypted HTTPS traffic. However, if you visit an unencrypted HTTP site, the Exit relay can read your data.
Why is the Tor network so slow?
Traffic must be encrypted three times and routed through three different servers located around the world before reaching its destination, which inherently adds significant latency.
Different angles
Privacy Advocates
View the protocol as an essential tool for human rights, free expression, and protection against mass surveillance.
Organizations like the Electronic Frontier Foundation argue that Tor is the only mathematically sound defense against traffic analysis. By ensuring that no single node in the network possesses both the sender's identity and the destination, the protocol protects journalists, whistleblowers, and citizens in restrictive regimes from state-level monitoring. They maintain that the societal benefits of this absolute anonymity far outweigh the potential for abuse.
Law Enforcement
Argue that the absolute anonymity provided by the three-node circuit complicates investigations and shields illicit activity.
Because the Exit relay strips the final layer of encryption and forwards traffic to the open internet, the traffic appears to originate from the relay itself. Law enforcement agencies frequently note that this architecture creates a structural barrier to tracing cybercrime, as subpoenaing an Exit relay operator yields no information about the actual user who initiated the connection through the Entry Guard.
Network Administrators
Focus on the operational challenges of managing Tor traffic, often blocking Exit relay IP addresses to prevent abuse.
For those managing corporate networks or public-facing web services, Tor presents a persistent security challenge. Because malicious actors can route attacks through the network, administrators frequently deploy automated blocklists that reject connections from known Exit relays. This creates a friction point where legitimate Tor users are often denied access to standard websites or forced to solve endless CAPTCHAs.
- Privacy Advocates
- View the protocol as an essential tool for human rights, free expression, and protection against mass surveillance.
- Law Enforcement
- Argue that the absolute anonymity provided by the three-node circuit complicates investigations and shields illicit activity.
- Network Administrators
- Focus on the operational challenges of managing Tor traffic, often blocking Exit relay IP addresses to prevent abuse.
Perspectives this story doesn't cover
- Exit relay operators facing legal liability
- Internet Service Providers
Sources
[1]USENIXTor: The Second-Generation Onion Router
Read on USENIX →
[2]The Tor ProjectPrivacy AdvocatesWhat protections does Tor provide?
Read on The Tor Project →
[3]Electronic Frontier FoundationPrivacy AdvocatesHow to Help Protect Your Online Anonymity Using Tor
Read on Electronic Frontier Foundation →
[4]Georgetown Law Technology ReviewLaw EnforcementOnion Routing and Tor
Read on Georgetown Law Technology Review →
[5]Firewalls Don't Stop DragonsNetwork AdministratorsHow Onion Routing Works
Read on Firewalls Don't Stop Dragons →
[6]HackerNoonHow does Tor *really* work? I read the whitepaper so you don't have…
Read on HackerNoon →
[7]Factlen Editorial TeamSynthesis by Factlen editorial team
Read on Factlen Editorial Team →
More in Technology
See all →Cryptographic Protocols
Double Ratchet Uses Ephemeral Diffie-Hellman Keys to Restore Post-Compromise Security
4 sources
Wearable Surveillance
EU Privacy Board Demands Prominent Recording Alerts on Smart Glasses to Prevent Covert Surveillance
7 sources
Wi-Fi Tracking
How Wi-Fi Probe Requests Leak Information Elements That Bypass MAC Randomization
5 sources
DMDC Breach
Pentagon Data Breach Exposes Social Security Numbers of 4 Million Military Personnel
3 sources
Comments
Every angle. Every day.
Get Technology stories with full source coverage and perspective breakdowns, free every day.




