For AI agents: a documentation index is available at /llms.txt. A markdown version of this page is available at the same URL with .md appended (or via Accept: text/markdown).
Skip to main content

Multi-Party Computation

Multi-Party Computation (MPC) powers MetaMask Embedded Wallets' non-custodial key management, enabling secure access and signing without exposing a full private key.

Understanding MPC in MetaMask Embedded Wallets​

MetaMask Embedded Wallets utilizes threshold cryptography, a principle of MPC, to ensure that a user can access their private key or generate transaction signatures only if they meet a specified threshold - typically 2 out of n key shares.

Design goals​

  • Low-friction user experience: MetaMask Embedded Wallets aims to provide a non-custodial wallet experience with familiar sign-in flows.
  • Broad compatibility: Ensures integration with existing authentication methods and blockchain ecosystems.
  • Global performance & scalability: Designed to meet the expansive demands of the web3 market efficiently.

2-of-3 setup​

  1. Authentication share: Derived from the user's chosen login method (for example, social login such as Google).
  2. Device share: Stored on-device, protected by OS security/biometrics.
  3. Backup/2FA share: User-controlled recovery using a high-entropy secret.

Implementation variants​

  1. Shamir Secret Sharing (SSS): Reconstructs the key when the threshold is met.
  2. Threshold Signature Scheme (TSS): Creates partial signatures; no key reconstruction.
This diagram describes the relationship between the Embedded Wallet SDK and integrating application

Both methods adhere to the core concept of threshold-based security but differ in their approach to wallet management and signature generation.

Wallet management infrastructure​

The wallet management infrastructure distributes key shares so the full private key is never stored or exposed. The authentication share is generated by the Embedded Wallets Network using a 5/9 consensus, keeping wallets non-custodial.

Next steps​

This section is an overview of MPC in MetaMask Embedded Wallets. For a more in-depth understanding, see: