Benchmark Tool Explained: DKMS vs. MPC Scalability

Arthur Jen · August 18, 2023

Magic’s Benchmark Tool serves as a critical instrument in understanding the efficiency and scalability of various systems for generating private keys, an essential component of a web3 wallet. In this blog we explain how the Benchmark Tool works and the results it yields when comparing DKMS (Decentralized Key Management System) with MPC (Multi-Party Computation).

#What is the Benchmark Tool?

The Benchmark Tool is a specialized system designed to compare the efficiency and scalability of different cryptographic algorithms and systems. Its primary purpose is to measure the time taken to perform specific operations, such as key generation, across various algorithms.

#Experimental Setup of the Benchmark Tool

To ensure a fair and comprehensive comparison, the Benchmark Tool follows a meticulous setup:

1. DKMS Configuration: The setup mirrors the real-world configuration of the Magic SDK, focusing on the time taken to create a wallet using DKMS. This process involves creating the wallet client-side and encrypting it using Amazon KMS and Cognito.

2. MPC Configuration: The tool benchmarks DKMS against two primary MPC algorithms - Lindell 17 and GG19. For these algorithms, in-house clusters are established, distributing key generation across nodes using Threshold Cryptography. Notably, all MPC nodes for this benchmark are operated by Magic in a single data center, ensuring optimal latency for comparison. This setup is comparable to the DKMS setup.

3. UI Layer: The Benchmark Tool features a user interface layer, which includes a demo app and three iframes dedicated to DKMS, MPC-Lindell17, and MPC-GG19. These iframes initiate the algorithms and measure key generation time.

4. Infrastructure: The flow proceeds through an AWS infrastructure, comprising Elastic Load Balancers and independent containers running on the Elastic Container Service. The data flow is further illustrated in the provided diagram:

#Wallets Per Second Calculation

The results from the Benchmark Tool are compelling:

1. DKMS Scalability: DKMS proves to be at least 3X more scalable than its MPC counterparts (150ms ~ 10 TPS). The system is horizontally scalable, with potential throughput reaching up to 2000 Wallets/Sec.

2. MPC GG19 Scalability: This algorithm is vertically scalable, with wallet creation taking approximately 350ms. Even with 100 shards containing three nodes each, the throughput caps at 300 Wallets/Sec.

3. MPC Lindell 17 Scalability: Also vertically scalable, the Lindell 17 algorithm takes about 2.5 seconds for wallet creation. With 100 shards containing two nodes each, the throughput is limited to 40 Wallets/Sec.


The Benchmark Tool offers invaluable insights into the scalability and efficiency of DKMS and MPC algorithms. With DKMS showcasing superior scalability, businesses and developers can make informed decisions about which system best suits their needs. As technology continues to advance, tools like the Benchmark Tool will remain pivotal in guiding the future of digital security.

Let's make some magic!