![]() | ||
Shamir's Secret Sharing is an algorithm in cryptography created by Adi Shamir. It is a form of secret sharing, where a secret is divided into parts, giving each participant its own unique part, where some of the parts or all of them are needed in order to reconstruct the secret.
Contents
- Mathematical definition
- Shamirs secret sharing scheme
- Example
- Preparation
- Reconstruction
- Computationally Efficient Approach
- Problem
- Solution
- Properties
- References
Counting on all participants to combine the secret might be impractical, and therefore sometimes the threshold scheme is used where any
Mathematical definition
The goal is to divide secret
- Knowledge of any
k or moreS i S easily computable. - Knowledge of any
k − 1 or fewerS i S completely undetermined (in the sense that all its possible values are equally likely).
This scheme is called
Shamir's secret-sharing scheme
The essential idea of Adi Shamir's threshold scheme is that 2 points are sufficient to define a line, 3 points are sufficient to define a parabola, 4 points to define a cubic curve and so forth. That is, it takes
Suppose we want to use a
Choose at random
Example
The following example illustrates the basic idea. Note, however, that calculations in the example are done using integer arithmetic rather than using finite field arithmetic. Therefore the example below does not provide perfect secrecy and is not a true example of Shamir's scheme. So we'll explain this problem and show the right way to implement it (using finite field arithmetic).
Preparation
Suppose that our secret is 1234
We wish to divide the secret into 6 parts
Our polynomial to produce secret shares (points) is therefore:
We construct 6 points
We give each participant a different single point (both
Reconstruction
In order to reconstruct the secret any 3 points will be enough.
Let us consider
We will compute Lagrange basis polynomials:
Therefore
Recall that the secret is the free coefficient, which means that
Computationally Efficient Approach
Considering that the goal of using polynomial interpolation is to find a constant in a source polynomial
An optimized approach to use Lagrange polynomials to find
Problem
Although this method works fine, there is a security problem: Eve gains a lot of information about
Suppose that she finds the 2 points
Solution
This problem can be fixed by using finite field arithmetic in a field of size
This is in practice only a small change, it just means that we should choose a prime
Since everyone who receives a point also has to know the value of
Low values of
For this example we choose
This time Eve doesn't win any info when she finds a
Suppose again Eve again finds
This time she can't stop because
Properties
Some of the useful properties of Shamir's
- Secure: Information theoretic security.
- Minimal: The size of each piece does not exceed the size of the original data.
- Extensible: When
k is kept fixed, D i pieces can be dynamically added or deleted without affecting the other pieces. - Dynamic: Security can be easily enhanced without changing the secret, but by changing the polynomial occasionally (keeping the same free term) and constructing new shares to the participants.
- Flexible: In organizations where hierarchy is important, we can supply each participant different number of pieces according to their importance inside the organization. For instance, the president can unlock the safe alone, whereas 3 secretaries are required together to unlock it.