Tor is a decentralized network designed to protect your online privacy by concealing both your identity and the websites you visit. The core concept of Tor involves routing your internet traffic through a series of volunteer-run relays, each layer of encryption making it harder for any single entity to track your activity.
How Onion Routing Works
The problem with traditional internet connections is that your Internet Service Provider (ISP) or other network intermediaries can see who you are and where you're connecting. Tor addresses this by encrypting your traffic in layers, much like an onion. Each layer of encryption is peeled off by a different relay in the network.
- Client Selection: Your client software picks three relays from the volunteer-run network: a guard, a middle relay, and an exit relay.
- Encryption Layers: The traffic is wrapped in three layers of encryption. As it passes through each relay:
- The guard removes the outermost layer, learning your IP address but not where you're going.
- The middle relay removes the second layer, again knowing nothing about the destination except that it's connected to the guard and exit relays.
- The exit relay removes the innermost layer, seeing the final destination (and plaintext if the inner traffic isn't TLS-encrypted).
This process ensures that no single relay knows both your origin and destination. Correlation of this information requires watching multiple points in the network simultaneously, making it a complex task for passive adversaries.
Circuits and Relays
Circuits are established every 10 minutes by default to maintain security, although guards stay stable longer (counterintuitively better against certain attacks). This setup introduces latency and additional hops around the globe but is necessary for protecting your privacy. Tor is best suited for browsing rather than real-time applications like gaming.
Onion Services
Onion services use a similar principle of encryption but involve two relays: a rendezvous relay where the client and server meet, ensuring that neither party learns each other's IP addresses. The service name is derived from its cryptographic key, making it self-authenticating without needing a Certificate Authority (CA). Legitimate uses include secure dropboxes for journalists, anonymous web mirrors in censored countries like Facebook and BBC, and hosting services without exposing your home IP.
Running Relays
Running a relay (guard or middle) is legal and helps the network. However, running an exit from your home is risky because it exposes your IP address to others' traffic, potentially leading to abuse complaints. Exit relays should be run in data centers by organizations with experience handling legal issues.
Usage Notes
To use Tor effectively:
- Use the official Tor Browser for a secure browsing experience.
- For networks that block Tor, consider using bridges and pluggable transports.
- While Tor can be used for illegal activities, it also supports legitimate uses like privacy protection, circumventing censorship, and anonymous research. Running relays is encouraged to support the network.
By understanding these principles, you can better appreciate how Tor works and use it responsibly.