Caloogy Article
中文

Engineering Pitfalls of MPC Wallets and Threshold Signatures

Date
Nov 16, 2025
Series
Wallet
Reading
5 min
Topics
WalletMPCThreshold signatureTss

The one-sentence version

MPC (Multi-Party Computation) wallets split a private key into multiple shares and distribute them among different devices or servers. During signing, the parties collaborate to compute a standard signature, ensuring the full private key never appears in any single location. It is more resilient to single points of failure than a single private key and appears as a regular address on-chain. However, threshold ECDSA protocols are extremely complex; theoretical security does not equal implementation security. Vulnerabilities disclosed in 2023, such as BitForge and TSSHOCK, demonstrate that failing to validate parameters or omitting zero-knowledge proofs can allow a malicious participant to derive the full private key from others' shares.

This article has three layers:

  1. Layer 1: The Intuition: From "splitting keys" to "never reassembling keys"
  2. Layer 2: Real-World Use: Institutional custody, exchanges, personal MPC wallets, and real vulnerabilities
  3. Layer 3: Mathematics and Engineering details: The difficulty gap between threshold Schnorr and threshold ECDSA, share refreshing, and implementation checklists

Layer 1: The Intuition

1.1 From "Splitting Keys" to "Never Reassembling Keys"

Scheme Approach Weakness
Shamir Secret Sharing The private key is split into several shares and stored separately; they are reassembled when needed The moment they are reassembled, the full private key appears on a specific machine
Multi-sig (On-chain) On-chain contracts require signatures from multiple independent private keys Rules are public, gas fees are high, and it must be deployed separately for each chain
MPC / Threshold Signature Each party holds one share and they collaborate to compute the signature directly without ever reassembling the private key The protocol is complex and prone to implementation errors

1.2 An Analogy

Three people each know one part of a number, and they want to collectively calculate the result of "this number multiplied by a public number." Through a carefully designed set of rules for exchanging information, all three eventually obtain the correct result, but no one learns the complete number. Threshold signatures do something similar, except "multiplication" is replaced by signature computation.


Layer 2: Real-World Use

Real-world Vulnerabilities:

Disclosure Issue
BitForge (Fireblocks research team, 2023) Several popular threshold ECDSA implementations (based on protocols like GG18 / GG20) omitted or simplified zero-knowledge proofs for Paillier key parameters. A malicious participant can construct special parameters to derive other participants' shares through a few signature interactions.
TSSHOCK (Verichains, 2023) In some implementations, the hash encoding method for zero-knowledge proofs was ambiguous, or the challenge space was too small, allowing attackers to forge proofs.

These are not mathematical errors in the protocol papers, but rather omissions of checks during implementation for the sake of performance or convenience.


Layer 3: Principles and Engineering

3.1 Threshold Schnorr is Easy, Threshold ECDSA is Hard

The signature value s=k+c xs = k + c\,x of a Schnorr signature is linear with respect to the private key xx and the nonce kk. If xx and kk are both split using Shamir Secret Sharing, each party calculates their own sis_i, and the full signature is obtained by summing them up using Lagrange coefficients. The FROST protocol works this way.

The ECDSA signature value is:

s=k−1(h+r x) mod n,s = k^{-1}(h + r\,x) \bmod n,

It contains k−1k^{-1}, as well as the product of k−1k^{-1} and xx. Multiplication and inversion after splitting cannot be done by simply "calculating individually and then adding"; they require additional cryptographic tools. Common practices involve using Paillier Homomorphic Encryption (see "Homomorphic Encryption") or Oblivious Transfer (OT) to perform "multiplication of secret shares," combined with extensive zero-knowledge proofs to ensure every party is honest. The protocol involves many steps and many parameters, leading to many potential points of failure.

3.2 Proactive Refresh

If an attacker can steal shares one by one over time, they will eventually reach the threshold. The countermeasure is periodic refreshing: the parties collaborate to replace their shares with a new set, where the corresponding private key remains unchanged, but the old shares become invalid. This forces an attacker to steal enough threshold shares within a single refresh cycle.

The refresh protocol itself must be handled carefully: if a refresh fails midway or a participant goes offline, it must not leave the system in a chaotic "half-new, half-old" state.

3.3 Implementation Checklist

Check Description
All zero-knowledge proofs must be verified; they cannot be skipped for performance The root cause of BitForge
Perform full validation on parameters provided by other participants For example, ensuring the Paillier modulus is indeed a product of two large primes and has no small factors (see "Primality Testing")
Fiat–Shamir hashes must encode the entire context without ambiguity The root cause of TSSHOCK (see Fiat–Shamir in "Schnorr Signatures")
The challenge space must be sufficiently large A space that is too small makes forging proofs feasible
The signature nonce must not be reused and must not be controlled by a single party Otherwise, it leads to the kk repetition disaster in elliptic curves
Malicious participants must be identifiable and excludable when detected "Identifiable abort"
Use audited, actively maintained libraries and follow security advisories Do not implement it yourself

3.4 Problems MPC Cannot Solve


Summary

Layer Key points
Intuition Shares collaborate to compute the signature; the full private key never appears
Difficulty The k−1k^{-1} and products in ECDSA make thresholding complex; Schnorr is much simpler
Lessons BitForge, TSSHOCK: The protocols are correct, but implementations skipped checks
Limitations Policies are off-chain; cannot prevent frontend tampering; shares must be refreshed periodically