Key Re-sharing

Introduction

Multi-Party Computation (MPC) heaivly relies on the primitive of Shamir's secret sharing (SSS) for various use cases.
In this secret-sharing scheme a set of

n parties would like to hold a secret in a distributed manner. The secret, which will be denoted
s
for the rest of this document, is an element of a field
Zp
. It is important to mention that "distributed manner" means that party
i
will hold a piece of information, denoted
pi
so that :

  1. For each set of
    t+1
    parties they will be able to retrieve, or make a certain MPC-driven computation on
    s
    .
  2. Each set of up to
    t
    parties who choose to collude can learn nothing about
    s
    .

The parameters

t and
n
are known prior to the sharing of the secret. In the basic setting of Shamir's secret sharing there is a trusted-dealer who send to each party
i
its corresponding
pi
. So what is this
pi
, and how does it look like?

Shamir's Secret Sharing

DISCLAIMER: I may not be 100% algebraically accurate for the sake of both brevity convenience.

REMINDER: A polynomial

P(x) is a function which can be expressed algebraically in the following form:
P(x)=i=0kaixi
for some number
k
. The
ai
are called "coefficients" and the largest number
i
such that
ai0
is the "degree" of the polynomial. Note that in the case that all coefficients are zero, we consider the degree to be
.

Shamir's secret sharing utlizes one key algebraic property about polynomials known as the "unique interpolation theorem" which states that:

Given a set

S={(x0,y0),...,(xt,yt)} of
t+1
pairs of field elements, such that at least one
yi0
, there exists a unique polynomial
PS(x)
of degree at most
t
such that
PS(xi)=yi
for all
0it
.

Therefore, given two distinct polynomials

P1(x),P2(x) of degree at most
t
and a set of
t+1
sample points
x0,...,xt
then for at least one
i
between
0
and
t
it must hold that
P1(xi)P2(xi)
. Thus, a set of
t+1
evaluations of a polynomial is all that is required to reconstruct a polynomial
P(x)
. By "reconstructing" we mean deriving the coefficients
ai
of the polynomial so we will be able to express the polynomial in the form
P(x)=i=0taixi
.

Polynomial Interpolation

Before diving into how the sharing is done, let's answer an even more fundamental question. Given those

