Pick a depth. Each prompt opens in your AI pre-loaded with the lesson. Click a row to preview the prompt.
Every privacy-preserving system in production today runs into the same wall: at some point, somebody has to look at the plaintext to do anything useful with it. Your hospital wants to run a tumour classifier on a patient scan, but to call the model the cloud GPU sees the raw pixels. Your bank wants to detect fraud across a million transactions, but the analytics service sees every account number. End-to-end encryption protects data at rest and in transit, and then promptly hands it over the moment a CPU needs to do arithmetic on it. Homomorphic encryption is the tool that closes that final gap — it lets a server compute on ciphertexts and return ciphertexts, never seeing the underlying values. This first task is about feeling the size of the problem before you meet the machinery: why this matters, and why for forty years people thought it was impossible.
Picture three actors: a client holding a secret value , a server that runs a function , and an adversary watching everything in between. Without HE, the only protocols that compute correctly are the ones where sees at some point. With HE, encrypts to get , sends only the ciphertext, and the server returns — which only can decrypt. The adversary watching the wire (and even the server itself, if honest-but-curious) learns nothing about or .
print(scan[:32]) inside classify_tumour — that line is exactly the privacy violation HE is designed to prevent: the server has unrestricted view of the input.classify_tumour. Label every place the scan exists in plaintext. (You should find at least three: client RAM, server RAM, and any logs the model writes.)classify_tumour(scan) with classify_tumour(encrypted_scan) using a normal symmetric cipher like AES. Why does AES not give us what we want here?// main.go
// A toy 'cloud predict' API call — the privacy bug we want to fix.
// In the world WITHOUT HE, the server sees the patient's data in the clear.
package main
import (
"crypto/sha256"
"fmt"
"math/big"
)
func classifyTumour(scanBytes []byte) string {
// Imagine a real model here. It needs the raw scan to do its job.
digest := sha256.Sum256(scanBytes)
n := new(big.Int).SetBytes(digest[:])
if n.Bit(0) == 0 {
return "benign"
}
return "malignant"
}
func main() {
// Client side
scan := []byte("... 30 MB of pixel data ...")
// This is the line where privacy dies: scan leaves the client in the clear.
result := classifyTumour(scan)
fmt.Println("verdict:", result)
fmt.Println("but the server saw every pixel:", len(scan), "bytes of patient data")
}go run main.go