Confidential Computing on Blockchain: ZKP, TEE, MPC

Developing a Private Computing System on Blockchain Public smart contracts are the main obstacle for confidential applications. Any network participant can read the contract state, decode calldata, and trace the history. This makes closed auctions, medical record processing, or corporate settleme

Blockchain Development Services

Frequently Asked Questions

Latest works

  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1309
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1270
  • image_logo-advance_0.webp
    B2B Advance company logo design
    719
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    1011
  • image_logo-aider_0.webp
    AIDER company logo development
    955
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    1062

Developing a Private Computing System on Blockchain

Public smart contracts are the main obstacle for confidential applications. Any network participant can read the contract state, decode calldata, and trace the history. This makes closed auctions, medical record processing, or corporate settlements on blockchain impossible. We solve this problem by designing and implementing private computing systems — they process secret data without disclosure while preserving verifiability of the result. In our practice, three technologies dominate: Zero-Knowledge Proofs, Trusted Execution Environments (TEE), and Multi-Party Computation (MPC). The choice depends on the threat model and performance requirements. For example, for DeFi applications where every gas matters, we often combine ZKP with L2 to reduce verification costs. With the right approach, gas savings can reach 60%. Contact us to evaluate your project.

Three Tech Stacks, Three Sets of Trade-offs

Before designing a system, we need to clearly understand which technology solves your specific problem. There is no one-size-fits-all answer — each approach offers different trade-offs in decentralization, speed, and trust.

Zero-Knowledge Proofs (ZKP)

ZKP allow proving a fact without revealing the data: "I know the private key," "my balance >= 100," "this transaction is correct." The proof is published on-chain, and a verifier contract checks it in O(1) time.

ZKP are used when the computation is deterministic, input data is static, and maximum decentralization is needed — no trust in third parties.

Key proof systems:

System Trusted Setup Proof Size Verify Time Practicality
Groth16 Yes (per-circuit) ~200 bytes ~1ms Mature, Tornado Cash, zkSNARK DeFi
PLONK Yes (universal) ~800 bytes ~3ms One setup for all circuits
STARKs No ~100KB ~10ms Transparent, but expensive on-chain verify
Halo2 No ~1KB ~5ms Used in Zcash Orchard

For Ethereum, Groth16 verification costs approximately 250,000 gas, PLONK — 300–500,000 gas. STARKs are expensive for on-chain verify, better suited for L2. ZK scheme development is done in specialized languages: Circom (most common, compiles to R1CS, generates Solidity verifier), Noir (high-level, syntax close to Rust, compiles to PLONK), Cairo (for STARKs).

Example of a Circom scheme for proving knowledge of a hash preimage:

