Skip to content

Onion Service Descriptors: How Tor Finds Hidden Services

Made with AI ยท Human reviewed

Onion service descriptors are the small signed documents that let a Tor client find a hidden service without knowing where that service is hosted. They sit at the center of how Tor’s onion services stay reachable while keeping the server’s location private.

This article walks through what a descriptor contains, how it is stored and fetched, and what it does and does not expose. It also covers the practical limits that matter for operators and visitors, including timing, availability, and the metadata that can still leak.

Why a Hidden Service Needs a Directory Entry

A hidden service on Tor cannot be found the way an ordinary website is found. Ordinary sites publish a domain name that resolves to a public IP address, but an onion service is designed so its operator never has to reveal that address.

That creates a practical problem: a visitor’s Tor client needs some way to learn which relays it should contact in order to reach the service.

The answer is a directory entry that describes the service in a form the network can distribute. This entry is called an onion service descriptor. It acts like a signed notice saying, in effect, that a particular onion address can be reached through a specific set of introduction points.

Consider a hypothetical news site that wants readers to reach it privately. Its operator wants the service to be findable by anyone who knows its address, yet does not want visitors or observers to learn where the server physically sits. Descriptors make that combination possible.

What a Descriptor Actually Contains

An onion service descriptor is a structured document with a defined format, created and signed by the service itself.

Its core job is to list the introduction points the service has chosen, along with the information a client needs to start a connection through them. Introduction points are relays that act as meeting places, passing along requests without learning the service’s real location.

The descriptor is signed with the service’s key so that clients can check it was produced by the owner of the onion address. The onion address itself is derived from the service’s public key, which is why the address can be verified rather than trusted on faith. A forged descriptor would fail signature checks and be rejected.

See also  Onion Service Authentication: How Access Control Works

Descriptors also carry time-limited material. Modern versions include a validity window and encryption that protects parts of the contents from relays that merely store the document. Readers should treat these details as evolving and consult the Tor Project’s current specifications for exact field layouts.

How Descriptors Are Published and Fetched

Descriptors move through the network in a predictable sequence. Each step is designed so that no single relay sees the whole picture. The overall flow generally looks like this:

  • The service builds its descriptor and signs it with its own key.
  • The service uploads the descriptor to a set of directory relays chosen by a deterministic rule.
  • A visitor’s client computes where the descriptor should be stored, based on the onion address and the current time period.
  • The client requests the descriptor from one of those directory relays.
  • The client verifies the signature and then builds a circuit to an introduction point listed inside.

Because the storage location depends on the time period, the set of directory relays changes over time. This rotation spreads the load and makes it harder for any one relay to be the consistent target of lookups. Operators should expect a short delay after publishing before the descriptor becomes reachable everywhere.

What Descriptors Reveal and What They Hide

A descriptor is designed to reveal as little as possible. It tells a client which introduction points to contact and how to verify the service, but it does not hand over the server’s IP address. The introduction points themselves do not learn the server’s location either, since they only relay requests to the service through an already established path.

That said, descriptors are not invisible. Directory relays that store a descriptor can see that a request for a given onion address occurred, and the timing and frequency of lookups can reveal patterns. A service that goes offline and comes back, or one that changes its introduction points often, may produce observable changes in the directory data.

For readers, the important lesson is that a descriptor protects location while leaving some metadata visible. Privacy of an onion service depends on many layers, and the descriptor is only one of them.

Descriptor Security and the Role of Keys

Trust in a descriptor rests on cryptography. The onion address encodes the service’s public key, so a client can confirm that a descriptor claiming to belong to that address was signed by the matching private key. This blocks a simple attack in which an adversary publishes a fake descriptor pointing to its own infrastructure.

Key management therefore matters a great deal. If an attacker obtains the service’s private key, they could sign descriptors and impersonate the service. Operators should treat that key as a high-value secret, keep it offline where practical, and back it up in a protected way. Losing the key means losing control of the address.

See also  Understanding VPN over Tor configurations for Privacy

Descriptor encryption adds another safeguard. Encrypting portions of the descriptor limits what intermediary relays can read, which narrows the information available to anyone who simply hosts the document. The exact mechanism is detailed in Tor specifications and changes as the protocol evolves.

Operator Considerations for Publishing Descriptors

