Skip to content

INITIALIZING FHE RUNTIME

Loading TFHE-rs WebAssembly…

Generating your key pair in-browser (~10–15s). Your secret key never leaves this device.

Blind Oracle

FHE · TFHE-rs · programmable bootstrapping

Encrypt two numbers in your browser, let an untrusted Oracle add the ciphertexts it can never read, then decrypt the sum locally.

THE QUESTIONER

Your keys. Your values. Your world.

HOW THIS DEMO WORKS

  1. Your browser generates keys and encrypts your numbers.
  2. Only ciphertext is sent over the wire to the Oracle.
  3. The Oracle adds ciphertexts and returns ciphertext.
  4. Your browser decrypts locally and reveals the sum.

This is Fully Homomorphic Encryption (TFHE-rs, programmable bootstrapping bootstrapping = noise reset). The “plaintext world vs ciphertext world” panel below shows why the encrypted result decrypts to the right answer.

The Oracle is a demonstration server: it is for demonstration only and should never receive real sensitive values.

WHEN THE SERVER IS MALICIOUS

An evaluation key cannot directly decrypt. But FHE does not authenticate the server's answer: a malicious server can return altered ciphertext. In a different TFHE/FHEW application, researchers recovered a client key by inducing decryption errors and repeatedly learning from the client's reports of those errors. Here the decrypted result and match/mismatch verdict stay in your browser; this page sends neither back to the Oracle. That closes this particular feedback path, not every possible client side channel. Original attack (2022) · FHE side-channel survey (2025)

Same numbers, fresh randomness → different ciphertext bytes every time. Watch the fingerprints on the Oracle side change.

DECRYPTION KEY: LOCAL ONLY

ENCRYPTED WIRE

TFHE-rs · Programmable Bootstrapping · True FHE

The secret key stays pinned in your browser. Only ct_a, ct_b and the (non-decrypting) serverKey travel out; ct_result travels back.

RESPONSE TIME: --ms

PROGRAMMABLE BOOTSTRAPPING & THE NOISE BUDGET

Every TFHE ciphertext hides its value under random noise. Each operation grows that noise; too much and decryption fails. Programmable bootstrapping (PBS) resets the noise on every operation so you can keep computing — but each reset is expensive, which is why real FHE programs stay small.

rise = operation adds noise · drop = bootstrapping refreshes it

THE BLIND ORACLE

Evaluation key only. Cannot decrypt. evaluation key = can transform ciphertext, cannot decrypt

ct_a preview

—

awaiting ciphertext A...

ct_b preview

—

awaiting ciphertext B...

PLAINTEXT WORLD vs CIPHERTEXT WORLD

Homomorphism means the same computation runs in both worlds and the answers match: Enc(a) ⊞ Enc(b) decrypts to a + b. Both worlds use the same 8-bit type, so both wrap at 256 — the plaintext track adds as a u8 and FheUint8 does the same. Encrypt and compute above, then watch both tracks fill in.

PLAINTEXT (what you know)

a = ? + b = ? = ?

CIPHERTEXT (what the Oracle sees)

Enc(a) ⊞ Enc(b) = Enc(sum)

decrypt locally with your key → ?

WHY ADDING NOISE STILL ADDS: PEEK INSIDE ONE CIPHERTEXT

A TFHE ciphertext is not a locked box holding your number — it is your number plus a pile of random noise. The Oracle can add two of these piles without ever separating value from noise, which is exactly why it computes but cannot read. Open the peek to see one small value buried under that noise.

LOCAL MULTIPLY BENCH — SPEND THE NOISE BUDGET YOURSELF

The Oracle above does the addition, because Zama's browser build of TFHE-rs ships key generation, encryption and decryption only — it exposes no evaluation operations at all, so the homomorphic step has to run where that API exists. This bench needs no oracle and no network. It runs a second, much smaller homomorphic scheme entirely in this tab, and it will do the multiplication the button above only describes.

Toy scale, stated plainly. This is a DGHV-inspired (van Dijk–Gentry–Halevi–Vaikuntanathan, 2010) unsigned, base-256 teaching model: Enc(m) = m + 256r + qp, Dec(c) = (c mod p) mod 256, with a 48-bit secret p. The original paper's security analysis does not apply to this tiny adaptation, so this is not secure encryption and must never be used as such. Here c mod p is the unsigned residue in [0,p): addition adds the tracked noise and multiplication multiplies it. Correctness is guaranteed while 0 ≤ noise < p. At p reduction first wraps; beyond it a byte can still match, but arbitrary operations are no longer guaranteed correct. The original DGHV paper uses centered residues and a p/2 bound, which is a different decoder. This bench shows noise growth and wrapping; it does not implement TFHE's parameters or programmable bootstrapping.

Bench idle. Press an operation to encrypt a and start a chain.

No chain yet.
# Expression Noise / budget Ciphertext size Decrypts to Should be Verdict
STATE: BOOTING

WHAT THE ORACLE SAW

PLAINTEXT VALUES PROCESSED BY ORACLE: 0

What is Fully Homomorphic Encryption?

FHE lets a server compute on your encrypted data without ever decrypting it.

TFHE-rs uses programmable bootstrapping (PBS): every operation refreshes the ciphertext noise, so you can keep computing without hitting a fixed circuit-depth wall — unlike leveled schemes that budget for a preset number of operations.

But bootstrapping is not free. Each block-level operation pays a real bootstrapping cost, so in practice FHE programs stay small and slow — the response time shown for even a single add is the price you are watching. FHE removes the depth limit; it does not remove the cost.

The subtle part: the server holds only an evaluation key. It can transform ciphertexts (including bootstrapping) but cannot decrypt with that key. The client secret key never leaves your browser. A malicious server may still learn from a client that reports decryption failures; this demo keeps that verdict local.

This is the real thing — with real limits, honestly shown.

◆ OPEN DEVTOOLS → NETWORK TAB

Watch the real ciphertext blobs travel over the wire.

POST /compute/add ← your two encrypted values

← ctResult → encrypted sum the server cannot read