LOGBOOK

HELP

Quiz Entry - updated: 2026.07.05

How is a 3-hop Onion route built step by step, and why is each hop layered on the previous keys?

Alice negotiates a symmetric key with each router in turn (K1, K2, K3), tunnelling each new handshake through the keys already established, so no router sees the whole circuit.

Sequence: Alice negotiates K1 with OR1, tunnels K2 through OR1, then K3 through OR1+OR2; data triple-encrypted.

* Incremental circuit build — each new key is negotiated through the layers already established. *

A Tor client obtaining the relay list from a directory server before building a circuit.

* Step 1 — the client fetches relays to build a circuit. — Electronic Frontier Foundation, CC BY 3.0, via Wikimedia Commons. *

The circuit is built incrementally using authenticated Diffie-Hellman:

  1. Alice ↔ OR1: authenticated DH directly with Onion Router 1 → shared symmetric key K1.
  2. Alice ↔ OR2: authenticated DH with OR2, sent through the K1-encrypted tunnel → key K2.
  3. Alice ↔ OR3: authenticated DH with OR3, sent through K1 and K2 → key K3.
  4. Connection to Bob: the TCP connection is triple-encrypted with K1, K2, K3 — each router can strip only its own layer.

Why build it this way? Because each extension is wrapped in the previous layers, OR2 never learns Alice's identity (it only ever talks to OR1), and OR3 only talks to OR2. Alice alone knows all three keys and the full path.

Tip: Authenticated DH (not plain DH) is essential — it prevents a man-in-the-middle from impersonating a relay during key exchange.

Go deeper:

From Quiz: PRIVACY / Anonymous Surfing, Tor & Location Tracking | Updated: Jul 05, 2026