Secret sharing scheme that splits a secret into n shares where any k shares can reconstruct the original secret. Based on polynomial interpolation over finite fields. Provides perfect secrecy.
| Property | Value |
|---|---|
| Category | Special Algorithms |
| Sub-category | Secret Sharing |
| Security status | 🎓 Educational Only |
| Complexity | Intermediate |
| Inventor | Adi Shamir |
| Year | 1979 |
| Origin | 🇮🇱 Israel |
| Source | algorithms/special/shamir-secret-sharing.js |
Status: 🎓 Educational Only
No vulnerabilities are recorded for this implementation.
2 vectors ship with this algorithm and run in the test suite. Byte values are hexadecimal.
Vector 1 — Simple secret sharing: single byte value
| Field | Value |
|---|---|
threshold |
3 |
totalShares |
5 |
testReconstruction |
Yes |
input |
41 |
expected |
41 |
Vector 2 — Multi-byte secret sharing test
| Field | Value |
|---|---|
threshold |
2 |
totalShares |
3 |
testReconstruction |
Yes |
input |
54657374 |
expected |
54657374 |