Secure Multi-Party Computation: Privacy-Preserving Collaborative Computation
Secure Multi-Party Computation (MPC) is a cryptographic protocol that allows multiple parties to jointly compute a function over their private inputs while revealing only the output. Each party learns nothing about other parties' inputs beyond what can be inferred from the output.
Secure Multi-Party Computation: Privacy-Preserving Collaborative Computation
Secure Multi-Party Computation (MPC) is a cryptographic protocol that enables multiple parties to jointly compute a function over their private inputs without revealing those inputs to each other. Each party learns only the final output of the computation, and nothing about other parties' inputs beyond what can be inferred from that output. MPC solves the fundamental problem of how to collaborate on data analysis, fraud detection, or auctions without requiring participants to share sensitive information.
To understand MPC properly, it helps to be familiar with secret sharing, public key cryptography, and zero-knowledge proofs.
┌─────────────────────────────────────────────────────────────────────────┐
│ Secure Multi-Party Computation (MPC) │
├─────────────────────────────────────────────────────────────────────────┤
│ │
│ Party A (input x) ──┐ │
│ Party B (input y) ──┼───── MPC Protocol ─────► Output f(x, y, ...) │
│ Party C (input z) ──┘ │ │
│ │ │
│ ▼ │
│ Each party learns ONLY the output │
│ Nothing about other inputs │
│ │
│ Example: Two millionaires want to know who is richer without │
│ revealing their actual net worth. │
│ │
│ Traditional Approach: MPC Approach: │
│ ┌───────────────────┐ ┌───────────────────────────────────────┐ │
│ │ A tells B wealth │ │ A and B run MPC protocol │ │
│ │ B reveals their │ │ Each learns only comparison result │ │
│ │ wealth inequality │ │ Neither learns exact values │ │
│ └───────────────────┘ └───────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────┘
What Is Secure Multi-Party Computation?
Secure Multi-Party Computation is a subfield of cryptography that enables multiple parties to jointly compute a function over their private inputs without revealing those inputs. The protocol ensures correctness (the output is correct) and privacy (no party learns more than the output). MPC can be used for any function that can be expressed as a circuit: addition, comparison, machine learning models, database queries, and more.
- Privacy: Each party's input remains confidential. Only the final output is revealed. Nothing about intermediate values is disclosed.
- Correctness: The output is guaranteed to be correct, assuming honest majority (or malicious security). Parties cannot deviate from protocol to produce incorrect output.
- Fairness: All parties receive output, or none do. (Not always required, depends on protocol).
- Independence: Parties' inputs are independent. No party can influence another's input.
- Adversary Models: Honest-but-curious (semi-honest): parties follow protocol but try to learn extra info. Malicious (active): parties may deviate arbitrarily from protocol (harder).
Why Secure MPC Matters
Organizations have valuable data but cannot share it due to privacy regulations, competitive concerns, or confidentiality requirements. MPC enables collaboration without data sharing.
- Privacy Regulations (GDPR, HIPAA, CCPA): Healthcare data cannot be shared across institutions (HIPAA restricts patient data sharing). Financial data subject to confidentiality agreements. MPC allows analysis without violating regulations.
- Fraud Detection Across Banks: Individual banks cannot see each other's transactions (competitive sensitivity). MPC detects fraudulent patterns across institutions without sharing transaction details. Reduces false positives using combined data.
- Private Set Intersection (PSI): Two companies find common customers without revealing non-overlapping customers. Used for ad targeting, fraud detection, contact discovery.
- Secret Auctions / Bidding: Bids remain secret until auction closes. MPC computes winner and price without revealing individual bids. No trusted auctioneer needed.
- Machine Learning on Encrypted Data: Multiple hospitals train a model on combined patient data without sharing raw records. Privacy-preserving medical research. Model training and inference on encrypted inputs.
- Threshold Cryptography (Key Generation): DKG is a special case of MPC (generating random secret). Threshold signatures use MPC to sign without reconstructing key.
Application Inputs Output
─────────────────────────────────────────────────────────────────────────────
Private Set Intersection Party A: set S_A Intersection S_A ∩ S_B
Party B: set S_B
Secure Auction Parties: bids Winner and price
Private average Party i: salary Average salary
Fraud detection Party i: transactions Fraud probability
Private genome analysis Party i: genetic data Disease risk
Joint machine learning Party i: training data Model parameters
MPC Protocol Families
| Protocol | Method | Round Complexity | Communication | Adversary Model | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Garbled Circuits (GC) | Boolean circuits + encryption | 2 rounds | High (per gate) | Semi-honest (malicious extensions) | ||||||||||||||||||||||||||||||
| Secret Sharing (SS) | Additive or Shamir sharing | 1 round (linear) / multiple (non-linear) | Moderate | Semi-honest | ||||||||||||||||||||||||||||||
| Oblivious Transfer (OT) | Cryptographic primitive (building block)
Protocol comparison:
Secret Sharing Based MPCIn secret sharing MPC, inputs are split into shares and distributed among parties. Computation proceeds locally on shares, and final shares are reconstructed to reveal output.
Additive secret sharing (2 parties, honest-but-curious):
Multiplication with Beaver triples (precomputed):
Garbled Circuits (Two-Party Computation)Garbled circuits are the most efficient method for two-party computation where one party (garbler) encrypts a boolean circuit, and the other (evaluator) evaluates it without learning intermediate values.
Yao's Garbled Circuit (2-party):
Oblivious Transfer (OT)
Oblivious Transfer is a fundamental MPC primitive where a sender has two messages, and a receiver chooses one without revealing choice. The sender doesn't know which message was selected.
OT role in Garbled Circuits:
SPDZ (Malicious Security)
SPDZ is the state-of-the-art protocol for actively secure MPC for any number of parties. It uses secret sharing with information-theoretic Message Authentication Codes (MACs) to detect cheating.
SPDZ architecture:
Private Set Intersection (PSI)PSI is a special case of MPC where two parties find the intersection of their sets without revealing non-overlapping elements. Applications: contact discovery (find friends without exposing all contacts). Fraud detection (common customers across banks). Adtech (common audiences).
DH-based PSI (2-party):
MPC Anti-Patterns
MPC pitfalls checklist:
MPC Best Practices
MPC framework selection guide:
Popular MPC Libraries and Frameworks
CrypTen
| Python (PyTorch)
| Secret sharing
| Semi-honest
| PySyft (OpenMined)
| Python
| Secret sharing, PSI
| |
Frequently Asked Questions
- What is the difference between MPC and FHE (Fully Homomorphic Encryption)?
MPC involves multiple parties interacting during computation. FHE is a single party computing on encrypted data (no interaction). MPC supports arbitrary parties, lower overhead. FHE supports arbitrary functions (theoretically), but impractical. MPC is more mature and efficient for many-party settings. - How many parties can MPC support?
SPDZ supports up to 20-50 parties in practice (communication overhead grows quadratically). Garbled circuits are primarily 2-party. Secret sharing MPC scales to thousands with honest majority. Scalable MPC (e.g., BRISTOL) is an active research area for 100+ parties. - Is MPC quantum-safe?
Many MPC protocols rely on OT and public-key crypto (RSA, ECC) not quantum-safe. Post-quantum MPC uses lattice-based OT or code-based crypto. Active research ongoing; not yet production-ready for most use cases. - Can MPC handle machine learning models?
Yes, but training large models requires optimization (linear operations are cheap, non-linear like ReLU require interaction). Inference is more feasible. CrypTen (PyTorch) supports MPC for ML models. - What is the communication overhead for MPC?
Proportional to circuit size (gates). Garbled circuits: O(|circuit|) encryption. Secret sharing: O(|circuit|) communication per multiplication. Large circuits (e.g., AES) can require gigabytes network. - What should I learn next after MPC?
After mastering MPC, explore secret sharing (Shamir, additive), oblivious transfer (OT), garbled circuits (Yao), SPDZ protocol internals, Distributed Key Generation (DKG), and Private Set Intersection (PSI).
