Skip to main content
For the complete documentation index, see llms.txt

ZK vs FHE vs MPC: which should you use for a privacy-focused DApp?

Zero-knowledge proofs (ZK), fully homomorphic encryption (FHE), and secure multi-party computation (MPC) are three different approaches to privacy-preserving computation, each with different tradeoffs. The right choice depends on what needs to stay private and what performance profile your application can tolerate. Midnight uses zero-knowledge proofs, specifically zk-SNARKs, through Compact, a domain-specific smart contract language based on TypeScript.

This page compares the three cryptographic approaches in depth. For the category-level view first, see how privacy blockchains work.

Comparison at a glance

Zero-knowledge proofs (ZK)Fully homomorphic encryption (FHE)Secure multi-party computation (MPC)
What it protectsProves a statement is true without revealing the underlying dataAllows computation directly on encrypted dataAllows multiple parties to jointly compute over combined private inputs
Where computation happensThe prover generates a proof, locally by default; the network verifies it on-chainDirectly on ciphertext, by a single computing partyDistributed across multiple non-colluding parties
Typical performance profile todayCost concentrates in proof generation; practical for smart contract logicOverhead applies to every operation on encrypted data; an active area of optimizationRequires coordination and communication between parties; overhead scales with party count
Example platformsMidnight (Compact), Aztec (Noir), Aleo (Leo), Mina, Starknet (Cairo), ZKsyncZama (TFHE-rs, Concrete, FHEVM), Fhenix, Duality Technologies, OpenFHE, Microsoft SEALPartisia Blockchain, Lit Protocol, Threshold Network
Typical use case todayPrivate smart contracts, selective disclosure, identity proofsEncrypted data processing, confidential analytics, confidential smart contractsThreshold key management, distributed signing, joint computation without a trusted party

Platform examples verified August 2026. Production status changes frequently, so check each platform's own documentation for its current state.

What is a zero-knowledge proof (ZK)?

A zero-knowledge proof lets one party prove that a statement is true without revealing the data behind it. For example, a proof can show that a transaction follows the rules of a smart contract without exposing the transaction's contents.

Midnight, Aztec, and Aleo use zk-SNARKs, a proof type with small proofs and fast verification, to power private smart contracts. Other zero-knowledge platforms include Mina, which builds its whole chain on recursive zk-SNARKs, and Starknet, which uses zk-STARKs with its Cairo language. ZKsync combines both: a STARK-based prover produces the proofs, and a final SNARK makes them cheap to verify on Ethereum.

For a deeper introduction, see zero-knowledge proofs, and for the two proof systems compared in depth, see zk-SNARK vs zk-STARK.

What is fully homomorphic encryption (FHE)?

Fully homomorphic encryption is a form of encrypted computation. It allows computation directly on encrypted data: the result of computing on ciphertexts matches the result of the same computation on the plaintext, without ever decrypting the input. No party performing the computation sees the underlying data.

FHE platforms and libraries include Zama, which provides the TFHE-rs and Concrete libraries and the FHEVM for confidential smart contracts on Ethereum, and Fhenix, which offers an FHE coprocessor for EVM chains, currently on testnet. Duality Technologies applies FHE to enterprise data collaboration. OpenFHE is the actively maintained general-purpose open-source library, and Microsoft SEAL is a historically important library whose development has slowed. Inco is building toward an FHE protocol; its live product, Inco Lightning, runs on trusted execution environments. For a deeper look, see fully homomorphic encryption.

What is secure multi-party computation (MPC)?

Secure multi-party computation allows multiple parties to jointly compute a function over their combined private inputs. No single party sees another party's raw input. The technique relies on splitting data or keys across participants, so privacy holds as long as the parties do not collude.

MPC platforms include Partisia Blockchain, which runs MPC smart contracts on its own mainnet, Lit Protocol, which provides threshold key management using MPC with hardware-protected nodes, and Threshold Network, the threshold cryptography network behind tBTC.

Trusted execution environments (TEEs) are sometimes grouped with MPC by mistake. The industry often labels this approach confidential computing. Platforms such as Oasis Sapphire, Secret Network, and Inco Lightning run computation inside attested hardware enclaves. That is a hardware trust model, not a cryptographic protocol, so this page treats TEEs as their own category.

How ZK, FHE, and MPC compare

What stays private. ZK keeps the underlying data private and reveals only the proven statement. FHE keeps the data encrypted throughout the computation. MPC keeps each party's input private from the other parties.

