Skip to main content

Understanding Secure Multiparty Computation (MPC) - Theory and Practice

· 15 min read
DuoKey Team
Cryptography and Security Experts

Secure Multiparty Computation (MPC) represents one of the most significant breakthroughs in cryptography, enabling parties to jointly compute functions on private inputs without revealing anything beyond the result. This comprehensive guide explores the theoretical foundations, security definitions, and practical applications of MPC.

Introduction​

In distributed computing environments, multiple parties often need to collaborate on computations involving sensitive data. Traditional approaches require parties to either trust a central authority or reveal their private information. Secure Multiparty Computation solves this fundamental dilemma by enabling parties to compute functions on their combined inputs while keeping those inputs private.

Note
Consider this scenario: Two people want to know who earns a higher salary without revealing the actual amounts to each other. Or imagine multiple hospitals wanting to collaboratively train a machine learning model on patient data without sharing the sensitive medical records. These are classic MPC problems.

Core Security Requirements​

MPC protocols must satisfy several critical properties:

🔒

Privacy

No party learns anything beyond its prescribed output. The only information revealed about other parties' inputs is what can be derived from the output itself.

✅

Correctness

Each party is guaranteed to receive the correct output. No malicious party can influence the result to deviate from the specified function.

🔀

Input Independence

Corrupted parties must choose their inputs independently of honest parties' inputs, preventing attacks based on knowledge of others' values.

📤

Guaranteed Delivery

Corrupted parties should not be able to prevent honest parties from receiving their outputs through denial-of-service attacks.

⚖️

Fairness

Corrupted parties receive outputs if and only if honest parties also receive theirs, preventing selective result denial.

The Ideal/Real Paradigm​

The standard security definition for MPC follows an elegant approach called the ideal/real simulation paradigm.

The Ideal World​

Imagine a world where an incorruptible trusted party exists to help with computations:

Send Inputs

All parties send their inputs to the trusted party

Compute Function

The trusted party computes the function

Return Outputs

The trusted party returns outputs to each party

In this ideal execution, security is automatic:

PropertyWhy It Holds in the Ideal World
PrivacyParties only see their outputs — nothing else is revealed
CorrectnessThe trusted party always computes correctly
Input IndependenceInputs are sent before any output is received
FairnessThe trusted party delivers all outputs simultaneously

The Real World​

In reality, no such trusted party exists. Instead, parties run a protocol among themselves, and some may be corrupted and colluding. A protocol is considered secure if anything an adversary can do in the real protocol execution could also be done in the ideal execution with a trusted party.

Important
Formally, for any adversary attacking a real protocol execution, there exists an adversary attacking an ideal execution such that the input/output distributions are essentially identical. This means the real protocol "emulates" the ideal world.

Adversarial Models​

The power and behavior of adversaries significantly impact protocol design and security guarantees.

Adversarial Behavior​

ModelBehaviorUse Case
Semi-Honest (Passive)Corrupted parties follow the protocol but try to learn extra information from their view of the executionModels inadvertent data leakage — not active attacks
Malicious (Active)Corrupted parties can arbitrarily deviate from the protocolStrongest and most realistic threat model — ensures security against any attack
CovertAdversaries may behave maliciously but will be detected with specified probabilityModels scenarios where detection carries real-world penalties — deterring attacks through accountability

Corruption Strategies​

StrategyDescriptionModels
Static CorruptionSet of corrupted parties is fixed before protocol execution beginsPre-determined insider threats
Adaptive CorruptionAdversaries can corrupt parties during execution based on observed transcriptExternal hackers breaking into systems or parties changing behavior mid-execution
Proactive SecurityParties may become corrupted and later recover (become honest again)Breaches discovered and systems cleaned — security guaranteed against adversaries who only control machines for limited periods

Fundamental Feasibility Results​

Tip
Remarkably, MPC is possible for any computable function under appropriate conditions.
ThresholdPropertiesRequirements
Honest Majority (t < n/3)Full fairness and guaranteed output delivery. Computational or information-theoretic security.Only authenticated channels (and privacy for information-theoretic case)
Honest Majority (t < n/2)Fairness and guaranteed delivery. Both computational and information-theoretic variants.Broadcast channel in addition to point-to-point channels
No Honest Majority (t >= n/2)Security "with abort" — adversary may learn output while denying it to honest parties.Inherent limitation for some functions (e.g., fair coin tossing impossible for two parties)

Core Techniques​

Shamir Secret Sharing​

A fundamental building block for honest-majority MPC using polynomial interpolation.

Setup

To share secret s among n parties with threshold t+1: Choose random polynomial q(x) of degree t with q(0) = s. Give party i the share y_i = q(i).

Reconstruction

Any t+1 parties can reconstruct s by interpolating q(x) and computing q(0).

Security

Any t or fewer parties learn nothing about s (information-theoretically secure). Based on the fact that t+1 points uniquely determine a degree-t polynomial.

Honest-Majority MPC Protocol​

Using secret sharing, parties can securely evaluate arithmetic circuits:

Each party shares its inputs using (t+1)-out-of-n Shamir sharing. After this phase, parties hold shares of all input wire values.

