General 20 min read

The Server Reads Every Byte and Understands None of It

MMNMNOTE
homomorphic encryptionprivate information retrievalencrypted searchai and your dataprivacynote-taking

A server can answer a question about your encrypted data without learning what you asked. It does not manage this by skipping the parts you did not want. It reads every byte it holds, on every query — and understands none of it. The blindness is bought with the exhaustive read.

That result is a theorem, not a benchmark. Amos Beimel, Yuval Ishai and Tal Malkin proved it for private information retrieval — the problem of fetching record i without the database operator learning i. Their paper, presented at CRYPTO 2000 and published in the Journal of Cryptology in 2004, says it in one line: "We show that in the standard PIR model, where the servers hold only the database, linear computation cannot be avoided."1

Two decades later, the authors of the fastest single-server scheme in the field repeat it as a design constraint. Alexandra Henzinger, Matthew M. Hong, Henry Corrigan-Gibbs, Sarah Meiklejohn and Vinod Vaikuntanathan write that "the server must touch every bit of the database to answer even a single client query."2

The result, stated precisely

In the standard model, where a server holds only the database, a private query cannot be answered with less than linear server work. If the server skipped a record, the skip itself would be a signal about what you wanted. Beimel, Ishai and Malkin give the reason in one sentence, and it carries the whole argument.

"if the server does not read xᵢ in response to some query, it knows that the user is not interested in xᵢ, violating the user's privacy."3

Reading everything is how the server says nothing.

The exhaustive scan is not a performance failure awaiting better engineering — it is the mechanism. A server that reads selectively has already learned something, because which bytes it chose to read is itself a message.

The alternative was known from the start, and it was absurd. Benny Chor, Oded Goldreich, Eyal Kushilevitz and Madhu Sudan opened the field in 1995 by naming the risk plainly: "a curious database operator can follow the user's queries and infer what the user is after."4

Their baseline for perfect privacy against a single server was to download the whole thing — "namely n bits should be communicated."5 Private information retrieval is the trade that replaces your download with the server's scan.

What the blindness costs, in measured numbers

The cost appears as throughput, and the ceiling is physics rather than cryptography. Because the algorithm is to read all of it, the fastest any scheme can run is the speed at which a server pulls the database out of memory. SimplePIR's authors measured that limit, then built a scheme that nearly reaches it.

Their per-query work is stated per byte of database, not per record: "the SimplePIR server performs fewer than one 32-bit multiplication and one 32-bit addition per database byte."6

Every byte. Every query. That phrase is the tell.

MeasurementFigure
Hard throughput ceiling (memory read speed, their machine)~12.4 GB/s/core7
SimplePIR server throughput10 GB/s/core6
Client "hint" download for a 1 GB database121 MB8
Per-query communication thereafter242 KB8

The authors name the read itself as the limit: "a hard limit on the throughput of PIR schemes ... is the speed with which the PIR server can read the database from memory: roughly 12.4 GB/s/core on our machine."7

Note the third row — the client pays too. To query a 1 GB database, "the client must download a 121MB 'hint' about the database contents; thereafter, the client may make an unbounded number of queries, each requiring 242 KB of communication."8 Their second scheme shrinks that hint to 16 MB and raises the per-query cost to 345 KB.8

Why a lookup works and a conversation does not

Fetching a record is a fixed-size operation. A conversation is not. Computing on ciphertext requires the work to be expressed as a circuit of statically known shape, which rules out ordinary software machinery — variable-length data, data-dependent branching, loops sized by their input. That constraint, not the overhead, separates a caller-ID lookup from a chat with a folder of prose.

Jeremy Kun, who worked on Google's homomorphic-encryption compiler, listed the constraints in a 2023 primer. In that compiler "all loops must be fully unrolled and have statically-known bounds"; "all control flow is multiplexed, meaning that all branches of all if statements are evaluated, and only then is one chosen"; and "all data needs to have static sizes," with "pointers, and dynamic memory allocation are not supported."9

