Single-server computational PIR · RLWE/BFV · SealPIR-style
Encrypt a one-hot selection vector under BFV, watch one server fold all 64 catalog records into a single ciphertext it cannot read, and watch the noise budget pay for the second server this protocol does not need.
A library catalog can answer which book do you want? only by learning the answer. Private information retrieval is the trick that breaks that rule: you get the record you asked for, and the server never learns which one it was.
The classic way to do it needs two servers that never talk to each other. This lab does it with one. Instead of trusting operators not to collude, it hides the request inside encrypted numbers the server can compute on but not read. The server multiplies every record by an encrypted 0 or 1, adds the results, and sends back a single ciphertext — never having learned which of its records was the one.
Not production cryptography. This is a teaching implementation: schoolbook polynomial arithmetic, no constant-time discipline, the secret key in ordinary browser memory, and a 64-record shelf. Both "servers" are objects in this page — no network is involved. What is real is the mathematics: every ciphertext, every homomorphic multiply and every noise measurement on this page is computed, not scripted.