Addition gates: Each party locally adds its shares. If shares represent polynomials a(x) and b(x), party i computes c(i) = a(i) + b(i). This defines c(x) = a(x) + b(x) with c(0) = a(0) + b(0). No communication needed!

Multiplication gates: More complex due to degree increase. Party i computes c(i) = a(i) x b(i), resulting in a degree-2t polynomial (not degree-t). Requires a degree reduction step using additional random sharings and communication to reduce degree while preserving value at 0.

Parties send shares of output wires to designated recipients. Recipients reconstruct outputs via polynomial interpolation.

Note
This elegant approach achieves security for semi-honest adversaries. Malicious security requires additional mechanisms to detect and prevent cheating.

Private Set Intersection (PSI)​

PSI is a specialized MPC problem where two parties with sets X and Y want to compute X ∩ Y without revealing other elements.

Key Generation

Party 1 chooses key k for pseudorandom function F

Oblivious PRF

Parties run oblivious PRF evaluations: Party 1 inputs k, Party 2 inputs each element y_i. Party 2 learns F_k(y_i) but nothing about k.

Exchange

Party 1 sends F_k(x_j) for all x_j in its set

Match

Party 2 finds matches: output y_i where F_k(y_i) is in the set of F_k(x_j) values
Tip
PRF outputs look random, hiding elements not in the intersection. Modern PSI protocols process millions of elements in seconds.

Threshold Cryptography​

Threshold cryptography enables cryptographic operations (signing, decryption) without any single party holding the complete private key.

Modular Composition​

A critical property of secure MPC is modular composition: protocols proven secure can be safely used as subroutines in larger systems.

TypeConditionsGuarantees
Sequential CompositionMPC protocols run without concurrent messages from other protocolsSecurity preserved in larger systems. Enables modular design. MPC treated as a trusted party abstraction.
Concurrent Composition (UC)Multiple protocol instances run simultaneouslyUniversal Composability (UC) provides strongest guarantees. UC-secure protocols remain secure regardless of concurrent executions. Gold standard but comes with efficiency costs.

Practical Considerations​

Efficiency Advances​

The past decade has seen MPC transform from theoretical curiosity to practical tool:

🚀

Algorithmic Improvements

Reducing cryptographic overhead by orders of magnitude through better protocol design

🔧

Hardware Optimization

Leveraging AES-NI and other specialized instructions for faster cryptographic operations

🖥️

Custom Compilers

Translating high-level code to optimized circuits — minimizing expensive AND gates while allowing cheap XOR gates

📡

Communication Optimization

Reducing bandwidth requirements and using preprocessing techniques to move computation offline

Real-World Deployments​

💰

Boston Wage Gap Study

Analyzed 166,705 employees across 114 companies. Computed gender pay statistics without revealing individual salaries. MPC for social good.

📊

Google Ad Conversion

Computes intersection between people shown ads and actual purchasers. Protects user privacy while enabling accurate conversion metrics.

🔑

Cryptographic Key Protection

Threshold cryptography for enterprise key management. Protects signing keys without single point of compromise. Used in crypto custody and PKI.

🏛️

Estonia Government

Combined tax and education records to analyze student employment impact. Maintained privacy and regulatory compliance.

🧠

Privacy-Preserving ML

Machine learning on encrypted data. Anti-money laundering across financial institutions. Risk assessment without data sharing.

Important Caveats​

Warning
Garbage In, Garbage Out: MPC secures the process but cannot prevent parties from inputting incorrect values. If application security depends on input correctness, additional mechanisms are needed: signed inputs with signature verification, range proofs or zero-knowledge proofs of input validity, or out-of-band input validation.
Caution
Output Reveals Information: MPC protects computation but not the function output itself. Example: computing the average of two salaries reveals one person's salary to the other (given they know their own). Function design must consider privacy leakage from outputs.

Performance Trade-offs​

FactorImpact
LatencyOften 10-1000x slower than plaintext computation
BandwidthCryptographic protocols require substantial communication
MemorySome protocols need significant storage for intermediate values
Note
These costs are decreasing but remain significant for some applications.

The Future of MPC​

MPC exemplifies the "long game" of research — from pure theory to practical deployment over three decades.

📈

Recent Progress

Performance improvements of many orders of magnitude. Mature implementations and tooling. Growing industry adoption and standardization efforts.

🎯

Remaining Challenges

Making MPC accessible to non-experts. Handling very large datasets efficiently. Supporting complex computations economically.

🔮

Promising Directions

Hybrid approaches combining MPC with other techniques. Hardware acceleration and specialized chips. Better compilation and optimization tools.

Conclusion​

Secure Multiparty Computation has evolved from theoretical possibility to practical reality. Its strong security guarantees — formalized through the ideal/real paradigm — ensure that protocols behave as if an incorruptible trusted party were performing the computation. With continued advances in efficiency and usability, MPC is becoming an essential tool for privacy-preserving computation in an increasingly data-driven world.

Important
The key insight is simple yet powerful: any computation can be performed securely on private inputs. The only question is efficiency, and that question is being answered affirmatively for more and more applications each year.

References​


This article is based on "Secure Multiparty Computation" by Yehuda Lindell, originally published in Communications of the ACM, January 2021, Vol. 64, No. 1, pages 86-96.