Shamir Secret Sharing (Split & Combine)
Splits a secret into shares with Shamir's scheme and rebuilds the original from the minimum number of shares. Runs in your browser.
Everything runs inside this page. The secret and the shares never leave your browser: no upload, no request, no logging.
0 bytes
Paste at least the minimum number of shares chosen when splitting. Order does not matter.
How the split works
Adi Shamir published the scheme in 1979. Each byte of the secret becomes the constant term of a random polynomial of degree minimum minus one, evaluated over GF(256), the same 256-element field AES uses. Each share is one point of that curve, written as a two-digit index plus the payload in hex.
With fewer shares than the threshold you get no partial information at all: every possible secret of that length stays equally likely. With the threshold reached, Lagrange interpolation at x = 0 returns the original bytes exactly. Note that the length of the secret is visible in the share size, so pad short secrets if that matters.
Split a secret into recoverable shares
Writing a wallet seed on a single sheet of paper creates one point of failure: lose the paper and the money is gone, and whoever finds it takes everything. Shamir's scheme fixes both sides at once. Pick five shares with a threshold of three, store each one somewhere different, and any three of them rebuild the original secret. Two shares on their own are worth nothing at all.
The method dates from 1979 and the maths fits in a paragraph. Every byte of the secret becomes the constant term of a polynomial whose degree is the threshold minus one, with the remaining coefficients drawn at random. Shares are points on that curve computed over GF(256), the 256 element finite field that AES also uses. Rebuilding means running Lagrange interpolation at zero and reading back the hidden term.
Here is the part rarely mentioned: the size of a share gives away the size of the secret. A share carrying 44 hex digits announces 21 bytes of content, which already narrows the search space for anyone who finds one. Pad the text to a fixed length first when that matters. Test a rebuild before you distribute anything, because a share copied down wrong only shows up on the day you need it.
Frequently asked questions
Do two shares of a 5 of 3 scheme leak half the secret?
Can I keep one share on my phone and another in the cloud?
Will these shares work in another Shamir implementation?
Related Tools
Source Code Secret Scanner
Finds API keys, tokens, passwords and private keys pasted from code or .env files, by known pattern and by high entropy.
JWT Secret Strength
Measures the strength of an HMAC JWT secret: byte length, approximate entropy and rating.
Vigenère Cipher
Encrypt and decrypt text with the polyalphabetic Vigenère cipher using a keyword. More robust than Caesar by using multiple shifts. Everything in your browser.