Threshold and secret sharing

Shamir

Split a secret into n shares so that any t of them recover it and fewer reveal nothing

unverified Root API only
Unverified tier.

Source found and wired, correctness not fully proven. Root API only. Reach it with NextSSL(root=True) in Python or the nextssl_root_* functions in C.

About Shamir

Shamir is a threshold / secret-sharing scheme from the Shamir's Secret Sharing family. NextSSL lists it in the unverified tier and exposes it through the root API only (NextSSL(root=True) in Python, nextssl_root_* in C).

Overview

Shamir's Secret Sharing divides a secret into shares using a random polynomial over a finite field, so that any threshold number of shares reconstructs the secret and any smaller set reveals no information. Its security is information-theoretic, not computational.

To share a secret s with threshold t, the dealer chooses a random polynomial of degree t - 1 whose constant term is s, and gives participant i the value of the polynomial at a distinct nonzero point x_i. Any t points determine the polynomial by Lagrange interpolation and therefore s. With fewer than t points, every possible secret is equally consistent with the shares, so the scheme is secure even against unbounded adversaries, including quantum ones.

Plain Shamir sharing assumes an honest dealer and honest shareholders. It offers no way to detect a corrupted share, and a malicious participant can supply a bad share during reconstruction to make others recover a wrong secret. Verifiable secret sharing (Feldman, Pedersen) and authenticated encodings address this. Byte-oriented implementations commonly work in GF(2^8), sharing each byte independently. Shares are the same size as the secret.

History

1979–1979
  1. Shamir's Secret Sharing published by Adi Shamir

How it works

  1. Choose random coefficients a1..a(t-1) and form f(x) = s + a1*x + ... + a(t-1)*x^(t-1).
  2. Give participant i the share (x_i, f(x_i)) for distinct nonzero x_i.
  3. To reconstruct, collect any t shares and interpolate f(0) with Lagrange coefficients.
  4. Discard the polynomial coefficients after dealing.

Security notes

Shares are not authenticated, so corrupted or malicious shares can silently produce a wrong secret; add integrity checks or use verifiable secret sharing. Coefficients must come from a cryptographically secure RNG, and implementations should avoid secret-dependent timing in field arithmetic.

Typical uses

Splitting master keys or recovery seeds among custodiansBacking up HSM or root CA keys with quorum recoveryBuilding block for threshold signatures and MPC

Sizes

The registry declares no fixed sizes for this algorithm.

Use it

from nextssl_demo import NextSSL

root = NextSSL(root=True)   # tier 'unverified' is reachable from the root API only
shares = root.call("threshold_split", "shamir", None, secret, 3, 5)[0]   # 3-of-5

Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.

Similar names

Looking for something else?

Frequently asked questions

What is Shamir?

Shamir is a threshold in the Shamir's Secret Sharing family. Shamir's Secret Sharing divides a secret into shares using a random polynomial over a finite field, so that any threshold number of shares reconstructs the secret and any smaller set reveals no information.

Who designed Shamir and when?

Shamir belongs to the Shamir's Secret Sharing family, first published in 1979 by Adi Shamir. Its origin: Shamir, How to Share a Secret (Communications of the ACM, 1979).

Is Shamir safe to use?

Shamir is in the unverified tier. Source found and wired, correctness not fully proven. Root API only. It is only reachable through the root API (NextSSL(root=True) in Python, nextssl_root_* in C).