liminfo

Secret Sharing Tool

Free web tool: Secret Sharing Tool

About Secret Sharing Tool

The Secret Sharing Tool implements Shamir's Secret Sharing (SSS), a cryptographic algorithm that splits a secret into n shares such that any k of those shares are sufficient to reconstruct the original secret, while any combination of fewer than k shares reveals absolutely nothing about it. You enter a secret text string, set the total number of shares (n) and the threshold (k), and the tool generates n distinct share strings. You can then distribute these shares to different people or locations. The tool also has a Reconstruct mode where you paste any k or more share strings to recover the original secret.

This tool is useful for secure key management, distributed trust scenarios, backup of cryptographic secrets, and team-based authorization. Common use cases include splitting a master encryption key among several team members so no single person holds the full key, or splitting a cryptocurrency wallet seed phrase so that at least two of three trustees must collaborate to access the wallet. The threshold scheme ensures redundancy — losing up to n − k shares does not result in permanent loss of the secret.

Technically, the implementation uses a polynomial over GF(p) where p = 2,147,483,647 (the Mersenne prime 2^31 − 1). For each character of the secret, a degree-(k−1) polynomial with a random secret as the constant term is evaluated at x = 1 through n using modular exponentiation. Reconstruction uses Lagrange interpolation over the same finite field. All arithmetic uses BigInt for precision. The browser's Web Crypto API is not required because the algorithm is pure mathematics — no server calls are made at any point.

Key Features

  • Implements Shamir's Secret Sharing over GF(2^31−1) with full finite-field arithmetic
  • Configurable total shares (n) from 2 to 20 and threshold (k) from 2 to n
  • Reconstructs the secret from any k valid shares using Lagrange interpolation
  • Supports arbitrary text secrets — each character is processed as a separate polynomial evaluation
  • Split and Reconstruct modes in one interface — no separate tool needed
  • Share strings are human-readable comma-separated coordinate lists
  • 100% client-side computation using JavaScript BigInt — no server calls
  • No sign-up, no download, completely free with no usage limits

Frequently Asked Questions

What is Shamir's Secret Sharing?

Shamir's Secret Sharing (SSS) is a cryptographic algorithm created by Adi Shamir in 1979. It divides a secret into n shares using polynomial interpolation over a finite field. Any k or more shares can reconstruct the secret via Lagrange interpolation, but any combination of fewer than k shares gives zero information about the secret. It is an information-theoretically secure scheme.

What do n and k mean in this tool?

n is the total number of shares generated. k is the minimum number of shares required to reconstruct the secret (the threshold). For example, with n=5 and k=3, you get 5 shares and any 3 of them can reconstruct the secret. Losing 2 shares is tolerable — you still have 3 remaining. Losing 3 or more shares makes reconstruction impossible.

How do I reconstruct the secret?

Switch to the Reconstruct tab, paste your share strings one per line (each line is a share string from the Split output), and click Reconstruct Secret. You need at least k shares. The tool will perform Lagrange interpolation over the finite field and display the recovered secret.

What format are the share strings in?

Each share is a line of comma-separated x:y coordinate pairs, one pair per character of the secret. For example, a 5-character secret with n=3 produces 3 shares, each containing 5 x:y pairs. The x values are the share index (1 through n) and the y values are the polynomial evaluations modulo the prime.

Is this tool suitable for splitting cryptocurrency seed phrases?

Yes, this tool can split any text string including BIP-39 seed phrases. A common setup is n=3, k=2 (any 2 of 3 shares needed). However, for high-value assets, consider using a dedicated hardware implementation or well-audited library in production. This browser tool is excellent for learning and low-stakes use cases.

How secure is the implementation?

The implementation is information-theoretically secure: with fewer than k shares, an attacker cannot learn anything about the secret regardless of computational power. The finite field used is GF(2^31−1) with the Mersenne prime 2,147,483,647. The polynomial coefficients are generated using Math.random(), which is not cryptographically secure — for very high-security production use, a CSPRNG-based implementation is recommended.

Can I use this tool offline?

Yes. Since all processing is 100% client-side JavaScript, you can save the page and run it offline in a browser. No network connectivity is needed after the initial page load. This is useful for air-gapped key management scenarios.

What is the maximum secret length supported?

The tool processes each character independently, so there is no hard length limit imposed by the algorithm. In practice, very long secrets will generate correspondingly long share strings. For secrets longer than a few hundred characters, the share strings can become quite large but remain functionally correct.