Skip to content
ecdsa.com

Shamir secret sharing

Adi Shamir's 1979 scheme that splits a secret into n shares using a random polynomial so that any k of them reconstruct it and any k − 1 reveal nothing at all.
Also written asShamir's secret sharingSSSsecret splittingm-of-n

The secret is the constant term of a random polynomial of degree k − 1 over a finite field; each share is the polynomial evaluated at a distinct nonzero point, and Lagrange interpolation over any k shares recovers the constant. Implementations usually work byte by byte in GF(2⁸), so each share is as long as the secret plus an index. Security is information-theoretic: fewer than k shares give no information, regardless of computing power.

Plain Shamir has no integrity: a corrupted or malicious share silently reconstructs a wrong secret, so practical schemes add a checksum or digest of the secret, or use verifiable secret sharing (Feldman, Pedersen). It also requires a moment when the whole secret exists in one place, at splitting and at reconstruction; threshold signatures avoid that by never reconstructing the key.

Uses include HSM and CA key ceremonies (m-of-n operator cards), backups of root and recovery keys, SLIP-39 wallet backups and HashiCorp Vault's unseal keys. The Shamir secret sharing tool splits and combines secrets locally in the browser.

Standards and references

All terms