Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
LABS
Guides

Setting Up a Multi-Party Computation (MPC) Network for Asset Security

A technical guide to implementing an MPC-based custody system. This tutorial covers node selection, distributed key generation ceremonies, transaction signing flows, and a comparison of leading providers.
Chainscore © 2026
introduction
TUTORIAL

Introduction to MPC for Asset Custody

A practical guide to implementing a secure Multi-Party Computation (MPC) network for managing private keys and securing digital assets.

Multi-Party Computation (MPC) is a cryptographic technique that allows a group of parties to jointly compute a function over their private inputs without revealing those inputs to each other. In the context of digital asset custody, MPC is used to distribute the control of a private key across multiple parties, eliminating the single point of failure inherent in traditional seed phrases or hardware wallets. This approach, often called threshold signature scheme (TSS), requires a predefined threshold (e.g., 2-of-3) of participants to collaborate to sign a transaction, while no single party ever holds the complete key.

Setting up an MPC network begins with a key generation ceremony. Using libraries like tss-lib (a Go implementation of the GG20 protocol), participants run a distributed protocol to collectively create a public/private key pair. The private key is secret-shared mathematically among them. For a 2-of-3 setup, the code initiates a local TCP server for each party and runs the key generation round. The critical output is not a key, but a unique key share for each participant and a single, shared public address.

Once the key shares are distributed, signing a transaction requires collaboration. When a transaction needs authorization, the required threshold of parties (e.g., 2 out of 3) initiates a signing protocol. Each party uses its local key share as input. Through another round of secure messages, they produce a valid ECDSA signature for the transaction data, which can be broadcast to the network. The full private key is never reconstructed at any point during this process, maintaining security even if one party is compromised.

The architecture for a production MPC custody solution involves more than just the cryptographic layer. You need a secure enclave (like AWS Nitro Enclaves or Intel SGX) for each party to run computations, a secure messaging layer (often using authenticated channels like TLS) for communication between nodes, and a transaction coordination service to propose, schedule, and finalize signing sessions. Major custody providers like Fireblocks and Coinbase use similar architectures to secure billions in assets.

Implementing MPC introduces operational considerations. You must establish secure backup procedures for key shares, often using Shamir's Secret Sharing to split a share further. Robust authentication and audit logging for every signing session are non-negotiable for compliance and security. Furthermore, the choice of the threshold (t-of-n) involves a trade-off between security (requiring more signatures) and availability (ensuring enough parties are online).

For developers, the ecosystem is maturing. Beyond tss-lib, frameworks like ZenGo's KMS and MPC-ECDSA libraries from Unbound Security (now part of Coinbase) provide higher-level abstractions. When evaluating or building an MPC system, always conduct a formal security audit and consider the proactive security feature, which allows parties to periodically refresh their shares without changing the public address, rendering any previously leaked shares useless.

prerequisites
MPC NETWORK FOUNDATION

Prerequisites and System Requirements

This guide outlines the essential hardware, software, and cryptographic components required to deploy a secure Multi-Party Computation (MPC) network for managing digital assets.

A production-grade MPC network requires a robust, isolated infrastructure. Each signing party (or node) must run on a dedicated, hardened server with a secure execution environment (SEE), such as an Intel SGX enclave or an AWS Nitro instance. Minimum hardware specifications include a modern multi-core CPU (e.g., Intel Xeon or AMD EPYC), 16GB+ RAM, and 100GB+ SSD storage. Network latency between nodes must be low and consistent (<100ms) to ensure efficient protocol execution, as MPC involves multiple rounds of communication. All nodes should be provisioned within a private virtual cloud or data center with strict firewall rules, allowing only authenticated, encrypted peer-to-peer traffic on designated ports.

The core software stack consists of three layers. First, the operating system should be a minimal, security-focused Linux distribution like Alpine Linux or a container-optimized OS, regularly patched. Second, you need a MPC protocol library such as libsecp256k1 with threshold ECDSA extensions, tss-lib for GG20/GG18, or a vendor SDK like Fireblocks Core or Qredo's mpc-core. Third, a coordinator service is required to manage protocol sessions, key generation, and signing requests; this can be a custom-built service using a framework like go-tss or a managed service API. All components must be pinned to specific, audited versions (e.g., tss-lib v1.4.0) to ensure deterministic behavior and security.

Cryptographic prerequisites are non-negotiable. Before deployment, you must generate and securely distribute the initial trusted setup parameters if using a zk-SNARK-based MPC variant. Each node requires a unique, hardware-backed identity key pair (often an X.509 certificate) for authenticated communication. You must also pre-define the threshold scheme, such as 2-of-3 or 3-of-5, which dictates the minimum number of parties required to sign a transaction. This configuration is embedded into the distributed key generation (DKG) protocol and cannot be changed post-key creation without generating a new master key.

