Skip to content

Shelf Oracle

Single-server PIR · RLWE/BFV · query expansion · stateful preprocessing

Encrypt a one-hot selection vector under BFV, then compress 64 selectors into four fixed ciphertext blocks and execute their Galois-key expansion. Watch one server scan every record without learning the selected block or index, and account for serialized bytes, major operations and the measured invariant-noise budget. Then trade a full client setup stream and retained private state for an eight-record online parity query, and exercise refresh, loss and database-update boundaries.

What this is, in plain language

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. In the direct exhibit, the server multiplies every record by an encrypted 0 or 1, adds the results, and sends one ciphertext. The compressed exhibit sends four fixed query blocks and receives four fixed responses so neither count identifies the selected block.

The stateful exhibit demonstrates a different trade: the client first streams the fixed public database and builds secret parity hints. Each bounded online request then names one position in each of eight chunks, so the server reads eight records and returns their XOR. Those hints are consumed and refreshed, and losing or rolling back them is not the same as losing an ORAM position map.

Not production cryptography. This is a teaching implementation: schoolbook record products, exact NTT/CRT only for dense expansion-key products, 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 and state transition: every ciphertext, substitution, key switch, homomorphic multiply, parity, refresh and noise measurement on this page is computed, not scripted.