Shamir Secret Sharing Scheme
Split a secret into shares or combine shares to recover it
Split
Combine
Recovered secret
Shamir's Secret Sharing (SSS) is a cryptographic algorithm invented by Adi Shamir in 1979. It allows a secret to be divided into multiple parts so the original secret can be reconstructed only when a minimum number of shares are combined.
The Shamir scheme has an information-theoretic secrecy property when it is implemented correctly with unpredictable coefficients: fewer than the threshold of valid shares reveal no information about the secret. That mathematical property does not protect shares from poor storage, copied output, a compromised page, or an implementation defect.
- In the Split section, enter your secret, choose total and required shares, then click Generate shares.
- Copy the generated shares and distribute them to trusted parties.
- In the Combine section, paste enough shares to recover the secret.
- Reduce single points of failure for critical secrets.
- Require multiple parties to reconstruct sensitive data.
- Support threshold-based backups of encryption keys.
# macOS (Homebrew)
brew install ssss # Linux (Debian/Ubuntu)
sudo apt update && sudo apt install ssss # Windows (WSL Ubuntu)
wsl --install -d Ubuntu
sudo apt update && sudo apt install ssss # Split a secret into 5 shares with threshold 3
echo "my-secret" | ssss-split -t 3 -n 5 # Combine shares (paste 3 shares when prompted)
ssss-combine -t 3Prefer Node? There is no official npm CLI, but you can use a library like secrets.js-grempe.
npm i secrets.js-grempe const secrets = require('secrets.js-grempe');
const shares = secrets.share(secrets.str2hex('my-secret'), 5, 3);
const recovered = secrets.hex2str(secrets.combine(shares.slice(0, 3)));
Do I need all shares to recover the secret?
No. You only need the threshold number of shares defined in the split settings.
Are shares encrypted?
Shares are derived from the secret but should still be treated as sensitive data.
How should I handle the shares?
Store shares separately and treat each one as sensitive. Do not publish enough shares to meet the recovery threshold.