Skip to content

This guide provides a conceptual overview of Multi-Party Computation (MPC) integration with Ripple Custody. MPC is a distributed key management approach that eliminates single points of failure by distributing key shares across multiple nodes.

Deployment: Deploy customer MPC nodes to AWS using Nitro Enclaves. See the AWS deployment guide for detailed instructions.


What is multi-party computation (MPC)?

Multi-Party Computation (MPC) is a cryptographic protocol that enables multiple parties to jointly compute a function over their inputs while keeping those inputs private. In Ripple Custody, MPC is used for distributed key management where:

  • No Single Point of Failure: Private keys are never reconstructed in a single location
  • Distributed Key Shares: Each party holds only a share of the private key
  • Threshold signatures: A minimum number of parties must collaborate to sign transactions.
  • Enhanced security: An attacker must compromise multiple nodes to steal the key shares, and would still need access to Ripple's proprietary algorithm to reconstruct private keys.

How Ripple Custody uses MPC

Ripple Custody implements a 3-of-4 threshold signing scheme for transaction signing, with 4-of-4 consensus required for account creation:

AspectDescription
Total Nodes4 nodes (2 Ripple nodes + 2 customer nodes)
Signing ThresholdAny 3 out of 4 nodes can create valid signatures
Account CreationAll 4 nodes must participate (4-of-4 required)
Key GenerationAll 4 nodes must participate in Distributed Key Generation (DKG)
Availability1 node can be offline and transaction signing still works; account creation requires all nodes

Node ownership and shared responsibility

Important: The node numbering reflects ownership, not deployment order.

MPC deployment follows a shared responsibility model:

  • Ripple deploys and manages Nodes 0 and 1, plus the Relay Server and vault
  • Customers deploy and manage Nodes 2 and 3 in their own infrastructure
NodeOwnerManaged ByDescription
Node 0RippleRippleRipple-hosted MPC node (connected to vault)
Node 1RippleRippleRipple-hosted MPC node
Node 2CustomerCustomerCustomer-deployed MPC node
Node 3CustomerCustomerCustomer-deployed MPC node
Relay ServerRippleRippleCoordinates P2P communication between nodes
vaultRippleRippleHosted in Ripple environment, connected to Node 0

Architecture

The following diagram shows the MPC network topology.

Abbreviations:

  • DKG – Distributed Key Generation: The process where all 4 nodes collaborate to generate key shares
  • TSS – Threshold Signature Scheme: The protocol enabling 3-of-4 nodes to produce valid signatures

Customer Infrastructure

Ripple Infrastructure

Customer MPC Nodes

Ripple MPC Nodes

KMS Connect

libp2p P2P

libp2p P2P

libp2p P2P

libp2p P2P

Vault

Relay Server
libp2p Coordination

MPC Node 0
Ripple-Hosted

MPC Node 1
Ripple-Hosted

MPC Node 2
Customer-Deployed

MPC Node 3
Customer-Deployed

Customer Infrastructure

Ripple Infrastructure

Customer MPC Nodes

Ripple MPC Nodes

KMS Connect

libp2p P2P

libp2p P2P

libp2p P2P

libp2p P2P

Vault

Relay Server
libp2p Coordination

MPC Node 0
Ripple-Hosted

MPC Node 1
Ripple-Hosted

MPC Node 2
Customer-Deployed

MPC Node 3
Customer-Deployed

Key management flow

Node 3 (Customer)Node 2 (Customer)RelayNode 1 (Ripple)Node 0 (Ripple)vault (Ripple)Node 3 (Customer)Node 2 (Customer)RelayNode 1 (Ripple)Node 0 (Ripple)vault (Ripple)Key Generation (DKG) - All 4 nodes requiredEach node generates and stores encrypted key shareSigning (TSS) - Any 3 nodes required3 nodes collaborate to produce signatureInitiate DKGCoordinate with peersDKG protocolDKG protocolDKG protocolSign transaction requestRequest signaturesTSS protocolTSS protocolReturn signed transaction
Node 3 (Customer)Node 2 (Customer)RelayNode 1 (Ripple)Node 0 (Ripple)vault (Ripple)Node 3 (Customer)Node 2 (Customer)RelayNode 1 (Ripple)Node 0 (Ripple)vault (Ripple)Key Generation (DKG) - All 4 nodes requiredEach node generates and stores encrypted key shareSigning (TSS) - Any 3 nodes required3 nodes collaborate to produce signatureInitiate DKGCoordinate with peersDKG protocolDKG protocolDKG protocolSign transaction requestRequest signaturesTSS protocolTSS protocolReturn signed transaction

