Skip to content
Vol. 1 · Ed. 2026
CyberGlossary
Entry № 755

Onion Routing

What is Onion Routing?

Onion RoutingAn anonymous communication technique that wraps a message in nested layers of encryption, with each relay removing one layer until the payload reaches its destination.


Onion routing is the cryptographic design behind Tor and similar mixnets. The client chooses a path of relays, derives a separate symmetric key with each one, and then encrypts the message in successive layers, innermost first. As the packet traverses the circuit, each relay decrypts exactly one layer and learns only its immediate predecessor and successor, never both endpoints together. This prevents network-level observers, ISPs, or any single relay from linking source to destination. Onion routing also enables hidden services, where both client and server build half-circuits that rendezvous inside the network. Limitations include traffic-analysis attacks, malicious exit nodes for plaintext traffic, and latency overhead; mitigations include guard-relay pinning, end-to-end TLS, and constant-rate cover traffic.

Examples

  1. 01

    A Tor circuit of guard, middle, and exit relays where each peels off one layer of AES encryption.

  2. 02

    An onion service's introduction-point and rendezvous-point handshake that hides both client and server addresses.

Frequently asked questions

What is Onion Routing?

An anonymous communication technique that wraps a message in nested layers of encryption, with each relay removing one layer until the payload reaches its destination. It belongs to the Attacks & Threats category of cybersecurity.

What does Onion Routing mean?

An anonymous communication technique that wraps a message in nested layers of encryption, with each relay removing one layer until the payload reaches its destination.

How does Onion Routing work?

Onion routing is the cryptographic design behind Tor and similar mixnets. The client chooses a path of relays, derives a separate symmetric key with each one, and then encrypts the message in successive layers, innermost first. As the packet traverses the circuit, each relay decrypts exactly one layer and learns only its immediate predecessor and successor, never both endpoints together. This prevents network-level observers, ISPs, or any single relay from linking source to destination. Onion routing also enables hidden services, where both client and server build half-circuits that rendezvous inside the network. Limitations include traffic-analysis attacks, malicious exit nodes for plaintext traffic, and latency overhead; mitigations include guard-relay pinning, end-to-end TLS, and constant-rate cover traffic.

How do you defend against Onion Routing?

Defences for Onion Routing typically combine technical controls and operational practices, as detailed in the full definition above.

Related terms