Shamir's Secret Sharing (SSS) is an efficient
secret sharing algorithm for distributing
private information
Privacy (, ) is the ability of an individual or group to seclude themselves or information about themselves, and thereby express themselves selectively.
The domain of privacy partially overlaps with security, which can include the concepts of a ...
(the "secret") in such a way that no individual holds intelligible information about the secret. To achieve this, the secret is converted into parts (the "shares") from which the secret can be reassembled when a sufficient number of shares are combined but not otherwise. SSS has the unusual property of
information theoretic security, meaning an adversary without enough shares cannot reconstruct the secret even with infinite time and computing capacity. A standard SSS specification for
cryptocurrency wallets has been widely implemented.
High-level explanation
SSS is used to secure a secret in a distributed way, most often to secure other
encryption keys. The secret is split into multiple shares, which individually do not give any information about the secret.
To unlock a secret secured by SSS a minimum number of shares are needed, called the ''threshold''. No additional information about the secret can be gained by examining any number of shares fewer than the threshold (a property called
perfect secrecy
A cryptosystem is considered to have information-theoretic security (also called unconditional security) if the system is secure against adversaries with unlimited computing resources and time. In contrast, a system which depends on the computatio ...
)''.'' In this sense, SSS is a generalisation of the
one-time pad
In cryptography, the one-time pad (OTP) is an encryption technique that cannot be cracked, but requires the use of a single-use pre-shared key that is not smaller than the message being sent. In this technique, a plaintext is paired with a r ...
(which can be viewed as SSS with a two-share threshold and two shares in total).
Application example
A company needs to secure their vault's code. A single person knowing the code could act dishonestly or be unavailable when the vaults needs to be opened.
SSS can be used in this situation to generate shares from the vault's code which are distributed to executives in the Company. The selected threshold and number of shares given to each executive can be selected such that the vault is accessible only by (groups of) authorized individuals. If less than the threshold of shares were compromised, these shares alone would not be enough to determine the code.
Properties and weaknesses
SSS has useful properties, but also weaknesses that mean there are some situations where it should not be used.
Useful properties include:
# Secure: The scheme has
Information theoretic security.
# Minimal: The size of each piece does not exceed the size of the original data.
# Extensible: For any given threshold, shares can be dynamically added or deleted without affecting existing shares
# 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 for the participants.
# Flexible: In organizations where hierarchy is important, each participant can be issued different numbers of shares according to their importance inside the organization. For instance, with a ''threshold'' of 3, the president could unlock the safe alone if given three shares, while three secretaries with one share each must combine their shares to unlock the safe.
Weaknesses include:
# No
verifiable secret sharing
In cryptography, a secret sharing scheme is verifiable if auxiliary information is included that allows players to verify their shares as consistent. More formally, verifiable secret sharing ensures that even if the dealer is malicious there is a ...
: During the share reassembly process, SSS does not have a way to verify the correctness of each share being used. Verifiable secret sharing aims to verify that shareholders are honest and not submitting fake shares.
# Single point of failure: The secret must exist in one single place when it is split into shares, and again in one place when it is reassembled. These are attack points, and other schemes including
multisignature eliminate at least one of these
single points of failure
A single point of failure (SPOF) is a part of a system that, if it fails, will stop the entire system from working. SPOFs are undesirable in any system with a goal of high availability or reliability, be it a business practice, software ap ...
.
History
Adi Shamir
Adi Shamir ( he, עדי שמיר; born July 6, 1952) is an Israeli cryptographer. He is a co-inventor of the Rivest–Shamir–Adleman (RSA) algorithm (along with Ron Rivest and Len Adleman), a co-inventor of the Feige–Fiat–Shamir identifica ...
first formulated the scheme in 1979.
Mathematical principle
The essential idea of the scheme is based on the
Lagrange interpolation theorem, specifically that
points is enough to uniquely determine a
polynomial
In mathematics, a polynomial is an expression consisting of indeterminates (also called variables) and coefficients, that involves only the operations of addition, subtraction, multiplication, and positive-integer powers of variables. An ex ...
of
degree
Degree may refer to:
As a unit of measurement
* Degree (angle), a unit of angle measurement
** Degree of geographical latitude
** Degree of geographical longitude
* Degree symbol (°), a notation used in science, engineering, and mathemati ...
less than or equal to
. For instance, 2
points are sufficient to define a
line
Line most often refers to:
* Line (geometry), object with zero thickness and curvature that stretches to infinity
* Telephone line, a single-user circuit on a telephone communication system
Line, lines, The Line, or LINE may also refer to:
Art ...
, 3 points are sufficient to define a
parabola
In mathematics, a parabola is a plane curve which is mirror-symmetrical and is approximately U-shaped. It fits several superficially different mathematical descriptions, which can all be proved to define exactly the same curves.
One descri ...
, 4 points to define a
cubic curve and so forth.
Mathematical formulation
Shamir's Secret Sharing is an ideal and perfect ''
-
threshold scheme
Secret sharing (also called secret splitting) refers to methods for distributing a secret among a group, in such a way that no individual holds any intelligible information about the secret, but when a sufficient number of individuals combine th ...
'' based on
polynomial interpolation
In numerical analysis, polynomial interpolation is the interpolation of a given data set by the polynomial of lowest possible degree that passes through the points of the dataset.
Given a set of data points (x_0,y_0), \ldots, (x_n,y_n), with n ...
over
finite fields
In mathematics, a finite field or Galois field (so-named in honor of Évariste Galois) is a field that contains a finite number of elements. As with any field, a finite field is a set on which the operations of multiplication, addition, subt ...
. In such a scheme, the aim is to divide a secret
(for example, the combination to a
safe
A safe (also called a strongbox or coffer) is a secure Lock (security device), lockable box used for securing valuable objects against theft or fire. A safe is usually a hollow cuboid or cylinder, with one face being removable or hinged to form ...
) into
pieces of data
(known as ''shares'') in such a way that:
# Knowledge of any
or more shares
makes
easily computable. That is, the complete secret
can be reconstructed from any combination of
shares of data.
# Knowledge of any
or fewer shares
leaves
completely undetermined, in the sense that the possible values for
seem as likely with knowledge of up to
shares as with knowledge of
shares. The secret
cannot be reconstructed with fewer than
shares.
If
, then every piece of the original secret
is required to reconstruct the secret.

