FedSim Studio — Federated Learning & Privacy Simulation Platform

PET Lab Privacy-Enhancing Technologies for Federated Learning

Run real cryptography in your browser and watch what each party can and cannot see: encrypted aggregation with homomorphic encryption, secret-shared aggregation that survives dropouts, and zero-knowledge proofs that a client's update stays within bounds. Nothing leaves your machine.

Developed by: Shahid Latif

Encrypted aggregation

Each client encrypts its model update with a public key. The server adds the ciphertexts without being able to read them, and only the key holder decrypts the final sum. Paillier works on whole numbers, so updates are scaled to integers and packed many to a ciphertext. CKKS works on real numbers directly, thousands per ciphertext, with a tiny approximation error.

Runs so far (compare schemes and settings)

SchemeClients × weightsKey setupEncrypt / clientServer addDecrypt Upload / clientExpansionMax error

Secret-shared aggregation with dropouts

Each client splits every weight into n random-looking Shamir shares, one per aggregation party. Any t parties together can rebuild a value; t − 1 learn nothing at all. Parties add up the shares they hold, so the server rebuilds only the sum — even after some parties drop out.

Proving an update is within bounds

Encryption and secret sharing hide updates — including poisoned ones. A zero-knowledge proof lets a client show “the length (L2 norm) of my update is at most B” and commit to that exact update, while revealing nothing else. The circuit is written in Noir (64 values, 28,680 gates) and proved with Barretenberg's UltraHonk prover, all in your browser.

The first run downloads the prover's public setup (about 4 MB) from Aztec's CDN. Proving takes a few seconds on one thread.

Message log

Every message the protocols send is recorded here. “Can read it?” shows whether the chosen viewer learns the message's content — not just that bytes went past.

#FromToWhatKindSizeCan read it?

Educational tool. The cryptography comes from established libraries, but the protocols are simplified for teaching and have not been audited: never use them to protect real data.

FedSim Studio · PET Lab — an open teaching resource. Developed by Shahid Latif. Released under the MIT License. Companion to FedSim Studio.