What is Onion Routing, and where does the "onion" name come from?
Onion Routing wraps a message in multiple layers of encryption; each relay peels off one layer, like peeling an onion.
* Peeling the onion — each relay strips one encryption layer to reveal only the next hop. *
* Nested layers — the "onion" of onion routing. — Harrison Neal, CC BY-SA 3.0, via Wikimedia Commons. *
The sender encrypts the data in nested layers, one per relay on the path. As the message travels, each router removes ("peels") exactly one layer, revealing only where to send it next — never the full route or the final content.
Key technical properties:
- Public-key cryptography is used only to set up the connection (to agree on keys).
- A route is established once per connection and then reused.
- Each participant can build its own individual routes successively.
- It is much faster than classic mix networks because, after setup, the actual data is protected by fast symmetric encryption.
The genius is that no single relay knows both the source and the destination: the entry node knows who you are but not where you're going; the exit node knows the destination but not who you are.
Tip: Think of a letter inside nested envelopes — each post office opens only the outermost envelope addressed to it.
Go deeper:
Onion routing (Wikipedia) — the layered-encryption technique and its NRL origins.