t+1 evaluations of a polynomial at points
x1,...,xt+1
, how can it be practically reconstructed?
The reconstruction's smallest building blocks will be a set of degree
t
polynomials
πit(x)
that satisfy for
x{x1,...,xt+1}
the following
t+1
constraints:
πit(x)={1x=xi0xxi

Notice that for
x
values which are not one of
x1,...,xt+1
the value of
πit(x)
is not necessarily 0 and that there is exactly one polynomial who satisfies these constraints for every choice of
i
and
t
(according to the unique-interpolation theorem). Thus, the polynomial
πit(x)
can be constructed with the following formula:
πit(x)=j=1jitxxjxixj
.
This formula satisfies all our constraints:

  • If
    x=xi
    then all factors of the formula will be
    1
    and thus
    πit(xi)=1
    .
  • If
    x=xj
    for
    ji
    then at least one of the factors' numerator will be zero and thus
    πit(xj)=0
    .

The actual coefficients of

πit(x) can be derived from this formula by programmatically multiplying the factors of the product.

Two observations that will allow us to reconstruct any polynomial from is samples on points

x1,...,xt+1 are as follows:

  1. Let

    P(x)=i=0tpixi,Q(x)=i=0tqixi be two distinct polynomials of degree
    t
    , then their sum is also a polynomial of degree
    t
    .

This one is correct because their sum can be expressed as a polynomial where coefficients are simply added:

P(x)+Q(x)=i=0t(pi+qi)xi

  1. Let

    P(x)=i=0tpixi be a polynomial and let
    a0
    be a constant. Then the product
    aP(x)
    is also a polynomial.

Similarly to the previous this one is correct because the resulting polynomial is the same as the original polynomial with all coefficients just multiplied by

a.

Great, now using these observations we can create a polynomial

P(x) such that
P(xi)=yi
for all
0it
, we will give the polynomial and these explain why is satisfied these properties:
P(x)=i=0tyiπit(x)

First, according to the previous two observations and since each

πit(x) is a degree
t
polynomial, by multiplying each
πit(x)
by a constant
yi
and summing them, the result is also a polynomial of degree
t
.
Next, for each
xi
we get that:

P(xi)=j=0tyjπjt(xi)=yiπit(xi)=1+j=0jityjπjt(xi)=0=yi
By that achieving the requested interpolation.
This interpolation algorithm is known as "Lagrange Interpolation" and the
πit
are often referred to as "Lagrange Polynomials".

Sharing Algorithm

The sharing goes as follows. The trusted dealer, who knows the secret

s will generate a polynomial
F(x)=i=0tfixi
of degree
t
such that
F(0)=f0=s
and for
1it
the dealer will pick
fi
randomly from the field
Zp
. The dealer will send, for each party
i
between
1
and
n
its share
pi=F(i)
. In other words, each party
i
has a share of the secret which is the polynomial
F
evaluated at point
i
.

So why is this even working? Since the polynomial

F is of degree
t
, any set of
t+1
parties will be able to derive
F
according the to unique interpolation theorem. However, for any set of
t
parties, they will not be able to learn anything about
F
or
s
since up to
p
different polynomials can be created that all agree with the evaluations of
F
given to these
t
parties, and each will be evaluated to a diffenret value at point
0
.

This is all fun, but at this point we have this trusted dealer which we must trust and who is accessible to the secret. In many MPC scenarios we want some secret

s to never exist at a single point but still be able to make some computations based on its value. Therefore, we must find a way to get rid of the dealer.

Shamir's Secret Sharing - Without a dealer

In this section we will try to get rid of the dealer and still achieve the same effect of Shamir's secret sharing where a subset of

t+1 out of
n
parties, each holding
pi
- a share of a secret, can restore the secret, but without a dealer.
One question that must be asked at this point is what is the meaning of
s
? In particular, since no one knows
s
(since there is no dealer), what exactly are we trying to achieve?
Well, we will change our goal by a little bit so that instead of sharing an existing secret
s
held by the dealer, the parties will generate cooperatively a secret and share it between them without any party at any time holding the secret (or any information that may allow it to compute it efficiently).

This can be achieved in the following way. Party

i (for all
1in
) will generate a local secret denoted
si
so that the final secret
s
shared among all parties will be
s=i=1nsi
. To achieve this, each party
i
will share
si
between all parties by following the steps of the dealer from the previous section. To be explicit, it will randomly create a polynomial
Fi(x)
of degree at most
t
such that
Fi(0)=si
and send to party
j
a share of this secret denoted by
pi,j=Fi(j)
. Now each party
j
who hold the secret shares
(p1,j,...,pn,j)=(F1(j),...,Fn(j))
will sum all those shares to get
pj=i=1npi,j
.
Since
Fi(x)
are all polynomials of degree
t
, their sum is also a polynomial of degree at most
t
denoted by
F(x)=i=1nFi(x)
.
Notice that:

  1. pj
    , the secret share of party
    j
    satisfies:
    pj=i=1npi,j=i=1nFi(j)=F(j)
  2. The shared final secret
    s
    satisfies:
    s=i=1nsi=i=1nFi(0)=F(0)

Therefore, the parties ended in a state where each party holds a secret-share

pj which is the evaluation of a degree
t
polynomial
F(x)
at point
j
and the shared secret is
s=F(0)
. From previous section we know that this allows each subset of parties of size
t+1
to compute the secret and any subset of
t
parties will not be able to derive any information about the secret.

Without getting too much into details, the share

s isn't exposed to any party along the way because if it did, it would imply the original secret-sharing algorithm from previous section to be insecure, but it is secure because of the unique-interpolation theorem.

Motivation

Now that we know just enough about how secret shares are generated, we consider the scenario in which a set of

n parties have a secret shared among them so that each party
i
holds a share of the secret, denoted
pi=F(i)
where
F(x)
is a polynomial of degree at most
t
and
F(0)=s
where
s
is the shared-secret which isn't known fully to any party.
The problem we want to solve is being able add party
n+1
to the setup so that it will have its own share of the secret,
pn+1=F(n+1)
while maintaining the demand that each set of
t+1
parties will be able to make some MPC-driven computations on the secret and any set of up to
t
parties will not be able to do so.

The most naive approach is to gather all

n+1 parties together, the original
n
parties will forget about their existing shares
pi
and all parties will derive new shares
pi
of a new secret
s
. This is dissatisfactory since we don't want the existing secret to change. On top of that, we would be happy if the solution will require as little communication as possible.

The solution

Party

n+1 should obtain
pn+1=F(n+1)
in a way that only it will learn
F(n+1)
and no other party will learn anything about it. After obtaining this piece of information, the party will be able to collaborate with any set of
t
additional parties to perform MPC-driven computations on the secret.
The key observation which has driven us is:

If it only takes

t+1 parties to compute the secret
s=F(0)
it shouldn't take more than
t+1
parties to evaluate
F(n+1)
and send it to party
n+1
.

According to this mindset, it should be possible to achieve a solution where not all parties are required to add new party in the happy flow where none of the parties is malicious.

Naive Solution

One naive way in which a set of

t+1 parties numbered
x1,..,xt+1
could have done this is so that party
i
will compute
Qi=pxiπxit(n+1)
and send it to the new party who will in turn sum those inputs to obtain
F(n+1)=i=1t+1Qi=i=1t+1(pxiπxit(n+1))
.
However, this imposes a major security risk, since party
n+1
receiving
Qi
can divide it by
πxit(n+1)
(notice that
πxit
is a publicly known polynomial) and obtain
yi
for each
i
and thus reconstruct the polynomial
F(x)
with those
t+1
shares and obtain the secret!
Therefore, we should look for another solution that doesn't violate the security requirements.

Correct Solution

Each party

i out of the
t+1
collaborating parties could locally compute their local additive share of
F(n+1)
which is
Qi=pxiπxit(n+1)
. As mentioned earlier the sum of the
Qi
s equals to the share of party
n+1
which is
F(n+1)
. (
)
Thus, we will think of their sum as a secret and we would like to share it. Recall that Shamir's Secret Sharing algorithm without a dealer allowed some parties to distribute a secret amongst them so that the shared secret will be the sum of the local secrets of all parties.
In our case the local secret of each party will be
Qi
and running this algorithm where each party uses
Qi
as the local secret will result in each party
i
holding the evalution of some polynomial
G(x)
at point
i
such that
G(0)
is the sum of all local secrets
Qi
which equals to
F(n+1)
which is the share of party
n+1
(see
).
Each party will send their respective evaluation of the polynomial
G(i)
to party
n+1
who will be able to reconstruct polynomial
G(x)
and compute
F(n+1)
. Assuming Shamir's secret sharing without a dealer is secure, no party should be able to infer
G(0)=F(n+1)
and party
n+1
shouldn't be able to infer the secrets of the rest of the parties.