His sharpest illustration is a string comparison. Running it on a short input and on a long one takes the same time, because "the program processes all MAX_LENGTH characters without knowing if they are null bytes."10 That is the thesis at the scale of one function — data-independent runtime is the privacy. A program that finished early would have announced that the string was short.

The shape is the constraint. The overhead is only the bill.

One number from that primer travels badly, so state it correctly. Encrypting a 100×100 greyscale image "will cost you 218 MiB to store all the pixels in memory. It's roughly a 20,000x overhead," because in the bit-level scheme described there, "Each encryption of a single bit corresponds to a list of roughly 700 32-bit integers."11 That is a storage ratio for one scheme — not a speed ratio. Repeating it as "20,000× slower" changes the claim.

What is actually shipping today

One consumer deployment is documented by its vendor as shipped, not announced. Apple's support document states that "Starting in iOS 18, iPadOS 18, and macOS Sequoia, Enhanced Visual Search lets you search your photo library for landmarks or points of interest in photos or videos" — and adds a limit in the same breath.

"Enhanced Visual Search isn't available in all countries or regions."12

The mechanism is the one described above, applied to a lookup. An on-device model produces "a low-fidelity mathematical representation" of the part of a photo that might contain a landmark, and Apple is precise about what travels: "This embedding — not image data — is encrypted and sent to Apple servers ... The decryption keys remain on your device, so that Apple servers can't decrypt the encrypted embedding or search result."13

Apple's research write-up states the same guarantee for the search itself: "the server does not learn the client's private embedding or the retrieved results."14 The library behind it is public — apple/swift-homomorphic-encryption, created on 17 June 2024 under Apache-2.0.15

What is not shipping is the thing most people picture. Google's own engineering post sets encrypted inference as a goal rather than a state: "Our vision is to make HEIR a one-click solution to enable non-experts to incorporate encrypted inference into production applications."16 A vision is not a feature. What ships is a lookup.

The guarantee is narrower than it sounds

Three qualifications belong on every claim in this piece. The cryptography covers one path, in one direction, at a cost in fidelity. Read the shipped deployment closely and each qualification appears in the vendor's own design decisions rather than in anyone's critique of them.

It is not treated as sufficient on its own. Apple layers differential privacy on top, "with ε = 0.8, δ = 10⁻⁶", has the client issue "fake queries alongside its real ones," and routes traffic through an OHTTP relay "operated by a third party — as an anonymization network."17 If encryption alone answered the question, none of those layers would need to exist.

It costs fidelity. The embedding "is quantized to 8-bit precision before being encrypted" to meet the latency and cost requirements of a large-scale production service.18 Precision is one of the currencies this is paid in.

It runs one way. Google's post frames the motivation from the provider's side: "Shipping proprietary AI to a device risks leaking the model."19 Encrypting your input is what lets the model stay on someone else's servers. The protection is real, and asymmetric by design.

The scope is a feature, not a slogan.

A cryptographic guarantee says nothing about whether you agreed to the transaction. The clearest statement of that gap came from the developer who found the feature. Jeff Johnson wrote on 28 December 2024 that, going through his iPhone settings, he "discovered a new setting for Photos that was enabled by default: Enhanced Visual Search."20

His objection was not to the mathematics, and he said so: "I'm not claiming that Apple's privacy protection technology is flawed."21 The argument he made instead is the one worth keeping — "Technology is never a substitute for consent," and "There's more to privacy than just secrecy; privacy also means ownership."21

Thomas Claburn, reporting for The Register on 3 January 2025, recorded the same fact in the same terms: the feature was enabled "by default, seemingly without explicit consent."22

Two different properties. One is whether a server can read your data. The other is whether you chose to send it.

The caveats, and what would change them

