Privacy by default: Cloudflare’s Privacy Edge stack
Cloudflare’s original pitch was built on three pillars: security, reliability, and performance. The company has since added a fourth: privacy. With user expectations around data protection rising, Cloudflare is introducing Privacy Edge, a suite of products aimed at helping developers and site owners bake privacy into their applications at the network level, rather than as an afterthought.
The suite includes four offerings:
- Privacy Gateway: Encrypts request data and forwards it through an IP-blinding relay
- Code Auditability: Verifies that code delivered to browsers hasn’t been tampered with
- Privacy Proxy: A VPN-like proxy built natively into application architecture
- Cooperative Analytics: A multi-party computation approach to measurement and analytics
All of these tools are built on open Internet standards, many co-authored by Cloudflare’s research team, continuing the company’s pattern of using standards to drive privacy improvements—following its free SSL certificates and the 1.1.1.1 DNS resolver.
Privacy Gateway: separating data from its source
Some applications need to receive HTTP requests to function, but don’t need to know where those requests come from. Privacy Gateway addresses this by encrypting request data and passing it through a relay that strips network-level identifiers—most importantly, IP addresses—before it reaches the application server.
This design is based on Oblivious HTTP (OHTTP), an emerging IETF standard. The data flow works as follows:
- The client encapsulates an HTTP request using the public key of the customer’s gateway server, and sends it to the relay over an HTTPS connection.
- The relay forwards the request to the gateway over its own HTTPS connection.
- The gateway decapsulates the request and forwards it to the application server.
- The gateway returns an encapsulated response to the relay, which forwards it to the client.
The key innovation in Cloudflare’s implementation is that messages are encrypted (using HPKE) to the application server itself. This means the relay can see the source and destination of each message but nothing of its contents, while the application sees the data but not where it originated.
Cloudflare has already deployed this approach with Flo Health, a period tracking app. In “Anonymous mode,” Flo encrypts and forwards traffic through Privacy Gateway so users’ IP addresses are replaced with ones from Cloudflare’s network.
Code Auditability: proving code integrity
For privacy-critical applications, users need assurance that the JavaScript, CSS, or HTML delivered to their browser hasn’t been altered. Code Auditability addresses this by generating a hash of the code and having two independent parties compare hashes when the code is served to the user.
The approach was first deployed at scale with Meta’s WhatsApp Web. The flow works like this:
- WhatsApp publishes its latest JavaScript libraries to its servers and sends the corresponding hashes to Cloudflare’s audit endpoint.
- The WhatsApp web client fetches the libraries from WhatsApp.
- The Code Verify browser extension fetches the hash for that version from Cloudflare over a separate, secure connection.
- The extension compares Cloudflare’s “known good” hash with the one it computed locally.
If the hashes match, the code is verified. If they don’t, the code running in the browser differs from what WhatsApp intended to serve. Cloudflare sees broad applicability beyond WhatsApp—potential use cases include password managers, email applications, and certificate issuance, all of which handle sensitive data and could be tampering targets.
Near-term, Cloudflare is working with other developers to co-design solutions. Longer-term, the company is exploring standardization, potentially building on Content Security Policy standards, the Isolated Web Apps proposal, and eventually making code auditability native to browsers so extensions aren’t required.
Privacy Proxy: VPN protection in applications
Privacy Proxy aims to give applications the protection of a VPN by default. The platform encrypts browsing traffic, replaces a device’s IP address with one from Cloudflare’s network, and forwards it to its destination. It’s composed of three services:
- Privacy API: Issues unique cryptographic tokens that are later redeemed against the proxy to ensure only valid clients connect.
- Geolocated IP assignment: Assigns each connection a Cloudflare IP address based on the client’s approximate location.
- Privacy Proxy: An HTTP CONNECT-based service on Cloudflare’s network that validates tokens, prevents double spending, and handles traffic proxying.
The platform’s design separates identity from proxying. Cloudflare is already working with Apple on Private Relay, which uses an Apple-operated ingress proxy to handle user validation (e.g., confirming iCloud+ status) and a Cloudflare-operated egress proxy for actual traffic—so neither party sees both who the user is and what they’re browsing.
Cooperative Analytics: measuring without observing
Cooperative Analytics answers a question that sounds like magic: how do you compute results from a poll without seeing individual votes, or update a machine learning model without seeing individual data points?
The answer is cryptography. The system is based on the Distributed Aggregation Protocol (DAP), which applies the MapReduce concept to aggregation while ensuring no individual input can be traced back to its source:
- Measurements are “secret shared”—split into pieces. If a user’s input is
5, it might be split into two shares of[10, -5]. - The shares are distributed among different, non-colluding servers for aggregation. No single party has enough information to reconstruct any user’s input.
- The servers communicate to verify that inputs are valid, using multi-party computation to check validity without learning the input itself.
- Once enough shares are aggregated for anonymity and statistical significance, each server sends its summed shares to the consumer, who computes the final result.
The protocol supports multiple input types beyond sums, including string inputs and linear regression. Apple and Google implemented early versions of this system for COVID-19 exposure notifications. Other potential uses include sensitive browser telemetry and geolocation data—any scenario requiring population-level questions without individual-level observation.
Cloudflare’s implementation, called Daphne, runs on Cloudflare Workers. Since DAP requires different parties to operate separate aggregation servers, Cloudflare is working with partners to serve as one of those parties.
Trust, but verify
Privacy Edge products distribute information across multiple parties, but Cloudflare acknowledges that trust is limited. To address this, the company is focusing on transparency:
- Privacy Gateway’s server and DAP’s aggregation server code are open source, and all standards work is public through the IETF.
- Detailed privacy notices are being developed for each product, describing what network data Cloudflare sees, doesn’t see, and how long it retains data.
- Cloudflare is continuing to develop protocols like Oblivious HTTP that minimize data observation and logging by design, rather than requiring trust.
Privacy Edge products are currently in early access. Cloudflare is seeking application developers interested in Privacy Gateway for user-facing apps, browser and VPN vendors for Privacy Proxy, and organizations shipping sensitive software who want to collaborate on code auditability.