For development and testing, you can simulate an MPC network locally using Docker Compose or Kubernetes (Kind/k3s). A typical docker-compose.yml would define services for each party, a coordinator, and a simulated blockchain node (e.g., Ganache). This allows you to test the full flow from DKG to transaction signing without cloud costs. However, this environment lacks the hardware security modules (HSMs) and network isolation of production, so it must only be used for protocol validation and integration testing, never with real private key material.

Finally, establish operational procedures before going live. This includes secure secret distribution for node identity keys, setting up monitoring for node health and protocol anomalies (using Prometheus/Grafana), and creating disaster recovery plans for node failure. All operational personnel must use hardware security keys (YubiKeys) for access, and all actions should be logged to an immutable audit trail. The NIST SP 800-57 guidelines provide a framework for cryptographic key management lifecycle that is highly applicable to MPC networks.

key-concepts-text
CORE MPC CONCEPTS AND CRYPTOGRAPHY

Setting Up a Multi-Party Computation (MPC) Network for Asset Security

A technical guide to implementing a secure MPC network for managing private keys and digital assets, focusing on threshold signatures and distributed key generation.

Multi-Party Computation (MPC) enables a group of parties to jointly compute a function—like generating a digital signature—while keeping their individual inputs private. For asset security, this means a private key is never fully assembled in one place. Instead, it is split into secret shares distributed among multiple participants (or nodes). A predefined threshold, like 2-of-3, determines how many shares are required to authorize a transaction. This eliminates single points of failure inherent in traditional private key storage, providing a foundational layer of security for institutional custody, DeFi protocols, and wallet infrastructure.

The core cryptographic primitive for MPC-based wallets is the threshold signature scheme (TSS). Unlike multi-signature setups that create multiple on-chain signatures, TSS generates a single, standard-looking signature (e.g., ECDSA for Ethereum, EdDSA for Solana) from the collaboration of threshold parties. This is more efficient and private. Setting up such a network begins with Distributed Key Generation (DKG), a protocol where participants collaboratively create a public/private key pair without any single entity ever knowing the full private key. Libraries like tss-lib (Golang) or multi-party-ecdsa provide implementations for this critical first step.

A practical setup involves initializing nodes that will hold the secret shares. Each node runs a client that participates in the DKG protocol. Below is a simplified conceptual flow using a pseudo-code structure, highlighting the phases of communication and computation required to establish the shared key.

python
# Conceptual DKG Phase Outline for n participants, threshold t
class MPCParticipant:
    def __init__(self, id, threshold, total_parties):
        self.id = id
        self.t = threshold
        self.n = total_parties
        self.secret_share = None
        self.public_shares = {}

    def phase1_generate_share(self):
        # Generate a local secret polynomial, commit to it.
        # Broadcast public commitments (Feldman/VSS).
        pass

    def phase2_exchange_shares(self, received_shares):
        # Securely send encrypted secret shares to other parties.
        # Verify received shares against public commitments.
        pass

    def phase3_compute_key(self, verified_shares):
        # Compute final secret share and group public key.
        self.secret_share = sum(verified_shares)
        # Public key is derived from all public commitments.
        pass

After DKG, the public key is known to all and can be used as a wallet address, while each participant securely stores their unique secret share.

For ongoing operations like signing a transaction, the network uses a signing protocol. When a transaction needs approval, a quorum of participants (meeting the threshold) engages in another interactive MPC round. Each uses their secret share to compute a partial signature. These partials are combined—again, without reconstructing the full key—to produce the final, valid signature. Major MPC providers like Fireblocks, Qredo, and ZenGo use variations of these protocols. Security audits of the cryptographic implementations and robust network communication layers (using authenticated channels) are non-negotiable for production systems.

When architecting your MPC network, critical decisions include choosing the signature algorithm (ECDSA secp256k1 vs. Ed25519), the threshold scheme (e.g., 2-of-3 for balance vs. 5-of-8 for higher security), and the node infrastructure. Nodes can be run by different departments, geographically distributed servers, or even trusted individuals. The communication layer must prevent man-in-the-middle attacks, often using TLS and digital certificates. For resilience, implement share refresh protocols to proactively rotate secret shares without changing the public address and define clear procedures for adding/removing participants.