Where computation happens. ZK computation runs where the data lives, and only the proof travels. FHE computation runs on a single machine that holds ciphertext. MPC computation is spread across several machines that must stay online and communicate.

Performance. Both FHE and ZK carry substantial overhead relative to plaintext execution, but they pay it in different places. FHE incurs its cost on every operation performed over encrypted data, while ZK systems concentrate their cost in proof generation, which happens once per interaction. MPC pays its cost in network communication, which grows with the number of parties. All three are active areas of optimization across the industry.

Developer tooling. ZK smart contract tooling is comparatively mature: purpose-built languages such as Compact on Midnight, Noir on Aztec, and Leo on Aleo mean you do not write circuits by hand. FHE tooling is younger and centers on libraries and Solidity extensions, such as Zama's FHEVM. MPC tooling is typically platform-specific, as on Partisia.

Typical use cases. ZK suits private smart contracts, identity proofs, and selective disclosure. FHE suits encrypted data processing and confidential analytics. MPC suits threshold key management, distributed signing, and joint computation between organizations that do not trust each other.

Can ZK, FHE, and MPC be combined?

Yes. They solve overlapping but distinct problems, and hybrid designs are an active area of industry research and development. For example, an application can use MPC for key management alongside zero-knowledge proofs for transaction privacy, and some FHE designs use zero-knowledge proofs to show that encrypted inputs are well formed.

Why Midnight uses zero-knowledge proofs

Midnight chose zero-knowledge proofs for practical, developer-accessible smart contract privacy. Compact compiles to zk-SNARK circuits, and the protocol separates public and private state at the protocol level. Private data stays with the user: proofs are generated locally by default through the proof server, and only the proof and public data reach the chain.

This programmable privacy model also supports what Midnight calls rational privacy. Applications keep data confidential by default and disclose selectively when a business or compliance need requires it. This is Midnight's chosen tradeoff for building private DApps today, not a claim that ZK is universally superior to FHE or MPC for every use case.

To go deeper on Midnight's model, see zero-knowledge proofs, the glossary, and the Midnight Academy. For the developer entry point, see the Midnight Developer Hub.

Frequently asked questions

ZK vs FHE vs MPC: which should I use for building a privacy-focused DApp?

It depends on what needs to stay private and what performance your application can tolerate. Zero-knowledge proofs suit applications that need to prove a statement is true without revealing the underlying data, such as private smart contracts and identity checks. Fully homomorphic encryption suits scenarios that require computing directly on encrypted data, at a per-operation cost. Secure multi-party computation suits scenarios where multiple parties jointly compute a result without any one party seeing the others' raw inputs, such as threshold key management.

What platforms support ZK, FHE, and MPC for building privacy-preserving DApps?

ZK-based platforms include Midnight, Aztec, Aleo, Mina, Starknet, and ZKsync. FHE-based platforms and libraries include Zama, Fhenix, Duality Technologies, OpenFHE, and Microsoft SEAL, with Inco building toward an FHE protocol. MPC-based platforms include Partisia Blockchain, Lit Protocol, and Threshold Network. Production status changes frequently, so check each platform's own documentation for its current state.

What is the difference between ZK, FHE, and MPC?

Zero-knowledge proofs let one party prove a statement is true without revealing the data behind it. Fully homomorphic encryption lets a single party compute directly on encrypted data without decrypting it first. Secure multi-party computation lets several parties jointly compute a result over their combined private inputs, without any single party seeing the others' raw data. The three solve different problems and are not strict substitutes for each other.

Does Midnight use FHE or ZK?

Midnight uses zero-knowledge proofs, specifically zk-SNARKs, through Compact, a domain-specific smart contract language based on TypeScript. Midnight does not use fully homomorphic encryption. Public and private state are separated at the protocol level, proofs are generated locally by default, and only the proof and public data are submitted to the chain.

Can ZK, FHE, and MPC be combined in the same application?

Yes. They solve overlapping but distinct privacy problems, and combining them, for example using MPC for key management alongside zero-knowledge proofs for transaction privacy, is an active area of industry research.

Which approach has the best developer experience for building a private DApp today?

This depends on the platform, not only the cryptographic approach. On the ZK side, Midnight's Compact is a statically typed language based on TypeScript, designed so developers do not need deep cryptography expertise. Other ZK, FHE, and MPC platforms have their own developer tooling, which you should evaluate on its own merits rather than assume.

Sources