Running an onion service involves decisions that affect how descriptors behave in practice. Operators who understand these trade-offs can make sound choices about availability, privacy, and maintenance without needing to master every protocol detail.

Choosing and Maintaining Introduction Points

Introduction points are selected by the service itself, and the descriptor advertises them to visitors. A service typically maintains several introduction points so that losing one does not cut off access. The service republishes its descriptor when these points change, which keeps the directory information current.

Operators should be aware that the set of introduction points is visible to anyone who fetches the descriptor. This is acceptable by design, since the points are relays and do not reveal the server. However, frequent churn can create observable patterns and should be balanced against reliability needs.

Keeping the Service Reachable Over Time

A descriptor only remains useful while the service is running and actively maintaining its circuits. If the service goes offline, its descriptor eventually expires and visitors can no longer reach it. Operators who want continuous availability should monitor their service, restart it reliably, and confirm that republication succeeds after restarts.

Time synchronization also matters. Descriptor validity and storage locations depend on the current time period, so a server with a badly wrong clock may publish descriptors that clients cannot find. Keeping the system clock accurate is a simple but important maintenance task.

Limits and Responsible Expectations

Descriptors make onion services findable without revealing their location, but they do not make a service immune to every form of observation. Operators should not assume that a hidden service is anonymous simply because its descriptor is encrypted or its server address is absent. Content, behavior, and metadata can still reveal information.

Operators also need to consider the law and their own obligations. Hosting an onion service is lawful in many places, but the rules differ by jurisdiction and the operator remains responsible for what they publish. Readers should consult qualified legal guidance rather than rely on general statements.

Visitor Experience and What to Expect

For a visitor, descriptor handling is mostly invisible. Tor Browser fetches the descriptor, verifies it, and builds the required circuits automatically. Most users notice only that an onion address sometimes takes longer to load than a normal website, because several relays must be contacted in sequence.

See also  Tor Circuit Rotation: How Your Route Changes Over Time

Delays are normal and usually reflect the extra hops and lookups involved. If a site will not load, the cause may be that the service is offline, its descriptor has not yet propagated, or the network is congested. Trying again after a short wait is often the simplest first step.

Visitors should also remember that using an onion address does not automatically protect everything they do. Logging in to personal accounts, sending identifying details, or enabling browser features can reveal identity regardless of how the site was reached.

Common Misunderstandings About Descriptors

One common misunderstanding is that a descriptor contains the server’s IP address. It does not. Its purpose is to point clients toward introduction points, which relay requests without revealing where the service runs.

Another misunderstanding is that the directory relays can read everything a visitor does with a site. They can see that a descriptor was requested, but they do not gain access to the content of the connection.

Some readers assume that because descriptors are signed, the service is guaranteed to be safe or trustworthy. A valid signature only proves that the descriptor came from the holder of the onion address’s key. It says nothing about the honesty, legality, or security practices of the people running the service.

Checklist for Operators and Curious Readers

Whether you run a service or simply want to understand the system, a few habits make descriptors easier to manage and reason about. The following points summarize practical priorities:

  • Protect the service’s private key as the single most important secret, and keep backups stored securely.
  • Confirm that the system clock is accurate, since descriptor storage depends on time.
  • Monitor that descriptors republish successfully after restarts, updates, or configuration changes.
  • Avoid publishing identifying details in content, since descriptors do not hide what a site says.

These steps will not eliminate every risk, but they address the most common causes of outages and the most serious mistakes. Readers who want exact field formats, timing rules, or current protocol versions should refer to the Tor Project’s published specifications, which document how descriptors are built and processed.

Where Onion Service Descriptors Are Heading Next

Onion service design continues to evolve, and descriptors are part of that work. Newer protocol versions have aimed to strengthen key handling, improve encryption of descriptor contents, and make lookups harder to correlate. Each change tries to balance stronger privacy against the practical needs of reliability and speed.

For readers planning their own use of hidden services, the most useful next step is to learn the current specifications and follow updates from the Tor Project. Protocol details shift over time, so guidance written even a few years ago may no longer match how the system works.

Looking ahead, the best approach is to treat descriptors as one component of a larger privacy practice. Careful key management, accurate maintenance, and realistic expectations about metadata will matter as much as any single protocol improvement.