Assume that the secret
can be represented as an element
of a
finite field
In mathematics, a finite field or Galois field (so-named in honor of Évariste Galois) is a field that contains a finite number of elements. As with any field, a finite field is a set on which the operations of multiplication, addition, subt ...
(where
is larger than the number of shares being generated). Randomly choose
elements,
, from
and construct the polynomial
. Compute any
points out on the curve, for instance set
to find points
. Every participant is given a point (a non-zero input to the polynomial, and the corresponding output). Given any subset of
of these pairs,
can be obtained using
interpolation
In the mathematical field of numerical analysis, interpolation is a type of estimation, a method of constructing (finding) new data points based on the range of a discrete set of known data points.
In engineering and science, one often has ...
, with one possible formula for doing so being
, where the list of points on the polynomial is given as k pairs of the form
. Note that
is equal to the first coefficient of polynomial
.
Example calculation
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 to make the idea easier to understand. Therefore the example below does not provide perfect secrecy and is not a proper example of Shamir's scheme. The next example will explain the problem.
Preparation
Suppose that the secret to be shared is 1234
.
In this example, the secret will be split into 6 shares
, where any subset of 3 shares
is sufficient to reconstruct the secret.
numbers are taken at random. Let them be 166 and 94.
: This yields coefficients
where
is the secret
The polynomial to produce secret shares (points) is therefore:
:
Six points
from the polynomial are constructed as:
:
Each participant in the scheme receives a different point (a pair of
and
). Because
is used instead of
the points start from
and not
. This is necessary because
is the secret.
Reconstruction
In order to reconstruct the secret, any 3 points are sufficient
Consider using the 3 points
.
Computing the
Lagrange basis polynomials:
:
:
:
Using the formula for polynomial interpolation,
is:
:
Recalling that the secret is the free coefficient, which means that
, and the secret has been recovered.
Computationally efficient approach
Using polynomial interpolation to find a coefficient in a source polynomial
using
Lagrange polynomials
In numerical analysis, the Lagrange interpolating polynomial is the unique polynomial of lowest degree that interpolates a given set of data.
Given a data set of coordinate pairs (x_j, y_j) with 0 \leq j \leq k, the x_j are called ''nodes'' an ...
is not
efficient, since unused constants are calculated.
Considering this, an optimized formula to use Lagrange polynomials to find
is defined as follows:
:
Problem of using integer arithmetic
Although the simplified version of the method demonstrated above, which uses integer arithmetic rather than finite field arithmetic, works, there is a security problem:
Eve gains information about
with every
that she finds.
Suppose that she finds the 2 points
and
. She still does not have
points, so in theory she should not have gained any more information about
. But she could combine the information from the 2 points with the public information:
. Doing so, Eve could perform the following algebra:
# Fill the formula for
with
and the value of
# Fill (1) with the values of
's
and
# Fill (1) with the values of
's
and
# Subtract (3)-(2):
and rewrite this as
. Eve knows that
so she starts replacing
in (4) with
0, 1, 2, 3, ... to find all possible values for
:
##
##
##
##
##
##
#After checking
, she stops because would get negative values for
with larger values of
(which is impossible because
). Eve can now conclude