MPC networks represent a significant advancement over traditional multisig and HSMs for digital asset security. By leveraging threshold cryptography, they provide enhanced security through key segmentation, operational flexibility with configurable signing policies, and blockchain compatibility by producing standard signatures. Successful implementation requires careful planning of the cryptographic stack, node orchestration, and operational governance to fully realize these benefits while mitigating risks associated with complex distributed systems.

how-it-works
DEVELOPER GUIDE

MPC Implementation Workflow

A practical guide to architecting and deploying a secure Multi-Party Computation network for managing digital assets. This workflow covers key components from cryptographic foundations to operational security.

04

Signing Ceremony & Transaction Flow

The process for authorizing a blockchain transaction using MPC.

  1. Transaction Proposal: A client constructs an unsigned transaction and sends it to the participating nodes.
  2. Message Exchange: Nodes run the MPC signing protocol, exchanging encrypted messages over a P2P network.
  3. Signature Aggregation: The protocol outputs a single, standard ECDSA signature that can be verified against the master public key.
  4. Broadcast: Any party can broadcast the final signature to the network. This process typically completes in under 2 seconds for a 2-of-3 setup.
05

Network Architecture & Communication

Designing the peer-to-peer network that MPC nodes use to communicate.

  • Transport Layer Security: All peer-to-peer messages must be encrypted in transit using mutual TLS or similar.
  • Consensus on Inputs: Nodes must agree on the transaction data to sign to prevent Byzantine failures. This often requires a separate, lightweight consensus step.
  • Redundancy & Availability: The network should tolerate node failures without halting. A 3-of-5 configuration provides better availability than 2-of-3.
node-setup-deep-dive
FOUNDATION

Step 1: Node Selection and Environment Setup

The first critical step in deploying a secure MPC network is establishing a robust, isolated environment with properly configured nodes. This foundation dictates the network's resilience and trust model.

A Multi-Party Computation (MPC) network's security is a direct function of its participants' integrity and isolation. Node selection is not about raw compute power, but about trust diversification. You must select participants (nodes) that are independent entities, ideally geographically and organizationally separate, to minimize correlated failure or collusion risks. For a threshold scheme like t-of-n, where t signatures are needed from n participants, you must decide on these parameters based on your security model (e.g., 2-of-3 for balanced security and availability, or 5-of-7 for higher assurance).

The operating environment for each node must be a hardened, air-gapped, or highly restricted system. This is non-negotiable for private key security. Best practices include using dedicated hardware (HSMs, YubiKeys, or isolated virtual machines), a minimal OS install (like Alpine Linux), and strict firewall rules that only allow outbound connections to specific peer nodes. Tools like Docker or Kubernetes can help create reproducible, containerized environments, but the host security is paramount. Never run an MPC node on a general-purpose server or a developer's laptop.

Each node requires a unique identity and the necessary MPC libraries. For a network using a library like ZenGo's Multi-Party Schnorr or GG18/GG20 threshold ECDSA, you must install the specific language runtime (e.g., Rust, Go) and dependencies in each environment. Configuration involves generating a node's public identity (not its private key share, which is generated later during the Distributed Key Generation ceremony), setting peer connection addresses, and defining the threshold parameters (t, n) that all nodes must agree upon. Consistency in configuration across all nodes is essential to prevent protocol failures.

Establishing secure communication channels between nodes is the next step. MPC protocols require nodes to exchange messages during key generation and signing. These channels must be authenticated and encrypted. This is typically achieved using TLS with mutual authentication (mTLS), where each node presents a certificate. You can use a tool like cfssl to create a private Certificate Authority and issue client certificates for each node. Network topology (full mesh vs. star) should also be planned, as some MPC protocols have specific communication patterns that influence latency and robustness.

Before proceeding to the Distributed Key Generation (DKG) ceremony, you must conduct a readiness check. This involves verifying that all nodes can resolve each other's hostnames, that firewalls permit traffic on the agreed ports, and that the MPC software binaries are identical across all nodes (verified by checksum). A simple "ping" test using the secured channel (e.g., a crafted gRPC health check) ensures the network layer is functional. This meticulous setup phase prevents costly failures during the live cryptographic ceremony, where any node outage or misconfiguration can compromise the entire key generation process.

key-generation-ceremony
MPC NETWORK SETUP

Step 2: Executing the Distributed Key Generation Ceremony

This guide details the practical execution of the Distributed Key Generation (DKG) ceremony, the cryptographic process where multiple parties collaboratively create a shared public key and individual secret key shares without any single entity ever knowing the complete private key.

