Shamir's Secret Sharing
Polynomials Are the Right Tool
Why polynomials? Because a polynomial of degree is uniquely determined by its values at any distinct points and is completely unconstrained by its values at any points. This single algebraic fact delivers both correctness (any evaluations interpolate back to ) and perfect secrecy (any evaluations are statistically indistinguishable from random, for any fixed ). Shamir's 1979 insight was that this two-for-one gift is exactly what secret sharing needs.
The construction takes two lines to state and four to implement. The result is the canonical information-theoretic threshold cryptography.
Shamir Reconstruction via Lagrange Interpolation
Complexity: finite-field operations, or with FFTsThe Lagrange basis polynomials evaluated at give the interpolation coefficients. Every coalition of size uses its own 's to compute its own 's — the reconstruction formula works over all size- subsets.
Theorem: Shamir's -Threshold: Correctness and Perfect Secrecy
For every prime power and distinct nonzero , Shamir's scheme (Algorithms 3.1, 3.2) is a perfect -threshold secret-sharing scheme over :
- Correctness. For every secret and every with , Lagrange interpolation on recovers exactly.
- Perfect secrecy. For every forbidden coalition with and every secret value , is uniform over ; equivalently, .
A polynomial of degree has free parameters (the coefficients ). Specifying evaluations completely determines the polynomial; specifying fewer than leaves at least one free parameter, and the randomness of the 's ensures that free parameter is uniform. This is the information-theoretic heart of the scheme.
Correctness: $p$ has degree $\leq t-1$
A degree- polynomial is uniquely determined by its values at any distinct points. The Lagrange interpolation formula evaluated at gives exactly. Hence any authorized reconstructs correctly.
Perfect secrecy: set up
Fix a forbidden coalition with . We show that for any candidate secret value , the coalition's view is uniform over , hence independent of .
Perfect secrecy: uniform shares
The coalition's shares are . This is a linear transformation of the uniformly random vector plus the constant . The matrix of this transformation has rows ; since and the are distinct nonzero elements of , this is a Vandermonde-like matrix of full row rank .
Perfect secrecy: finish
A full-row-rank linear transformation of a uniform random vector is itself uniform over the image. Hence the coalition's view is uniform over , independent of the secret . This holds for every ; therefore .
Example: Shamir Over : -Threshold
Share secret among 3 parties (evaluation points ) with threshold over , using random coefficient . Verify that any two shares reconstruct the secret, and that one share reveals nothing.
Build the polynomial
over .
Compute shares
Reconstruct from shares 1 and 2
Lagrange basis at : . . ✓
Reconstruct from shares 2 and 3
Lagrange basis at : . . ✓ Same secret, confirming that the answer does not depend on which two shares we use.
One share reveals nothing
A single share — say — is consistent with every possible secret under a suitable random : for each there is a unique such that . Since was uniform, the seven candidate secrets are equally likely given . Perfect secrecy confirmed.
Shamir Polynomial Evaluation
Plot a degree- polynomial over the reals to visualize Shamir's scheme. The secret is ; the shares are . Move the slider to see how any of the points uniquely determine the curve, but fewer than points leave infinitely many candidate curves — each passing through the known points but hitting a different value at .
Parameters
Polynomial degree = $t - 1$
Number of parties
Polynomial value at $x = 0$
Shamir: From Shares to Polynomial to Secret
Shamir Threshold Explorer
Adjust (threshold) and (number of shares) and see the security / robustness trade-off. The plot shows: (top) share values as a function of the polynomial; (bottom) the number of "consistent secrets" given a forbidden coalition of size — which equals (the field size) because every secret is equally likely. Changing changes the polynomial's shape but not the information-theoretic security guarantee.
Parameters
Reconstruction Cost at Scale
Naive Lagrange interpolation runs in field operations. For on the order of a few thousand — the regime of ByzSecAgg in Chapter 11 — this becomes noticeable. The standard optimization is to compute the coefficients via FFT over the evaluation points, bringing the cost to . Practical implementations (PyTorch / C++ MPC libraries) achieve this with modest constant factors on modern hardware. For the purpose of this book, treat reconstruction as cheap relative to the per-round training compute.
Common Mistake: Evaluation Points Must Be Distinct and Nonzero
Mistake:
Assign party evaluation point (maybe "to save field elements").
Correction:
Party 's share would then equal the secret: . One share would suffice to reconstruct, ruining the threshold structure. Always use distinct nonzero evaluation points — typically for when .
Common Mistake: Field Size Must Exceed
Mistake:
Use (e.g., when ).
Correction:
There are only nonzero elements in , so at most distinct evaluation points. If then two parties must share the same , breaking the construction. Practical Shamir implementations use for large — e.g., in modern MPC wallets — giving ample room.
Shamir in MPC Wallet Systems
Production MPC (multi-party computation) wallet systems such as Fireblocks, ZenGo, and Unbound Tech all use Shamir's scheme as a building block. The typical deployment uses over , with shares stored in geographically distributed HSMs owned by independent trust zones. The pattern is: never store a private key as a single blob; reconstruct on demand from shares and discard. Modern threshold-signature protocols (GG18, CMP21) build on this foundation to sign ECDSA transactions without ever reconstructing the private key at all — a stronger guarantee that blends Shamir with coded computing (Chapter 5).
- •
Fireblocks MPC: , field , per-signature cost 50 ms
- •
Lightweight implementations use for IoT
- •
Practical values rarely exceed 10 due to latency budgets in consumer products
Why This Matters: The Same Polynomial Trick Appears Again in Chapter 5
Chapter 5 develops polynomial codes for distributed matrix multiplication. The construction is virtually identical to Shamir's: each worker is assigned an evaluation point, the master encodes data-dependent polynomials, and recovery from any responses uses the same Lagrange interpolation. The difference is that Shamir's polynomial has random coefficients (for privacy), while the polynomial-code polynomial has data-dependent coefficients (for correctness). Recognizing this structural kinship is the key to seeing why Chapter 5 calls coded computing "Shamir's polynomial plus linear structure".
Group Contributions Building on Shamir Secret Sharing
Several CommIT group results build directly on Shamir's secret- sharing primitive introduced in this section. The Wan–Tuninetti–Caire coded-shuffling framework (Chapter 7) uses a Shamir-style polynomial evaluation for the coded message construction. The Jahani-Nezhad / Maddah-Ali / Caire ByzSecAgg result (Chapter 11) relies on ramp secret sharing — the generalization introduced in Section 3.4. Both families of results illustrate that secret sharing is not a historical curiosity but an active tool in modern distributed-computing research.
Quick Check
In a Shamir -scheme, what is the degree of the underlying polynomial ?
The polynomial has degree — exactly enough so that evaluations determine it, but evaluations do not.