Definition
Threshold secret sharing is a method for splitting a secret into pieces, called shares, so that any of the shares together give back the secret, while any or fewer give no information about it: every possible secret stays exactly as likely as before. The number is the threshold, and such a method is called a threshold scheme. Adi Shamir published the standard construction in 1979. The secret is the constant term of a random polynomial, and each share is one point on that polynomial.
The idea
A company protects its software releases with one signing key. If one administrator holds the key, one theft or one lost laptop is a disaster. Giving full copies to five administrators makes theft five times more likely. Splitting the key into five pieces that are all needed makes the loss of any single piece fatal. The company wants a middle ground: any three of the five administrators can restore the key, and any two together learn nothing about it.
Shamir’s idea starts from school geometry: two points determine a straight line. Let the secret be the height at which a line crosses the vertical axis, its value at , and give each person one point of the line. Any two people can draw the line and read off the secret. One person alone holds a point through which a line passes for every possible crossing height. More generally, points determine a polynomial of degree , an expression with fixed numbers called coefficients.
The picture stops being accurate for ordinary numbers. On the real number line, a point can still make some secrets more plausible than others, and there is no way to pick a real number with every value equally likely. Shamir’s scheme therefore computes in a finite field §19.1.2, here a prime field: the whole numbers for a prime , with every sum and product replaced by its remainder after division by . In a prime field, every candidate secret matches exactly the same number of polynomials through the known points, so the points carry no information about the secret.
How it works
Choose a prime larger than every possible secret and larger than the number of shares . All arithmetic is modulo . Every nonzero number has a modular inverse , the number whose product with leaves remainder 1; dividing by means multiplying by . The dealer, the party that holds the secret at the start, shares it as follows.
Choose coefficients , each uniformly at random from all of , independently of and of each other, using a cryptographically secure pseudorandom number generator §5.27 (CSPRNG).
Form the polynomial , reduced modulo . Its value at is the secret.
Give participant the share . The positions are distinct, nonzero and public; usually for . Position 0 is never used, because is the secret.
Deliver each share over a channel that keeps it secret and reaches the right person, then erase and the coefficients.
To reconstruct, any participants give their shares to one combiner. The combiner uses Lagrange interpolation, the standard formula for the value at 0 of the only polynomial of degree at most that passes through given points: where the product runs over the other participants and each division uses a modular inverse.
Fewer than shares reveal nothing, and the reason is counting. Take shares and any candidate secret . The known points and the point are points with distinct positions, and exactly one polynomial of degree at most passes through them. So every candidate secret corresponds to exactly one choice of the coefficients, and the dealer picked each choice with the same probability . The shares held are therefore equally likely whatever the secret is, and observing them changes no probability. This argument uses no assumption about the attacker’s computing power, so the secrecy is called information-theoretic or perfect.
A 256-bit key needs a prime larger than . Many implementations instead share each byte of the key separately, in a finite field with 256 elements; such a field allows at most 255 shares, since position 0 is excluded.
Worked example
Take , threshold , shares and the secret . The dealer draws one random coefficient; suppose it is . Then .
, and : share .
, and : share .
, and : share .
Participants 1 and 3 reconstruct. The Lagrange weights are and . The inverse of 2 is 9, because . So , which reduces to . Next, is 15 modulo 17, and the inverse of 15 is 8, because . So . Then , and . The secret is recovered.
Participant 2 alone holds . For a candidate secret , the line through and needs , so . For : , which reduces to ; check: . For : , which reduces to , the dealer’s actual coefficient. For : , which is 16 modulo 17; check: . Each of the 17 candidate secrets matches exactly one coefficient, and each coefficient had probability . So the probability of seeing the share value 14 is under every candidate, and participant 2 learns nothing.
The candidate needs . A dealer who drew the coefficient only from 1 to 16, to keep the line from being flat, would make share rule out the secret 14. The coefficients must range over every value, zero included.
Stated precisely
Let be a prime and compute modulo . The dealer holds , draws independently and uniformly from , sets , and gives share as , with distinct and nonzero, which needs .
Correctness: for every set of share indexes, . Perfect secrecy: for every set of fewer than share indexes, the share values are uniformly distributed and independent of . Hence, for every secret and every observed values , .
The guarantee depends on five assumptions.
The coefficients are uniform over the whole field, independent of and of each other.
The positions are distinct and nonzero.
The attacker obtains fewer than shares in total, counting shares stolen at different times.
The dealer follows the procedure and erases and the coefficients.
Shares travel and rest where only their owners can read them.
Each share is a field element, as large as the secret. No perfectly secret threshold scheme can use shares smaller than the secret.
Limits and common mistakes
Secret sharing gives no integrity §1.9: nothing detects a wrong share. If share in the example is changed to , reconstruction from participants 1 and 3 gives , which reduces to : a wrong secret, with no error. Verifiable secret sharing (Feldman, 1987 [355]; Pedersen, 1991 [354]) lets each participant check its share against published commitments. A simpler defense stores a check value, such as a hash or a message authentication code §5.7 of the secret, and tests the reconstructed result.
Reconstruction puts the whole secret in one place, the combiner, and one compromise there at that moment exposes it. Threshold cryptography, for example threshold signatures, lets participants use a key without ever assembling it; secure multiparty computation §5.48 generalizes that idea.
The dealer sees the secret. Protocols for distributed key generation create a shared key that no single party ever holds.
Shares accumulate. An attacker who steals one share a year eventually holds . Proactive secret sharing periodically refreshes all shares, for example by adding a fresh random sharing of zero, so that shares from different periods do not combine.
Predictable coefficients destroy the secrecy, because the attacker can then solve for from a single share.
The threshold sets a trade-off. With every share is the secret itself; with the loss of one share loses the secret. Splitting a key into random pieces whose bitwise exclusive OR is the key is an -of- scheme.
Secret sharing is not access control §1.7. Whoever gathers shares has the secret; the rules on who may ask for shares, and when, lie outside the scheme.
Questions answered
Why do fewer than the threshold shares reveal no additional information under Shamir’s assumptions?
Fewer than shares reveal nothing because, for every possible secret, exactly the same number of polynomials pass through the shares held and give that secret, and the dealer chose each of those polynomials with the same probability. In Shamir’s scheme, the secret is the value at of a polynomial of degree whose other coefficients are chosen uniformly at random in a prime field, the numbers with arithmetic modulo a prime . Each share is one point . Take shares and any candidate secret: those points plus the point at 0 are points with distinct positions, and exactly one polynomial of degree at most passes through them. So each candidate corresponds to exactly one choice of coefficients, each with probability . The observed shares are equally likely under every candidate, and by the rule for updating probabilities after an observation (Bayes’ rule) the attacker’s probabilities for the secret stay exactly where they were. With fewer than shares the count is larger but still the same for every candidate.
Example: with and , the share fits each of the 17 possible secrets with exactly one slope. The argument needs these assumptions: arithmetic in a finite field; coefficients uniform over the whole field, zero included, and independent of the secret; distinct nonzero positions; an honest dealer who erases the secret; and fewer than shares in the attacker’s hands. Under them the secrecy holds against unlimited computing power.
Related entries: Entropy and min-entropy (§5.26), Secure multiparty computation (§5.48), Least privilege (§1.15). Further reading: [98, 354, 355].