All Blogs
Disaster Recovery: Online and Offline Key Export
Feature Spotlight
September 30, 2024

Disaster Recovery: Online and Offline Key Export

This blog discussed Key Export, the difference between online and offline Key Export, and how the different models affect the ability to access funds in disaster scenarios.

Introduction

One of the most important aspects of evaluating a product or service provider is its Disaster Recovery mechanism. This aspect addresses, among other things, what actions a user can perform if the provider’s service is down.

In Web3 products, where users are defined by private keys, the discussion about Disaster Recovery often involves methods of backing up the private key, as well as the option to export the key to maintain access to the funds in different scenarios. These subjects are directly tied to the user’s control over their funds, which is at the heart of self-custody. 

In this blog we focus on Key Export. Enabling users to export their key means that a user has the option to leave a specific vendor and restore their wallet, with all of their assets, on another vendor’s platform. Similarly, in MPC-based self-custodial products, a Key Export feature enables the end-user to export a full private key (an xpriv), after a joint MPC computation takes place between the secret shares.

Key Export In Sodot

Not all Key export features are the same. In Sodot, we put a lot of emphasis on this feature due to its importance to our customers who are building B2B and B2C products using our infrastructure. 

As a part of this, we offer two Key Export features: online and offline. While Online Key Export is common in the industry, Offline Key Export is unique and can be applied in wallet models that focus on maximum end-user control.

Online Key Export

In most MPC-based self-custodial products, the key management setup is n-of-n. This means that all of the n shares are needed to sign a transaction. 

For example, for every end-user, two secret shares are generated - one is stored on the wallet provider's server, and the other one is stored on the end user's device (web or mobile). Both are needed to sign a transaction; therefore, this is called a 2-of-2 setting. 

Similar to computing a signature, both shares are needed in order for the user to export the private key. Therefore, both parties should be online and interact with each other. Hence, the name Online Key export.

Meaning: For an end–user, this means that they can export the private key as long as the wallet provider’s services are available. In the unlikely event where the wallet provider’s service is down permanently or for a long period of time, the user is unable to export the key.

Illustration of Online Key Export (both the end-user and the wallet provider must participate)

Offline Key Export

Some providers choose a t-of-n key management setup for their MPC-based self-custodial products (where t<n). This means that only t shares out of n are needed to sign a transaction, providing redundancy. 

For example, for every end-user, three secret shares are generated - one is stored on the wallet provider's server, a second one is stored on the end user's device (web or mobile) and a third one is stored on the end user’s Google Drive as a backup. Only 2 out of the 3 are needed to sign a transaction; therefore, this is called a 2-of-3 setting. 

Normally, the share on the user’s end device and the share on the wallet provider’s server participate in signing. However, since the user has two shares in their possession, they are also able to sign a transaction without the wallet provider. 

Due to this setup, the wallet provider can enable a feature called Offline Key Export, where to export the private key, the shares that will participate are those that the user holds, and the computation will occur locally on the end-user’s device without communication with the wallet provider. 

Meaning: For an end–user, this means that they can export the private key even if the wallet provider’s service is not available.

Illustration of Offline Key Export (wallet provider participation is not required)

Final Remarks

As with all things, every setup has its pros and cons. One prioritizes UX and minimizes the risk of a user misusing this feature, and the other prioritizes the independence of the end user. As an infrastructure provider, we see it as our mission to provide a secure and robust toolbox that allows each wallet provider to choose their approach, alongside the information to make an educated decision. 

For additional information, feel free to reach out.

About Sodot

Sodot provides a self-hosted and highly performant MPC infrastructure for leading crypto custodians and wallets. We enable companies to seamlessly build great Web3 products with enterprise-grade security and delightful UX, the way they intend to, without limitations or dependencies.