In my last article on Shamir Secret Sharing, I outlined the basics of Shamir Secret Sharing (SSS) and described how polynomial interpolation works. Then I described an issuance protocol which adds new shareholders or recovers lost shares using multi-party computation practices. If you’re not already familiar with Shamir Secret Sharing, I highly recommend reading that article first.
This article will focus on a protocol called secret resharing, which I first heard about in this thesis by Mehrdad Nojoumian.
Resharing can be used to recompute new secret shares, optionally with a new threshold. In a Shamir secret sharing group with threshold
For example, what if one share is accidentally exposed? If one share is public, the group’s threshold has essentially decreased from
The group as a whole may wish to restore the security of their shares by revoke the exposed share. By regenerating their shares, the group ensures the exposed share cannot be be used, as long as the rest of the group securely erases their old shares as well.
Resharing also allows shareholders to change the threshold of their shares from
As an added bonus, the set of participants can be changed during a resharing session: The set of shareholders before resharing can be different from the set of participants after resharing. Any number of old shareholders can be removed and any number of new shareholders can be added.
We want our protocol to work in an operating environment where some of our peers may be malicious. The protocol must be verifiable, so that adversarial shareholders cannot collude to corrupt the new shares, or learn anything about the group’s secret. This is called verifiable secret resharing, or VSR for short.
Mission
A set of
If
The set of shareholders may also be changing. Some shareholder may be removed, and others introduced into the group.
Here follows a resharing protocol with verifiable commitments which enables a set of
A detailed explanation of VSR is given in this paper by Wong, Wing, and Wang.
Parameters
Yippee! Let’s let all the things.
- Let
be the total number of shareholders in the group. - Let
be the old threshold. - Let
be the desired new threshold. - Let
be the finite field of integers mod some prime number . - Let
be the old secret polynomial of degree , with coefficients in . - Let
be the new secret polynomial of degree , with coefficients in . - Let
be an additive group generator (e.g. an elliptic curve base point) of order . - Let each
be an index in representing a share. - Let
be the original evaluation of the secret share polynomial for share , such that . - Let
be the new evaluation of the secret share polynomial for share , such that . - Let
be the set of at least share indexes whose bearers are online and participating in the threshold change protocol. - Let
be an interpolation algorithm which takes in a set of points and outputs a unique polynomial which interpolates all points in . - Let
be the original public coefficients of the secret polynomial , such that
- Let
be the Lagrange coefficients for a set of inputs , used to evaluate a polynomial at .
…such that
Strategy
Our goal is to construct a protocol which gives each shareholder
Let’s denote the new coefficients of this new polynomial
Naturally, no malicious subset of fewer than
One way to do this would be to get each shareholder
Consider the coefficient polynomial
We treat each
This seems a woefully roundabout way of constructing a random polynomial, but the reason why we approached
Multi-Party Interpolation
We have a definition for
Recall how we defined
Individual shareholders don’t know
Remember that
This expression for
Let’s clean up this definition and denote those resharing polynomials as
Notice how shareholder
A new share
Thus, for shareholder
Of course, this all hinges on the assumption that every
We’ll see further down how these commitments are used. I think I’ve spent enough paragraphs on motivation at this point, so let’s dive into the specific protocol.
The Protocol
In this section, I’ll simply describe the resharing protocol step-by-step.
Assume every online shareholder can positively identify each other and can communicate with one-another over secure and authenticated channels.
Any offline shareholders not in
Every shareholder is assumed to have access to a consistent view of
Resharing
- Each shareholder
generates random coefficients . These coefficients define a degree polynomial , whose constant term is the existing share .
- Each online shareholder
computes a commitment to the coefficients of .
This commitment, along with the original public polynomial coefficients
Each online shareholder
publishes their commitment to all other shareholders (including offline ones).All online shareholders should ensure they hold the same set of commitments
before continuing. Some shareholders may attempt denial-of-service attacks by submitting inconsistent commitments. This would cause the resharing protocol to fail unattributably, although without exposing any private data.Once a shareholder
receives all commitments , he evaluates for every other shareholder (including offline shareholders), and sends the evaluation to shareholder .Once shareholder
receives the evaluation from another shareholder , he can verify the evaluation using and the original public coefficients .
- Once shareholder
receives all , a new share can then be computed.
- The shareholder can now compute new public coefficients
for the joint polynomial.
remains unchanged, because the secret itself remains unchanged.- If
, we can let where , because will be undefined.
Why can we compute the new joint public coefficients this way?
Recall we defined
We defined each coefficient
The public version of these coefficients
- Every shareholder
can overwrite their old share with their new share , and discard .
In doing this, we have swapped out our old degree
The new shares
Recovery
At recovery time, the shareholders now need a subset
Gotchas
The resharing procedure has its problems.
- Shares generated by resharing are not forwards or backwards compatible. After a resharing, shareholders in a group may become fragmented if some shareholders did not attend the resharing, or missed their asynchronous messages from the resharing.
- Implementations which allow asynchronous resharing need to plan for this contingency, giving shareholders a way to prove their old share is valid but needs to be updated. They should support a share issuance protocol so that shareholders can regroup by issuing valid updated shares for the fragmented shareholders who missed the memo.
- There is no way to verify a shareholder deleted their old shares after a resharing event. Selfish shareholders can freely cache old shares. If a threshold increase occurs, it is impossible to know for sure whether all shareholders updated their shares. If some subset of
shareholders maintain their old shares, the threshold has not really increased.- As a corollary, we can see that decreasing the threshold is easier than increasing it, as decreasing the threshold does not run into any incentive traps. It is natural for a selfish shareholder to prefer a share which carries more weight among the group.
Use Cases
Replacing shareholders
Perhaps a shareholder in the group is longer behaving. Perhaps they have stopped responding, and the whereabouts of their share is unknown. Perhaps the group no longer trusts this shareholder. The group can reshare the secret and exclude the misbehaving shareholder, perhaps reconfiguring the arrangement of the shares and sending some resharing evaluations to a replacement shareholder.
Revoking exposed shares
If one shareholder has accidentally exposed their share, resharing could be useful to revoke it by generating a new set of shares that are not backwards compatible with the exposed share.
Changing the threshold
As discussed, resharing is a relatively straightforward way to change the recovery threshold of a shared secret, and it is highly flexible. Unlike other methods, resharing allows choosing an arbitrary new threshold
Defending against mobile adversaries
Since shares are not backwards or forwards compatible through resharing events, we can view resharing as a sort of share-cycling procedure.
Hacking people is hard work. Consider an attacker who can steal some shares from one shareholder at a time, but must do so over a protracted duration, say weeks or months, breaking into each target one-by-one and stealing their share, until they have
If shareholders proactively reshare their secret with new polynomials once every day, or once a week, it dramatically reduces the window of opportunity for this attacker. The attacker must now break into at least
Reasoning
Consider the set of resharing polynomials
If each of the
However, this would be inefficient if shareholders had to store those
Instead, we want a simple share representable as
Conclusion
Having only recently discovered the wealth of mathematical literature on threshold secret sharing, I feel rather overwhelmed at the incredible scope of designs that clever people have concocted. Prior, having only known the basic Shamir Secret Sharing scheme, I had no idea it was possible to change shareholders, thresholds, or secrets so easily. Can’t wait to see what comes next.