All Posts
Technology

Shamir's Secret Sharing: The Math Behind seQRets

March 10, 20267 min read

In 1979, Adi Shamir — the 'S' in RSA — published a beautifully simple paper that solved a problem cryptographers had been wrestling with: how do you share a secret among a group so that only a sufficient subset can reconstruct it?

The answer is polynomial interpolation. Here's the intuition: a straight line (degree 1 polynomial) is defined by any 2 points. A parabola (degree 2) needs 3 points. A degree-k polynomial needs k+1 points. If you know fewer points than required, you have infinitely many polynomials that fit — meaning you know nothing about the secret.

To create a 3-of-5 sharing scheme, seQRets generates a random degree-2 polynomial where the constant term is your secret. It then evaluates this polynomial at 5 different points — these are your shares. Any 3 shares give you 3 points, which uniquely determine the degree-2 polynomial, letting you recover the constant term (your secret). But 2 shares? They're consistent with every possible secret. That's information-theoretic security — not just computationally hard to break, but mathematically impossible.

What makes this particularly elegant for seed phrase security is that each share is the same size as the original secret. There's no bloat, no overhead. A share encoded as a QR code is compact enough to print on a business card.

seQRets implements this over GF(256) — a finite field that maps perfectly to byte-level operations. Every byte of your encrypted seed phrase is split independently, which means the scheme is both efficient and easy to verify. The source code is open for anyone to audit.

The beauty of Shamir's scheme is that it gives you configurable trust. You decide the threshold. 2-of-3 for personal use. 3-of-5 for family distribution. 4-of-7 for corporate treasury. The math doesn't care — it just works.