← All tools

Shamir's Secret Sharing

Split a secret into n shares so that any k of them reconstruct it, but fewer reveal nothing — the threshold scheme from Adi Shamir (1979). A random polynomial of degree k−1 is built over the prime field GF(257), with the secret as the constant term; each share is a point on the curve. Reconstruction uses Lagrange interpolation at x = 0. The secret is UTF-8 encoded byte-by-byte. Everything runs locally in your browser — your secret and shares never leave the page.

Each share is x:hex; the x is the point's index and the hex is the per-byte y-values (each 0–256, encoded as two hex digits). Distribute one share to each holder; any k of them can reconstruct, fewer cannot.