The Distributed Key Generation (DKG) ceremony is the foundational step for establishing a secure Multi-Party Computation (MPC) network. Unlike a traditional key generation where one party creates a key, DKG is a multi-round interactive protocol. Each participant, or signer, contributes randomness to collectively generate a single public key and a set of secret key shares. The critical security property is that the full private key is never assembled in one place; it exists only in a distributed, mathematical form across the participants. This eliminates a single point of failure for key theft.

To begin, each participant i must generate a local secret, often a large random number. Using this secret, they create a public commitment, typically via a cryptographic primitive like a Feldman or Pedersen commitment scheme. This commitment is broadcast to all other participants. It acts as a verifiable promise of their secret contribution without revealing the secret itself, ensuring the process is both private and accountable. All participants must agree on the system parameters beforehand, including the elliptic curve (e.g., secp256k1 for Ethereum) and the threshold t of n total participants required to sign.

The core of the ceremony involves participants exchanging and verifying these commitments. After receiving all commitments, each party computes their individual secret key share. This share is derived from a combination of all other participants' secret contributions, processed through a secure computation. A participant's ability to later sign transactions depends entirely on possessing this unique key share. Simultaneously, the collective public key, which corresponds to the sum of all secret contributions, is derived and becomes the wallet's public address. Libraries like GG18 and GG20 provide standardized implementations of these threshold ECDSA protocols.

Verification is crucial at every stage. Participants must validate that the received commitments are consistent and that the derived public key matches the aggregated commitments. Any party detected providing invalid data is excluded from the ceremony. This ensures robustness—the protocol can complete successfully even if some participants are malicious or offline, as long as a sufficient number of honest participants follow the protocol. The final output is a verified public key and a set of n secret key shares, each held by a different participant. The private key, in its complete form, does not exist anywhere.

For developers, executing DKG requires a secure, authenticated communication channel between parties, often implemented via a relayer or a dedicated coordination server. A practical implementation involves running a client that follows the protocol steps, handles network messages, and securely stores the resulting key share. The process is computationally intensive but a one-time setup cost. Post-ceremony, the network is ready for threshold signing, where any subset of t participants can collaborate to produce a valid signature without reconstructing the master private key.

transaction-signing-flow
MPC NETWORK SETUP

Step 3: Building the Transaction Signing Flow

This guide details how to construct a secure, multi-step transaction signing flow using a Multi-Party Computation (MPC) network, moving from key generation to final on-chain execution.

The transaction signing flow is the operational core of your MPC wallet. It begins when a user initiates a transaction, triggering a request to the MPC network's coordinator service. This service is responsible for orchestrating the signing ceremony between the distributed signing nodes or key shard holders. The coordinator packages the raw transaction data—including the recipient address, amount, nonce, and gas parameters—into a signing request payload. This payload is cryptographically hashed to produce the message digest that the nodes will sign, ensuring the integrity of the transaction data is preserved throughout the process.

Each participating node in the network uses its secret key share to compute a partial signature on the message digest. Critically, this is done without ever reconstructing the full private key. Protocols like GG20 or Frost define the exact mathematical operations for this threshold signing. The coordinator collects these partial signatures and combines them using Lagrange interpolation. Once a predefined threshold (e.g., 2-of-3) of valid partial signatures is aggregated, a single, standard ECDSA or EdDSA signature is produced. This final signature is indistinguishable from one created by a traditional single-key wallet, ensuring compatibility with existing blockchain networks like Ethereum or Solana.

Implementing this flow requires robust error handling and state management. The coordinator must track the signing ceremony's progress, handle timeouts, and manage scenarios where a node is unresponsive or provides an invalid partial signature. For development, you can use SDKs from MPC providers like Fireblocks, Qredo, or Coinbase's MPP. A basic flow in pseudocode might look like:

javascript
// 1. Initiate signing
const signingSession = await mpcClient.createSigningSession(txPayload, threshold);
// 2. Distribute payload to participant nodes
const partialSigs = await distributeToNodes(signingSession.id, txHash);
// 3. Aggregate signatures upon reaching threshold
const finalSignature = mpcClient.aggregate(partialSigs);
// 4. Broadcast signed transaction
const txReceipt = await blockchainProvider.broadcast(txPayload, finalSignature);

Security considerations are paramount in the flow's design. The coordinator service must be highly available and authenticated to prevent impersonation attacks. All communication between the coordinator and signing nodes should be over mutual TLS (mTLS) channels. Furthermore, the system should implement nonce management to prevent replay attacks and transaction simulation before signing to detect malicious payloads. Auditing the entire ceremony—logging which nodes participated, timestamps, and the final transaction hash—is essential for compliance and forensic analysis.

