Oblivious HTTP

Also known as: OHTTP

On this page 7

Oblivious HTTP (OHTTP) is a protocol, standardized by the IETF as RFC 9458, that lets a client send encrypted HTTP requests through a relay so that no single server learns both who sent a request and what the request contained. In privacy engineering, it is a practical privacy-enhancing technology for removing client IP addresses and connection metadata from individual transactions without the cost of a full anonymity network.

OHTTP achieves this by separating knowledge between two parties that are assumed not to collude: a relay that sees the client address but only ciphertext, and a gateway that decrypts the request but sees only the relay address. The design suits short, independent request and response pairs such as telemetry uploads, DNS lookups and safe-browsing checks.

How Oblivious HTTP separates identity from content

Oblivious HTTP works by wrapping a complete HTTP message inside an encrypted envelope that only the gateway can open, then routing that envelope through an independent relay. The client first obtains the gateway key configuration, which lists a public key and the supported cryptographic algorithms.

The client serializes its request with Binary HTTP (RFC 9292), encrypts it with Hybrid Public Key Encryption (HPKE, RFC 9180) and sends the result as a POST body of media type message/ohttp-req to the relay. The relay forwards the opaque payload to the gateway, which decrypts it, passes the inner request to the target resource and encrypts the answer under a key derived from the same HPKE context.

The table below lists the four roles and the information each one can observe during a single exchange.

RoleWhat it seesWhat it cannot see
ClientIts own request and the decrypted responseNothing hidden from it
Oblivious relayClient IP address, timing, message sizeRequest content and target path
Oblivious gatewayDecrypted request, relay IP addressClient IP address and connection
Target resourceRequest content as forwarded by the gatewayClient IP address and identity
Roles in an Oblivious HTTP exchange

Because each response is bound to its request through the HPKE exporter, every exchange is cryptographically independent. Two requests from the same client share no connection state at the gateway, which makes linking requests by transport metadata impossible for the gateway operator.

Key protocol components and parameters

An OHTTP deployment depends on a small set of negotiated parameters that determine both security strength and interoperability. Misconfiguring any of them can silently weaken the privacy guarantee.

ComponentTypical valuePurpose
Key configurationKey ID, KEM, KDF and AEAD listTells clients how to encrypt to the gateway
HPKE KEMX25519 with HKDF-SHA256Establishes the shared secret
HPKE AEADAES-128-GCM or ChaCha20-Poly1305Encrypts and authenticates messages
Encapsulation formatBinary HTTP, known-length formRepresents the inner request compactly
Media typesmessage/ohttp-req and message/ohttp-resMarks encapsulated requests and responses
Main OHTTP components and their purpose

Key configuration distribution is the most delicate parameter. If a gateway hands each client a unique public key, it can recognize clients by the key they use, a key-targeting attack that defeats the whole design. Deployments therefore publish keys through a consistent, auditable channel and rotate them on a schedule shared by all users.

OHTTP occupies a middle ground between a simple proxy and a multi-hop anonymity network, and choosing it requires understanding what it does not protect. The comparison below places it next to neighboring techniques in privacy engineering.

TechniqueTrust modelLinkability across requestsTypical latency cost
Oblivious HTTPRelay and gateway do not colludeUnlinkable at transport levelOne extra hop
Single HTTPS proxyProxy is fully trustedProxy sees and links everythingOne extra hop
VPN serviceProvider is fully trustedProvider can link all trafficSmall to moderate
Tor BrowserNo single relay is trustedCircuits isolate sessionsHigh and variable
MASQUE proxyingTwo-hop relay chainDepends on connection reuseOne or two extra hops
OHTTP versus other techniques that hide client identity

The key difference is per-message encapsulation. A proxy or VPN tunnels a long-lived connection, so the operator can correlate everything inside it, whereas OHTTP treats each request as a separate sealed object. OHTTP complements rather than replaces anonymization of the payload: if the request body itself contains a user ID, hiding the IP address achieves little.

Where Oblivious HTTP is deployed

OHTTP is best suited to stateless, small and frequent requests in which the service needs the data but not the identity of the sender. It is a poor fit for interactive sessions that depend on cookies, logins or streaming.

SituationRecommendationReason
Aggregate telemetry collectionUse OHTTPService needs counts, not senders
Safe-browsing or reputation lookupsUse OHTTPQueried URLs reveal browsing history
Oblivious DNS queriesUse OHTTP-based ODoH styleResolver should not see client address
Logged-in account actionsAvoid OHTTPIdentity is sent in the payload anyway
Large file transfers or streamsAvoid OHTTPDesign targets bounded single messages
Decision guide for adopting OHTTP

Browser vendors, operating system providers and content delivery networks run OHTTP relays for exactly these flows. A typical pattern pairs OHTTP transport with differential privacy or k-anonymity thresholds on the server, so that both the network metadata and the aggregated content are protected.

Limitations and common mistakes

The guarantees of Oblivious HTTP rest entirely on the non-collusion assumption. If the relay and gateway operators share logs, or are the same organization, timing and size correlation can re-link clients to requests. Independent operation, ideally under separate legal entities and contracts, is therefore a design requirement rather than a preference.

  • Identifying payloads: cookies, device IDs or account tokens inside the inner request reveal the client regardless of transport.
  • Traffic analysis: a relay that also observes gateway traffic can match messages by timing and length, so padding and batching help.
  • Replay exposure: OHTTP has no built-in replay protection, so non-idempotent requests need application-level safeguards.
  • Relay abuse control: the gateway cannot rate-limit individual clients, which pushes abuse prevention to the relay or to privacy pass tokens.
  • Key staleness: clients that cache an outdated key configuration see failed decryptions, so rotation must be coordinated.

A non-technical view

Imagine mailing a letter inside a sealed inner envelope, placed in an outer envelope addressed to a forwarding office. The forwarding office knows who sent the package but cannot open the inner envelope. The recipient opens the letter but only sees that it came from the forwarding office.

Oblivious HTTP applies the same idea to web requests. One company knows your address, another company knows your question, and neither knows both. As long as the two companies do not compare notes, your request stays disconnected from you.

A concrete example

A browser maker wants to learn which websites cause frequent crashes, but it does not want to know which person visited them. Each crash report is encapsulated with OHTTP and sent through a relay run by an independent network company, which strips the client IP address and forwards about two million small reports per day.

The browser maker’s gateway decrypts the reports and feeds them into an aggregation pipeline that only publishes domains reported by at least 50 distinct installations. Engineers fix the top crash sources within weeks, while the company’s servers never store a single client IP address linked to a browsing record, which also simplifies its data protection obligations.