by Peyman Momeni (Co-Founder) and Setareh Ghorshi (Cryptography Engineer)
You’ve heard about Multi-party computation (MPC) in many different contexts, ranging from DeFi, gaming, and social, to federated learning.
In this article, we explore MPC and secret sharing. What do parties know? Do they know things? Let's find out.
While MPCs have been researched since the 1980s, they are one of the most misunderstood categories in web3. They are not just threshold signatures; MPC is not even a specific algorithm – it's a problem that many protocols are trying to solve with different security models, efficiency optimizations, and cryptographic assumptions.
Simply put, MPC allows (n) parties to store private inputs and jointly perform computations on them without revealing their inputs to others. When talking about MPC, (n) can be any number, ranging from two to any number of participants desired,e.g. garbled circuits and Renegade are 2PC, WorldCoin is 3PC, and Fairblock and Arcium can be as high as 200PC. Using MPCs, we can solve some of the most fundamental issues in blockchain infrastructure and unleash the next generation of fun and impactful applications on-chain.
Most MPC algorithms such as (
Nevertheless, we are actively monitoring new research in cryptography schemes and adopting new approaches that might enhance the security and efficiency of our system.
For the rest of this article, we’ll describe how secret sharing works in more detail and then present a recent secret sharing scheme, which has
In a Verifiable Secret Sharing (VSS) scheme, a dealer distributes shares of a secret among (n) parties such that at least (t+1) parties need to combine their shares to regenerate the secret. The verifiability property allows for verification of the received shares by the parties. A well-known VSS scheme is Feldman’s VSS, which is based on Shamir’s Secret Sharing (SSS).
In SSS, the dealer chooses a secret value (s) and constructs a polynomial that has its constant part as the secret value:
Then, the dealer calculates the share for each party (i) as:
Here, the share of each party is the evaluation of the (t)-degree polynomial at a specific point. Hence, any (t+1) parties can aggregate their shares using the Lagrange Interpolation formula to recover the polynomial and then recover (s) by calculating (p(0)). Feldman’s VSS extends this protocol by allowing the parties to validate the shares they receive, which is useful in case the dealer itself is malicious.
For the share validation to be possible, the dealer calculates the following commitments for the polynomial:
Using these commitments, each party can verify that the share they received actually comes from the polynomial. Assuming party (k) has share (
VSS is powerful, but it is also computationally expensive, making it less suitable for applications with many participants. Recent research, such as "Efficient Secret Sharing for Large-Scale Applications" proposes a more efficient scheme for secret sharing by replacing costly polynomial operations with linear equations.
The mentioned research paper presents a secret sharing scheme based on linear erasure codes. Erasure codes transform an input message into a larger codeword (encoding), such that the original message can be recovered even if parts of the codeword are erased (decoding). This approach constructs its own linear erasure code using random band matrices.
In this scheme, instead of a polynomial, a random band matrix (M) with independent rows and a random vector (x) are generated. The number of rows in (M) is equal to the number of parties (n), and the number of columns is at least the privacy threshold (t).
(M) is generated using the following algorithm:
For each row of (M), a random seed (
and
(
Now, assuming we have a secret value (m), first a masking for (m) is calculated as follows:
Then, for each party ( i ), their share is generated as:
Accordingly, with matrix-vector multiplication (
Since the rows of ( M ) are independent, the adversary cannot learn about any row of ( M ) without compromising the corresponding party.
When the parties decide to regenerate the shares, they combine their shares and use Gaussian elimination to solve the resulting set of linear equations to recover ( x ). Then, with ( x ), the actual secret value ( m ) can be calculated using the mask value.
In summary, the secret-sharing process is as follows:
For this secret sharing to become verifiable (Feldman-based VSS algorithm), the commitments in the form of
can be used. Since each party has their row (
where ( t ) is the number of columns in ( M ).
A similar algorithm can be used to construct Pedersen-based VSS using a blinding vector ( v ) along with ( x ) and two generators ( g ) and ( h ). In this algorithm:
Each share is modified to contain both (
Using this VSS as the underlying algorithm for MPCs and DKG can improve their performance and unlock endless new opportunities in crypto applications.
Recent research, such as the ramp secret sharing scheme proposed by the mentioned paper, has enhanced the performance of Verifiable Secret Sharing for large-scale applications.
At Fairblock, we are committed to continuously improving cryptographic protocols to stay at the top of technological advancements. The described improvements in secret sharing represent a potential future path for our DKG implementations. We are actively researching such new schemes and adopting them to ensure the efficiency and robustness of our framework.