Finally, the signed transaction is broadcast to the blockchain network. The MPC wallet's front-end should provide clear user feedback at each stage: transaction constructed, awaiting approvals, signing in progress, and broadcast confirmed. This transparent flow, backed by the cryptographic security of threshold signatures, provides a superior user experience compared to multi-signature wallets, as it results in a single, gas-efficient transaction while maintaining decentralized custody of assets.

ENTERPRISE VS. OPEN-SOURCE

MPC Provider Comparison: Fireblocks vs. Curv vs. Threshold Network

A feature and architecture comparison of leading enterprise custodial MPC services and a prominent open-source protocol for self-custody.

Feature / MetricFireblocksCurv (now part of Coinbase)Threshold Network

Core Architecture

Multi-layer MPC with SGX

Multi-party ECDSA (t-of-n)

Distributed Key Generation (t-of-n)

Custody Model

Enterprise Custodial Service

Enterprise Custodial Service

Self-Custody Protocol

Key Management

Fully managed by Fireblocks

Fully managed by Curv/Coinbase

User/application controlled

Blockchain Support

60+ chains, 1,400+ tokens

30+ chains, 100+ tokens

EVM chains (Ethereum, Gnosis, etc.)

Transaction Policy Engine

Insurance Coverage

Up to $750 million

Integrated with Coinbase's insurance

Open Source

Pricing Model

Enterprise SaaS (tiered)

Enterprise SaaS (custom)

Gas fees + protocol incentives

security-best-practices
MPC NETWORK SETUP

Security Best Practices and Risk Mitigation

Multi-Party Computation (MPC) distributes private key control across multiple parties, eliminating single points of failure. This guide covers the core tools and concepts for implementing a secure MPC network.

MPC NETWORK SETUP

Frequently Asked Questions (FAQ)

Common questions and troubleshooting for developers implementing Multi-Party Computation (MPC) networks for secure key management and transaction signing.

Threshold Signature Schemes (TSS) and multi-signature (multi-sig) wallets are both used for distributed control, but their architectures differ fundamentally.

Multi-sig operates at the blockchain protocol layer. It requires multiple on-chain transactions (signatures) to authorize an action, with each signature corresponding to a distinct private key. This is visible and verifiable on-chain but can be slower and more expensive due to gas costs.

TSS operates at the cryptographic layer. It generates a single, standard-looking blockchain signature from the combined computations of multiple parties, without any single party ever reconstituting the full private key. The "threshold" (e.g., 2-of-3) is enforced cryptographically off-chain. The result is a single, efficient on-chain transaction with lower fees and no public reveal of the internal signing structure.

For MPC networks focused on asset security, TSS is generally preferred for its privacy, efficiency, and reduced on-chain footprint.

conclusion
IMPLEMENTATION SUMMARY

Conclusion and Next Steps

You have successfully configured the core components of a secure MPC network for managing digital assets. This guide covered the foundational setup, from threshold signature schemes to secure enclaves.

Your MPC network is now a functional system for generating and managing private keys without a single point of failure. The key takeaways are the use of a threshold signature scheme (TSS) like GG20 or FROST, the deployment of nodes in a trusted execution environment (TEE) such as Intel SGX or AWS Nitro Enclaves, and the implementation of a secure key generation ceremony. This architecture ensures that no single party ever has access to the complete private key, significantly reducing the attack surface compared to traditional multi-sig or custodial solutions.

For production deployment, the next critical steps involve rigorous testing and security hardening. You should conduct a private audit focusing on the network's communication layer and the integrity of the TEE attestations. Implement comprehensive monitoring using tools like Prometheus and Grafana to track node health, signature latency, and potential security anomalies. Establish a formal incident response plan that details procedures for node failure, key rotation, and emergency shutdowns. These operational disciplines are as crucial as the cryptographic security of the protocol itself.

To extend the network's capabilities, consider integrating with existing blockchain infrastructure. You can connect your MPC signer to a relayer service for submitting transactions, or use it as the signing backend for a smart contract wallet like Safe (formerly Gnosis Safe). For advanced use cases, explore implementing proactive secret sharing for periodic key refresh without changing the public address, or setting up geographic distribution of nodes to enhance resilience against regional outages or legal jurisdiction risks.

The field of MPC is rapidly evolving. Stay informed about new cryptographic libraries such as ZenGo's multi-party-ecdsa or Coinbase's Kryptology, and keep your dependencies updated. Participate in communities and working groups like the MPC Alliance to learn about emerging best practices and potential vulnerabilities. Regularly review and test your setup against new attack vectors, ensuring your asset security model remains robust over time.

How to Set Up an MPC Network for Crypto Asset Security | ChainScore Guides