Lion Cipher Lab
Run private ML inference with homomorphic encryption
- AI Security
- Advanced
- ~90 min
- Free · no account required
Why it matters
Real ML increasingly runs on data that legally or ethically must never leave the client in the clear — patient records, financial signals, a user's private messages. Homomorphic encryption lets an untrusted server compute a prediction on an ENCRYPTED input and hand back an ENCRYPTED answer it cannot read. Understanding exactly what that buys you — and the sharp limits: no integrity, plaintext weights, a finite multiply budget, a five-orders-of-magnitude slowdown — is the difference between deploying privacy-preserving ML where it genuinely pays and cargo-culting it where a trusted enclave or…
What you'll learn
- Homomorphic encryption
- CKKS approximate arithmetic
- Privacy-preserving ML inference
- TenSEAL / Microsoft SEAL
- Threat modeling an untrusted inference host
Steps in this lab
- The problem: prediction without disclosure
- Install and train a small classifier (plaintext, offline)
- Set up a CKKS context — and meet the parameter budget
- Encrypt the input and evaluate the linear layer homomorphically
- Approximate the sigmoid — and hit the multiply-depth wall
- Measure the cost, and reason about the security model