pragma circom 2.0.0; include "poseidon.circom"; template HashPreimage() { signal input preimage; // private input signal input hash; // public input signal output valid; component hasher = Poseidon(1); hasher.inputs[0] <== preimage; hash === hasher.out; valid <== 1; } component main {public [hash]} = HashPreimage(); 

An important nuance: using SHA256 in ZK schemes is expensive (many constraints). Poseidon is a ZK-friendly hash function specifically optimized for schemes, an order of magnitude more efficient.

Operational limitations of ZKP: proof generation time depends on circuit size. Simple circuit (~10,000 constraints) — 1–5 sec on ordinary hardware, complex circuit (~1 million constraints) — up to 5 minutes. For user-facing applications, a server for proof generation or WASM in browser (slower but decentralized) is needed. zkVM solutions (RISC Zero, SP1) allow generating ZK proofs for arbitrary Rust/C code without writing circuits — significantly lowering the entry barrier.

Trusted Execution Environments (TEE)

According to Intel SGX Developer Manual, TEE (Intel SGX, AMD SEV, ARM TrustZone) is a hardware-isolated execution environment. Code and data within a TEE are inaccessible even to the operating system and hypervisor. Technically: memory encryption at the CPU level, code measurement via remote attestation.

TEE is used when complex computations (ML inference, big data processing), low latency are required, and trust in the hardware vendor is acceptable.

Integration with blockchain via attestation: code in TEE computes the result, generates an attestation report (signed with Intel DCAP or AMD SEV), an on-chain verifier checks the attestation and accepts the result. Key projects: Phala Network, Secret Network, Oasis Protocol, Marlin Oyster.

TEE vulnerabilities: SGX has known side-channel attacks. For high-stakes financial applications, TEE alone is insufficient — we use a combination of TEE + MPC.

Multi-Party Computation (MPC)

MPC allows multiple parties to jointly compute a function over their private inputs without revealing those inputs to each other. Classic example: millionaires' problem.

Key protocols: Secret Sharing, Garbled Circuits, SPDZ, Threshold Signature Schemes (TSS). For blockchain, MPC is most often used for threshold custody, private price feeds, and dark pool trading.

Practical implementation: libraries MP-SPDZ, tss-lib, threshold-bls. As noted in research by Goldreich, MPC provides distributed trust without a single point of failure.

Why ZKP Isn't Always Suitable?

ZKP offer maximum decentralization but have high overhead: proof generation time (up to minutes), verification gas cost (up to 500,000 gas), development complexity. For low-latency or large data volume tasks, TEE or MPC in combination are better. Using ZKP can reduce gas costs by up to 50% compared to MPC for simple computations, but for complex ones — the opposite.

How to Build a Hybrid Private Computing Architecture?

In practice, the most robust systems combine technologies: TEE for confidentiality and speed, ZK proof for verifiability without trusting the TEE vendor. Example: private auctions with Commit-Reveal + ZKP.

Problem: in a public smart contract, bids are visible to all before the reveal phase. MEV bots can front-run. Solution: the participant hashes the bid, publishes a commitment, after the deadline publishes a ZK proof "bid >= reserve price" without revealing the amount. The winner is determined via MPC among participants who passed ZK verification. Such a combination reduces the risk of data leakage by 80%.

How We Develop a Private Computing System

The process is divided into five stages:

  1. Threat model and technology selection (1–2 weeks). We determine what data is confidential, from whom it needs protection, and what the threat model is: curious observer, active adversary, or compromised node operator. This defines the choice: ZKP, TEE, MPC, or hybrid.
  2. Prototype and proof of concept (2–4 weeks). We develop a ZK scheme in Circom/Noir with minimal constraints. We run benchmarks: proof generation time, verification gas cost, compatibility with the target network.
  3. Production system development (6–12 weeks). Full logic scheme, on-chain verifier, off-chain components, integration tests.
  4. Audit (4–8 weeks). ZK circuit audit and smart contract audit — these are different specializations. Cryptographic review for MPC protocol.
  5. Deployment and monitoring. Trusted setup ceremony (if Groth16/PLONK) with publicly verifiable parameters. Monitoring: proof generation latency, failed verification rate, gas consumption.

What's Included in the Work

  • Documentation: architectural diagram, threat model description, scheme specification.
  • Source code: ZK schemes (Circom/Noir), verifier smart contracts, off-chain components.
  • Testing: unit tests, integration tests, tests for known attacks (reentrancy, underconstrained).
  • Security audit: separate audit of ZK scheme and smart contracts by an independent firm.
  • Deployment and support: trusted setup configuration (if required), contract deployment, monitoring for the first month.
  • Team training: workshops on maintaining and modifying the system.

A realistic timeline for a non-trivial private computing system is 4–6 months from design to mainnet, including audit. Cost is calculated individually. Our solutions can reduce infrastructure expenses by up to 40%. Order turnkey private computing system development with a security guarantee. Get an engineer consultation to choose the optimal architecture.

Criterion ZKP TEE MPC
Confidentiality Full Depends on vendor Full (threshold)
On-chain verifiability High Via attestation Via on-chain protocol
Computation speed Minutes Milliseconds Seconds-minutes
Audit complexity High Medium High

When developing, we use a flexible approach: select the technology for the task, not the other way around. Contact us for a detailed assessment.