UEncrypted MNIST / LAB Browser WebAssembly

CLIENT-SIDE CKKS INFERENCE

See encrypted
inference take shape.

Choose MNIST samples, generate CKKS keys, encrypt the batch, run the model over ciphertexts in WebAssembly, then decrypt the predictions.

Microsoft SEALCKKSWASM · no backend
CLIENTEnc(x)image batch
ciphertext
WASM EVALUATORModel(Enc(x))encrypted model layers
CLIENTDec(Enc(y))predictions

All stages run in this browser. No image, key, or ciphertext is uploaded.

FIXED DEMO CONFIGURATION

CKKS parameters

FIXED
Scheme · security targetCKKS · 128 bitapproximate real arithmetic
Polynomial modulus degree16,384fixed for this browser demo
Coefficient modulus[30, 25 × 14, 30]bits per modulus prime
CKKS slots · scale8,192 · 225complex slots · encoding scale
Image packing784 valuesone 28 × 28 image per segment
Maximum batch10 imagesfloor(slots ÷ 784 pixels)
Show full fixed parameter set

Scheme: CKKS · Polynomial degree: 16,384 · Coefficient modulus: [30, 25 × 14, 30] bits · Scale: 225. This compact profile supports the model circuit depth in the browser; it uses 8,192 slots and batches up to 10 images.

RUN MODEL INFERENCE OVER CIPHERTEXTS

Encrypted batch workbench

Loading SEAL WASM…
00

Select MNIST samples

Choose a starting test image and a consecutive batch. The sample set contains 10,000 images.

Loading MNIST samples…

01READY

Generate client keys

Create a fresh CKKS secret/public key pair in WebAssembly. The secret key stays in this tab.

Waiting for SEAL
02LOCKED

Encrypt selected batch

Pack normalized pixel values into CKKS slots and encrypt them locally.

Waiting for keys
03LOCKED

Evaluate ciphertext

Run convolution, square activations, flattening, and dense layers on CKKS ciphertexts in a WebAssembly worker.

Waiting for ciphertext
04LOCKED

Decrypt response

Decrypt the encrypted model outputs with the client secret key, then read the predicted class for each image.

Waiting for response
Show key and ciphertext details
Public key—
Key not generated
Input ciphertext—
Response ciphertext—

The secret key is never displayed. The request ID is a trace label, not a cryptographic nonce.

i

Real encrypted inference, running locally

Microsoft SEAL WebAssembly generates CKKS keys, encrypts the selected pixels, evaluates the model convolution and dense layers directly over ciphertexts, and decrypts the resulting logits in your browser. No image, key, or ciphertext is uploaded. The reference prediction shown in the results is included only to compare the encrypted output with the plain model.