Capsule’s Key Management System forms the core of its security architecture, employing advanced cryptographic techniques to safeguard user assets while ensuring usability across various platforms and blockchain ecosystems. At its heart is a distributed Multi-Party Computation (MPC) system that leverages distributed key generation (DKG) and distributed signing. This innovative approach ensures that user keys are never stored in a single vulnerable location, and neither applications nor Capsule itself can access users’ private keys, providing a robust foundation for secure, non-custodial wallet management.

Key Components

Capsule’s key management system relies on a 2-of-2 MPC system comprised of three main components:

  1. Device Key
  2. Cloud Key
  3. Enclave Key

Device Key

The Device Key is custodied by the user and acts like a hot wallet. It is accessible in the browser or on the user’s device, providing immediate control over assets while interacting with crypto applications.

Cloud Key

The Cloud Key is managed by Capsule and stored securely in cloud hardware-security modules (HSMs). This setup provides a secure off-device backup of the user’s key, safeguarding the assets even in the event of device loss or compromise.

Enclave Key

The Enclave Key is a unique feature of Capsule’s system, designed to bridge the gap between device security capabilities and blockchain requirements.

Most modern smartphones come with hardware secure enclaves, which are dedicated areas within the device’s main processor used for storing and protecting sensitive data. However, these enclaves primarily support the secp256r1 elliptic curve, which differs from the secp256k1 curve used by most modern blockchains.

To address this, Capsule generates a separate Enclave Key. This key is used to authorize access to the Cloud Key, enabling biometric authentication and signing on the secp256k1 curve. This process ensures users can leverage their device’s hardware security features while interacting seamlessly with blockchain networks.

Key Generation and Management Process

  1. Distributed Key Generation: When a user creates a wallet, Capsule initiates a DKG process. This generates the Device Key and Cloud Key without ever assembling the full private key in one place.

  2. Enclave Key Creation: Simultaneously, an Enclave Key is generated and stored in the device’s secure enclave.

  3. Cloud Key Storage: The Cloud Key is securely stored in Capsule’s HSMs.

  4. Device Key Protection: The Device Key is protected by the user’s authentication method (e.g., passkey, biometrics) and stored securely on the device.

Transaction Signing

When a wallet needs to produce a signature:

  1. The Capsule SDK coordinates signatures from the user’s device (Device Key) and from Capsule’s cloud (Cloud Key).
  2. The Enclave Key is used to authorize access to the Cloud Key.
  3. The signatures are combined to create the final transaction signature.
  4. At no point are the key shares reassembled into a full private key.

Security Benefits

This key management system offers several security advantages:

  • No Single Point of Failure: Since the private key is never fully assembled, there’s no single point of vulnerability.
  • Phishing Resistance: Even if a user’s email or social login is compromised, an attacker would still need physical access to the user’s device to initiate transactions.
  • Device Loss Protection: If a user loses their device, they can still recover their wallet using the Cloud Key and proper authentication.
  • Censorship Resistance: Users have the option to export their Cloud Key, ensuring they maintain control over their assets even if Capsule’s services are unavailable.

Flexible Backup Mechanisms

Capsule supports flexible backup mechanisms and a key-based permissions system, allowing for customized security setups based on specific application needs.

For more information on Capsule’s flexible backup and permissions systems, please contact the Capsule team directly.

By leveraging this advanced key management system, Capsule provides a secure, flexible, and user-friendly solution for embedded wallets, balancing robust security with seamless user experience across various blockchain ecosystems.