Course contentsShow
← Security
Lesson 2983 of 3,05255. Secure CommunicationsFree lesson

Tor Network Architecture

Understand Tor's design: onion routing, three-hop circuits, directory authorities, and relay types.

Tor Network Architecture

What you'll learn: How Tor's multi-layer routing design protects your anonymity through circuits, relays, and distributed directory services.

The Onion Routing Concept

Tor (The Onion Router) protects anonymity by wrapping your traffic in multiple layers of encryption—like an onion. When you connect, your data passes through three randomly selected relays, with each relay only knowing the previous and next hop. No single relay sees both your identity and destination.

Think of it like sending a locked box inside another locked box inside a third box. Each courier along the route opens just one lock, never seeing what's inside.

Three-Hop Circuit Design

Every Tor connection uses a three-hop circuit:

  1. Guard/Entry relay: Your entry point, sees your IP but not your destination
  2. Middle relay: Knows neither your IP nor destination, just passes encrypted traffic
  3. Exit relay: Decrypts final layer and connects to destination, but doesn't know your IP

This separation prevents any single relay operator from linking you to your activity. Circuits rotate roughly every 10 minutes.

Directory Authorities and Relay Types

Directory authorities are trusted servers (currently 9 worldwide) that maintain consensus about which relays are trustworthy, fast, and available. They publish this directory every hour so clients know which relays exist.

Relay types include:

  • Guard relays: Stable, high-bandwidth entry points (your client picks a few guards for months)
  • Middle relays: Transit-only, never see unencrypted traffic
  • Exit relays: Handle final connection to websites (highest risk for operators)
  • Bridge relays: Unlisted relays that help users bypass censorship

This distributed architecture prevents centralized control—no single entity can deanonymize all users or shut down the network.

Key Takeaway: Tor uses three-hop onion routing with specialized relay roles and distributed directory authorities to provide anonymity without trusting any single party.