Every time you see a 56-character address ending in .onion, you are looking at more than a URL. An onion address is a cryptographic identity, it literally contains the public key of the server it points to, encoded into the address itself. Understanding how onion services actually work explains both why they are so resilient and why their guarantees are narrower than most people assume.
What an onion address really is
Under the current version 3 protocol, every onion address is built from a 32-byte ed25519 public key belonging to the service. That key, a version byte, and a short checksum are concatenated and base32-encoded, producing exactly 56 lowercase letters followed by the .onion suffix. The Tor specifications document the formula openly: the address is base32(PUBKEY | CHECKSUM | VERSION) + ".onion", where the checksum is a truncated SHA3-256 of a constant string, the public key, and the version byte.
Because the address is derived from the key, there is no naming authority to go after. You cannot phish an onion address the way you can spoof a domain name, because a slightly different address points to a completely different key. If a site claims to be a particular market and publishes an onion address, the address itself is the proof of which server you are talking to, anyone who changes the key changes the address. This is why onion services are so resistant to impersonation, and also why markets constantly rotate their addresses: rotating the key is the only way to migrate to a new address.
Version 2 onion addresses were 16 characters and looked friendlier, but they contained only a truncated hash of a public key rather than the key itself. That design leaked metadata to directory relays and had practical weaknesses, so Tor deprecated v2 entirely in 2021. Every .onion address you encounter today should be 56 characters long.
The dance that hides both sides
The core trick of an onion service is that neither side ever learns the other's network location. When you connect to an onion site, six Tor relays are involved, arranged as two independent three-hop circuits, three chosen by your client and three chosen by the service. No single relay sees the whole path, and the rendezvous point where the two circuits meet knows neither who you are nor where the server is.
Here is the sequence, following the Tor rendezvous specification. First, the service operator picks several relays to act as introduction points and builds persistent circuits to them. Then it assembles documents called hidden service descriptors, which list the current introduction points and how to reach the service, encrypts them with keys derived from the address, and uploads them to a rotating set of HSDir (hidden service directory) relays.
When you want to visit the site, your Tor client asks the appropriate HSDir for the descriptor, picks a random relay as a rendezvous point, builds a circuit to it, and sends an ESTABLISH_RENDEZVOUS message carrying a random 20-byte cookie. Your client then builds a second anonymous circuit to one of the service's introduction points and passes along an introduction request containing the rendezvous cookie and the first half of a cryptographic handshake. The introduction point forwards that request to the service through the persistent circuit it already maintains. The service builds its own circuit to the rendezvous point, completes the handshake, and the rendezvous point stitches the two circuits together into a single encrypted tunnel.
From that point on, ordinary Tor relay cells flow between you and the service. Your traffic exits the service's own three-hop circuit, not to the public internet, but into the service's local web server, which only listens on the Tor interface. The service operator's real IP address never touches the public Tor network at all.
What onion services actually hide, and what they don't
Onion services provide responder anonymity: the server's location is hidden from clients and from most of the network. They also provide client anonymity to the service operator, the operator sees a Tor exit or internal node, never your real address. This bidirectional hiding is what makes them different from simply visiting a clearnet website through Tor, where the destination server always sees your exit node's IP.
But the guarantees have real limits worth understanding:
- Traffic analysis still works. An adversary who can observe enough of the network can correlate timing and volume patterns to guess which circuits meet at which rendezvous points. Onion services raise the cost of surveillance; they do not make it impossible.
- The service itself can log you. Tor hides your address from the server, but the application on top of Tor can still fingerprint you through cookies, account behavior, or simply by content you post. A market admin knows everything you tell them regardless of Tor.
- End-to-end encryption is separate. Onion services encrypt transport between relays, but the web page content is whatever the server sends. HTTPS inside Tor is redundant for transport but still useful for authentication, which is why many onion sites publish PGP keys and why some serve HTTPS on their onion addresses.
- Malware and exploits ignore Tor. If you download a file from an onion site, the file executes on your machine with your real privileges. Tor anonymizes the network path, not the payload.
- Single-hop and conflux variants exist. The rendezvous spec notes that single onion services can use reduced-hop circuits under certain conditions. The standard anonymous service uses three hops on each side.
Why v3 fixed the metadata leaks
The version 3 redesign was driven by a subtle privacy problem. HSDir relays hold the hidden service directory, and in v2 they received descriptors containing plaintext onion addresses. Any relay with the HSDir flag could therefore enumerate a slice of the live onion universe every day, a passive collection capability that researchers demonstrated repeatedly.
V3 solves this two ways. First, because the address is the public key, every descriptor can be encrypted with a key the address holder already has, the relay stores ciphertext it cannot read. Second, clients no longer ask for descriptors by onion address directly. Instead, the client derives a blinded public key that rotates daily, so directory relays see only a daily-rotating identifier rather than a stable, collectable address. Mass enumeration becomes dramatically harder.
Together these changes turned the hidden service directory from a metadata firehose into something much closer to a privacy-preserving lookup system, though, as always with distributed systems, determined global adversaries retain theoretical attack surface.
The life cycle of an onion address
An onion address is tied to a keypair, and whoever holds the private key controls the service. Operators generate keys with tools like tor-genkey or through higher-level service software, then publish descriptors pointing at their chosen introduction points. The address persists as long as the same key is used, but operators routinely rotate keys and addresses for operational security, because a burned address (one associated with a seizure, scam, or investigation) can never be safely reused.
This is why darknet markets maintain multiple mirror addresses and announce rotations on forums: the address is not a fixed property of the brand, it is a property of a particular deployment. When a market "changes its address," what actually changed is the keypair, the old address still resolves to the old server if it is still running, and the new address is a new identity entirely.
Law enforcement seizures exploit exactly this: they seize the servers and the keys, then sometimes keep the address alive as a honeypot. Users who fail to verify PGP-signed announcements can be lured onto the seized address believing it is the real market, which is precisely what happened in Operation Bayonet, where Dutch police ran the real AlphaBay address while the FBI took the original infrastructure.
Practical implications for users
For anyone browsing onion services, a few concrete takeaways follow directly from the protocol:
- Verify the full address. 56 characters, all lowercase, ending in .onion. Any deviation is either a typo or a phishing attempt.
- Treat addresses as ephemeral. A bookmarked onion address has a shelf life measured in weeks or months for active markets. Always confirm the current address through an independent channel, a forum signature, a PGP-signed announcement, or a directory like Tor.Watch rather than a search result.
- Bookmark carefully. A mistyped character produces a valid-looking but completely different address, there is no "close match" resolution. Tor will either fail or, worse, connect you to a malicious service that owns the mistyped key.
- PGP is the trust layer. Because addresses rotate and can be impersonated by anyone who gets users to type a different one, markets sign announcements with PGP keys that themselves rotate less frequently. Verifying PGP signatures on address-change posts is the standard mitigation, our PGP guide covers the mechanics.
- Don't confuse reachability with safety. A loading onion address proves the server is up and the key is valid. It says nothing about whether the operator is honest, our scam taxonomy covers what the protocol cannot protect you from.
Where to go deeper
The authoritative references are the Tor specifications themselves: the rend-spec protocol overview describes the full connection dance, the onion address encoding spec gives the exact base32 formula, and the Tor Project's v3 usage post explains the privacy improvements over v2. For the historical side, our coverage of Silk Road shows onion services in their first real-world deployment, and the Onymous takedown shows what happens when law enforcement decides the anonymity isn't enough.
Onion services are one of the more elegant pieces of applied cryptography ever deployed at scale, a naming system where the name is the key, a routing system where neither endpoint is visible, and a directory system designed so that even the indexes don't leak what they index. Its limits are equally instructive: anonymity protects the network path, and everything above that layer, trust, money, behavior, still needs its own defenses.
Comments 0