Shamir's Secret Sharing
Split a secret into n shares so that any t of them recover it and fewer reveal nothing
Overview
Shamir's Secret Sharing divides a secret into shares using a random polynomial over a finite field, so that any threshold number of shares reconstructs the secret and any smaller set reveals no information. Its security is information-theoretic, not computational.
To share a secret s with threshold t, the dealer chooses a random polynomial of degree t - 1 whose constant term is s, and gives participant i the value of the polynomial at a distinct nonzero point x_i. Any t points determine the polynomial by Lagrange interpolation and therefore s. With fewer than t points, every possible secret is equally consistent with the shares, so the scheme is secure even against unbounded adversaries, including quantum ones.
Plain Shamir sharing assumes an honest dealer and honest shareholders. It offers no way to detect a corrupted share, and a malicious participant can supply a bad share during reconstruction to make others recover a wrong secret. Verifiable secret sharing (Feldman, Pedersen) and authenticated encodings address this. Byte-oriented implementations commonly work in GF(2^8), sharing each byte independently. Shares are the same size as the secret.
History
1979–1979Shamir's Secret Sharing published by Adi Shamir
How it works
- Choose random coefficients a1..a(t-1) and form f(x) = s + a1*x + ... + a(t-1)*x^(t-1).
- Give participant i the share (x_i, f(x_i)) for distinct nonzero x_i.
- To reconstruct, collect any t shares and interpolate f(0) with Lagrange coefficients.
- Discard the polynomial coefficients after dealing.
Security notes
Shares are not authenticated, so corrupted or malicious shares can silently produce a wrong secret; add integrity checks or use verifiable secret sharing. Coefficients must come from a cryptographically secure RNG, and implementations should avoid secret-dependent timing in field arithmetic.
Typical uses
Variants in NextSSL
1| Algorithm | Tier | Sizes (bytes) | Standards | API |
|---|---|---|---|---|
| Shamir shamir |
unverified | — | — | root |
Frequently asked questions
Which Shamir's Secret Sharing variants does NextSSL include?
NextSSL registers 1 Shamir's Secret Sharing variant: shamir.
Families with similar names
Related
NIST SP 800-90A deterministic random bit generator built on HMAC
HMACThe standard way to build a MAC from a cryptographic hash (RFC 2104, FIPS 198-1)
Operating system RNGThe kernel's cryptographically secure random number generator, the right default
Schnorr signatures (BIP 340)Bitcoin's x-only Schnorr signatures on secp256k1, introduced with Taproot