The honest counter-argument is that these numbers are falling fast, and Jeremy Kun makes it himself. Homomorphic encryption, he writes, "shifts the capability/privacy trade-off to a question of cost. And the cost of homomorphic encryption is rapidly decreasing."23 He also wrote the 2023 primer quoted above.

That before-and-after belongs to one engineer working the same problem across three years — not to two independent parties.

The field's own measurements support him. In SimplePIR's comparison table an early single-server construction reaches 0.131 MB/s of throughput against SimplePIR's 10,305 MB/s — a gap of roughly 78,000×, derived here from two printed cells rather than stated by the authors.24 No latency figure is quoted in this post; Google's post notes that its "latency numbers are presented for a single-threaded CPU."25

Two more limits deserve naming. Sublinear schemes do exist, at a price: the SimplePIR authors note that recent schemes preprocess the database so the server can answer in sublinear time, "but all known approaches require either client-specific preprocessing ... or impractically large server storage."7 Beimel, Ishai and Malkin proposed exactly that model — PIR with preprocessing — in the same paper as the way around their own lower bound.1

Splitting the work across two non-colluding servers is faster, and weaker in kind: "their security is brittle, as it stems from a non-collusion assumption rather than from cryptographic hardness."26

What none of this moves is the shape. Falling costs make more circuits affordable. They do not make a circuit out of an open-ended conversation.

What this means for a folder of notes

For a folder of prose, the answer that holds today is to keep the computation local and send on purpose. The shipped constructions fit queries with a known shape and a fixed size. A vault of thousands of files, searched by a question you have not written yet, is the opposite shape.

Two adjacent facts complete the picture. Whether your data left the device at all is usually decided by the embedding step rather than the chat step, which is the subject of The Chat Runs on Your Machine — the Embedding Step May Have Uploaded Every Note.27

And an embedding sent in the clear is not an anonymous artifact, as The Embedding of Your Note Is Not Anonymous sets out.28 The construction described here is the one case where that same outbound vector is a ciphertext the server cannot decrypt.

So the practical reading is short:

  1. Treat "encrypted" as a claim about one path, not about a product.
  2. Ask which leg of a pipeline leaves your device, and in what form.
  3. Expect encrypted computation where the query is a lookup, not where it is a conversation.
  4. Read a default-on setting as a consent question, separate from the cryptography.
  5. Keep the folder local when the work can be done locally.

Craig Gentry's 2009 construction promised "a scheme that allows one to evaluate circuits over encrypted data without being able to decrypt."29 Seventeen years on, that promise is intact and exact. It was always a promise about circuits.

Frequently Asked Questions

The questions below are the ones people actually ask about this, several of them in public developer forums over the past decade. Each answer is scoped to what the cited sources support, and none of them generalizes into a claim that any particular product keeps your data private.

Could a server search my notes without being able to read them?

For a lookup, yes, and this ships today in at least one consumer product.12 For open-ended search over a large folder of prose, no. The computation must be expressed with statically known bounds and fixed-size data, and every branch of every conditional is evaluated.9 A question you have not written yet has no fixed shape.

Does my AI chat use homomorphic encryption so the provider cannot read it?

No general chat assistant is documented as working this way. Google's engineering post describes encrypted inference as a stated goal — "Our vision is to make HEIR a one-click solution to enable non-experts to incorporate encrypted inference into production applications" — rather than a shipped capability.16 The deployed examples are lookups.12

What is the limiting factor of homomorphic encryption?

Server work, and specifically the read. Because a private query requires touching the whole database,2 the ceiling is memory bandwidth: the SimplePIR authors measured roughly 12.4 GB/s/core on their machine and named it a hard limit on throughput.7 Their scheme reaches 10 GB/s/core, close to that wall.6

Isn't this just end-to-end encryption until you decrypt the query for the model?

That is the distinction worth learning. In the deployed path, no decryption happens at the server. Apple states that "the server does not learn the client's private embedding or the retrieved results," and that the decryption keys stay on the device.1314 The scope is one protocol on one path, and it says nothing about metadata or request timing.