Key encryption keys (KEK)

Each MPC node requires a Key Encryption Key (KEK) to encrypt its key share at rest. The KEK is an AES symmetric key stored securely that never leaves the node's secure environment.

When deploying customer nodes to AWS using the MPC Deployer tool:

  • KEK is automatically generated during key generation (--keygen mode)
  • KEK is stored in AWS Secrets Manager
  • KEK is a 32-character hexadecimal string (256-bit AES key)
  • Key shares are encrypted with the KEK before storage

Communication keys (ComKey)

Each MPC node uses a Communication Key for secure node-to-node communication:

Node identification key

  • Type: Asymmetric key (ECDSA)
  • Purpose: Each node signs its payload with its private key
  • Verification: Other nodes verify payloads using known public keys (Peer IDs)

The Peer ID (public key) for each customer node is generated during the --keygen phase and must be shared with Ripple to configure the cluster.


Backup and restoration

MPC deployments include encrypted backup capabilities using verifiable encryption:

Backup encryption keys

  • Each node can generate encrypted backups of its key shares
  • Backups are encrypted using a separate Backup Encryption Key
  • Backups include zero-knowledge proofs for verification

Backup procedures

  1. Backup creation: Initiated through the Ripple Custody API via the v0_CreateBackup intent
  2. Backup storage: Encrypted backup files are stored securely
  3. Verification: The backup can be verified using zero-knowledge proofs without decryption
  4. Restoration: Requires the backup encryption key and coordination with Ripple

For detailed backup procedures, including key generation scripts, backup verification, and exit strategy information, see MPC backups.


Comparison: MPC vs HSM

FeatureMPCTraditional HSM
Key StorageDistributed shares across 4 nodesCentralized in HSM appliance
Single Point of FailureNoYes (HSM itself)
Threshold SigningYes (3-of-4)No
Account Creation Threshold4-of-4 (all nodes required)N/A
Deployment2 Ripple + 2 Customer nodes1-2 HSM appliances
Signing AvailabilityHigh (1 node can fail)Medium (depends on HA config)
Account Creation AvailabilityRequires all 4 nodesN/A
Geographic DistributionNodes in different regions / Availability ZonesLimited by HSM location
RegulatoryDistributed custody modelTraditional custody model
BackupVerifiable encrypted backupsHSM-specific backup procedures

Customer nodes deployment

Customer MPC nodes (Node 2 and Node 3) are deployed using the MPC Deployer tool:

The MPC Deployer is a Docker-based tool that automates the deployment of customer MPC nodes (Node 2 and Node 3) to a specific cloud provider.

Deployment process

Customer node deployment is a two-step process:

  1. Key material generation: Generate cryptographic keys for your nodes.
  2. Node deployment: Deploy the infrastructure and MPC node software.

AWS Account (Customer)

VPC

Private Subnet 2 (AZ2)

Private Subnet 1 (AZ1)

EC2 Nitro Instance
MPC Node 3

EC2 Nitro Instance
MPC Node 2

Secrets Manager
Keys & Config

CloudWatch
Logs

AWS Account (Customer)

VPC

Private Subnet 2 (AZ2)

Private Subnet 1 (AZ1)

EC2 Nitro Instance
MPC Node 3

EC2 Nitro Instance
MPC Node 2

Secrets Manager
Keys & Config

CloudWatch
Logs

Prerequisites

Before deploying customer nodes, ensure you have:

RequirementDescription
AWS AccountWith permissions to create resources
DockerDocker Desktop or Docker Engine installed
MPC Deployer ImageProvided by Ripple
Tenant ConfigurationAlias and instance code from Ripple

See the AWS deployment guide for detailed instructions.


Next steps

  1. Review Prerequisites for deployment
  2. Contact Ripple to initiate MPC cluster setup.
  3. Follow the AWS deployment guide
  4. Review Production best practices for namespace segmentation, HA, and monitoring