0Pricing
Cryptology Academy · Lesson

MPC Applications: Private Set Intersection & ML

Apply MPC to PSI, privacy-preserving statistics, and federated learning.

MPC Applications: Private Set Intersection & ML is a free Cryptology Academy lesson on CoddyKit — lesson 4 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cryptology Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Why MPC Applications Matter

MPC turns theory into practice. Private Set Intersection (PSI) and privacy-preserving ML are two of the most deployed MPC applications in industry today.

Private Set Intersection (PSI)

PSI: Alice has set A, Bob has set B. They compute A∩B without learning elements in A\B or B\A. Used by Google/Apple contact tracing, ad fraud detection, and threat-intel sharing.

Naive PSI and Why It Fails

Hashing both sets and comparing is insecure if sets are small — an adversary tries all elements. A secure PSI requires that even the intersection size is hidden (or only the intersection is revealed).

OPRF-Based PSI

Oblivious PRF (OPRF): Bob evaluates a PRF on Alice's elements without learning them. Alice gets PRF(k, x) for each x∈A. She compares with Bob's pre-computed PRF(k, y) for y∈B.

Circuit PSI and Payload Computation

Circuit PSI computes the intersection inside an MPC circuit, allowing further computation on intersection elements (e.g., summing purchase amounts) without revealing which items intersect.

Privacy-Preserving Machine Learning

PPML trains or runs inference on data from multiple parties. Federated learning keeps data local; MPC goes further — even the model or aggregated gradients are secret-shared.

Secure Aggregation for Federated Learning

Google's 2017 secure aggregation protocol: each client secret-shares its gradient update. The server reconstructs only the sum. Individual updates are never exposed, even to the server.

MPC Inference: Running Models on Encrypted Data

CrypTen (Facebook/Meta) and MOTION support running PyTorch-style neural networks on secret-shared inputs. Linear layers are cheap; non-linearities (ReLU) require Boolean-to-arithmetic conversion.

Handling ReLU in MPC

ReLU(x) = max(0,x) requires comparing x to 0 — a non-linear, non-arithmetic operation. This is done with garbled circuits or bit decomposition, and is the dominant cost in PPML.

Real Deployments

Apple's Private Relay uses PSI. Meta uses MPC for private ad measurement. The IETF PRIO protocol (used in Firefox Telemetry) uses secret-shared aggregate statistics.

Knowledge Check

In OPRF-based PSI, which party holds the PRF key and what does the other party learn?

Lesson Recap

PSI lets parties compute set intersection privately via OPRF. Circuit PSI enables further computation on intersection data. PPML uses MPC for federated learning aggregation and model inference on encrypted inputs. ReLU is the main PPML cost bottleneck.

Frequently asked questions

Is the “MPC Applications: Private Set Intersection & ML” lesson free?

Yes — the full text of “MPC Applications: Private Set Intersection & ML” is free to read here on the web, and the Cryptology Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cryptology Academy course, upgrade to CoddyKit PRO.

What will I learn in “MPC Applications: Private Set Intersection & ML”?

Apply MPC to PSI, privacy-preserving statistics, and federated learning. You practise Cryptology Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Cryptology Academy?

No prior experience is required. Cryptology Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 4 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “MPC Applications: Private Set Intersection & ML” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Cryptology Academy lesson?

Yes. Every Cryptology Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. MPC Problem & Yao's Garbled Circuits
  2. GMW Protocol & Oblivious Transfer
  3. SPDZ & Arithmetic MPC over Secret Shares
  4. MPC Applications: Private Set Intersection & ML
← Back to Cryptology Academy