How would you search a database full of encrypted data?

Two options exist. Download all of it, which was the 1995 baseline for perfect single-server privacy.5 Or have the server scan all of it blind, which is what private information retrieval does.2 The work does not disappear in either case; it moves between the two parties.

Multi-server schemes are faster, so why not just use two servers?

Because the security changes in kind, not degree. The SimplePIR authors write that "their security is brittle, as it stems from a non-collusion assumption rather than from cryptographic hardness."26 You trade a mathematical guarantee for a promise that two operators will not compare notes.

Is the 20,000× figure a measure of how much slower this is?

No. It is a storage ratio for one bit-level scheme. Encrypting a 100×100 greyscale image "will cost you 218 MiB to store all the pixels in memory. It's roughly a 20,000x overhead," because each encrypted bit becomes "a list of roughly 700 32-bit integers."11 Repeating it as a speed figure changes the claim.


The server reads every byte and understands none of it, and that is not a flaw in the design. The exhaustive read is the guarantee, performed in full, on every single query.


Notes stay on your own device with mnmnote.com — plain Markdown, offline, open in any editor.

Footnotes

  1. Beimel, A., Ishai, Y., & Malkin, T. "Reducing the Servers' Computation in Private Information Retrieval: PIR with Preprocessing." CRYPTO 2000; Journal of Cryptology 17:125–151 (2004), DOI 10.1007/s00145-004-0134-y. https://www.iacr.org/archive/crypto2000/18800056/18800056.pdf 2

  2. Henzinger, A., Hong, M. M., Corrigan-Gibbs, H., Meiklejohn, S., & Vaikuntanathan, V. "One Server for the Price of Two: Simple and Fast Single-Server Private Information Retrieval." 32nd USENIX Security Symposium (2023), §1. https://www.usenix.org/system/files/usenixsecurity23-henzinger.pdf 2 3

  3. Beimel, Ishai & Malkin, ibid., §4 ("Lower Bounds"). The source prints the index as a subscript. https://www.iacr.org/archive/crypto2000/18800056/18800056.pdf

  4. Chor, B., Goldreich, O., Kushilevitz, E., & Sudan, M. "Private Information Retrieval." Journal of the ACM 45(6), November 1998, pp. 965–982 (preliminary version FOCS 1995). Abstract. https://www.cs.umd.edu/~gasarch/TOPICS/pir/first.pdf

  5. Chor, Goldreich, Kushilevitz & Sudan, ibid. Full sentence: "when accessing a single database, to completely guarantee the privacy of the user, the whole database should be downloaded; namely n bits should be communicated." https://www.cs.umd.edu/~gasarch/TOPICS/pir/first.pdf 2

  6. Henzinger et al., ibid., abstract. https://www.usenix.org/system/files/usenixsecurity23-henzinger.pdf 2 3

  7. Henzinger et al., ibid., §1 — the memory-bandwidth ceiling, and the preprocessing caveat on sublinear schemes. https://www.usenix.org/system/files/usenixsecurity23-henzinger.pdf 2 3 4

  8. Henzinger et al., ibid., abstract — SimplePIR hint 121 MB and 242 KB per query; DoublePIR hint 16 MB at 345 KB per query. https://www.usenix.org/system/files/usenixsecurity23-henzinger.pdf 2 3 4

  9. Kun, J. "Google's Fully Homomorphic Encryption Compiler — A Primer." jeremykun.com, 13 February 2023. https://jeremykun.com/2023/02/13/googles-fully-homomorphic-encryption-compiler-a-primer/ 2

  10. Kun, J., ibid. — the constant-runtime string comparison. https://jeremykun.com/2023/02/13/googles-fully-homomorphic-encryption-compiler-a-primer/

  11. Kun, J., ibid. — the 218 MiB / 20,000x storage overhead and the ~700 32-bit integers per encrypted bit, for the scheme the source names as gate bootstrapping. https://jeremykun.com/2023/02/13/googles-fully-homomorphic-encryption-compiler-a-primer/ 2

  12. Apple Support. "About Enhanced Visual Search in Photos," document 122033. https://support.apple.com/en-us/122033 2 3

  13. Apple Support, ibid. — the on-device embedding, what is transmitted, and where the decryption keys stay. https://support.apple.com/en-us/122033 2

  14. Apple Machine Learning Research. "Combining Machine Learning and Homomorphic Encryption in the Apple Ecosystem," 24 October 2024 — the private-nearest-neighbour-search guarantee. https://machinelearning.apple.com/research/homomorphic-encryption 2

  15. GitHub. apple/swift-homomorphic-encryption — "Homomorphic Encryption library and applications in Swift," created 17 June 2024, Apache-2.0. https://github.com/apple/swift-homomorphic-encryption

  16. Kun, J. (Staff Software Engineer, Google). "How Google is Making Private AI Practical with Homomorphic Encryption." blog.google, 14 August 2026. https://blog.google/security/how-google-is-making-private-ai-practical-with-homomorphic-encryption/ 2

  17. Apple Machine Learning Research, ibid. — differential privacy parameters, fake queries, and the third-party OHTTP relay. https://machinelearning.apple.com/research/homomorphic-encryption

  18. Apple Machine Learning Research, ibid. — 8-bit quantization of the embedding before encryption. https://machinelearning.apple.com/research/homomorphic-encryption

  19. Kun, J. (Google), ibid. — on why the model stays on the provider's servers. https://blog.google/security/how-google-is-making-private-ai-practical-with-homomorphic-encryption/

  20. Johnson, J. "Apple Photos phones home on iOS 18 and macOS 15." lapcatsoftware.com, 28 December 2024. https://lapcatsoftware.com/articles/2024/12/3.html

  21. Johnson, J. "Technology is never a substitute for consent." lapcatsoftware.com, 4 January 2025. https://lapcatsoftware.com/articles/2025/1/1.html 2

  22. Claburn, T. The Register, 3 January 2025, 08:34 UTC. https://www.theregister.com/2025/01/03/apple_enhanced_visual_search/

  23. Kun, J. (Google), ibid. — on cost overhead and the trade-off. https://blog.google/security/how-google-is-making-private-ai-practical-with-homomorphic-encryption/

  24. Henzinger et al., ibid., Table 1 — maximum achievable throughput per core: KO + Paillier at 0.131 MB/s; SimplePIR at 10,305 MB/s. The ≈78,000× ratio is derived from those two printed figures, not stated by the authors. https://www.usenix.org/system/files/usenixsecurity23-henzinger.pdf

  25. Kun, J. (Google), ibid. — the stated measurement conditions for the post's own latency figures. https://blog.google/security/how-google-is-making-private-ai-practical-with-homomorphic-encryption/

  26. Henzinger et al., ibid., §1 — on the trust assumption behind multi-server schemes. https://www.usenix.org/system/files/usenixsecurity23-henzinger.pdf 2

  27. MNMNOTE. "The Chat Runs on Your Machine — the Embedding Step May Have Uploaded Every Note." MNMNOTE Blog, post #312. https://blog.mnmnote.com/posts/the-chat-runs-on-your-machine-the-embedding-step-may-have-uploaded-every-note

  28. MNMNOTE. "The Embedding of Your Note Is Not Anonymous." MNMNOTE Blog, post #263. https://blog.mnmnote.com/posts/the-embedding-of-your-note-is-not-anonymous

  29. Gentry, C. "Fully Homomorphic Encryption Using Ideal Lattices." STOC'09, Bethesda, Maryland, 31 May – 2 June 2009, abstract. https://www.cs.cmu.edu/~odonnell/hits09/gentry-homomorphic-encryption.pdf