# Shamir Secret Sharing Toolkit

*just built an offline Shamir Secret Sharing (SSS) Seed Phrase encoding tool!!*

By [0xself](https://paragraph.com/@0xself) · 2026-04-10

shamirsecretsharing, sss, encode, encodingtool, seedphraseencoding, shamirsecretsharingtoolkit, shamirsecretsharingtool, decode, encoding, decoding, sssencoding, github, toolkid, encodingtoolkit, githubtoolkit, jsx

---

[

GitHub - balgar271/Shamir-Secret-Sharing-Seed-Phrase-Encoding-Tool
------------------------------------------------------------------

Contribute to balgar271/Shamir-Secret-Sharing-Seed-Phrase-Encoding-Tool development by creating an account on GitHub.

https://github.com

![GitHub - balgar271/Shamir-Secret-Sharing-Seed-Phrase-Encoding-Tool](https://storage.googleapis.com/papyrus_images/6355fd10c644505a52c8caf242421ee33cc4452ffb159503a6f4186ef0feccc7.png)

](https://github.com/balgar271/Shamir-Secret-Sharing-Seed-Phrase-Encoding-Tool)

**It consists of:**

  

1.  **A general-purpose encoding/decoding tool for any text secret:**
    

*   Split any text into n shares with a configurable threshold k
    
*   Combine k or more shares to reconstruct the original
    
*   Supports up to 255 shares (GF(256) field limit)
    
*   Hex-encoded shares with one-click copy
    
      
    

2.  **The SSS BIP-39 Seed Phrase Encoding Tool**
    

*   a purpose-built tool for protecting BIP-39 cryptocurrency wallet seed phrases.
    
*   BIP-39 validation: checks word count (12/15/18/21/24) and format
    
*   offline: live network status banner warns if you’re online
    
*   masked input: seed phrase hidden by default with show/hide toggle
    
*   a step-by-step flow: enter → configure → generate
    
*   Download shares: export all shares as a .txt file
    
*   Viewport toggle: switch between mobile and desktop layouts to preview responsiveness -> Uses crypto.getRandomValues() for cryptographically secure randomness
    

**How it works:**

Shamir’s Secret Sharing splits a secret into n pieces such that any k pieces can reconstruct it, but k − 1 or fewer reveal absolutely nothing about the original.

The scheme works by:

1.  Treating each byte of the secret as a constant term of a random polynomial of degree k − 1
    
2.  Evaluating that polynomial at n distinct points over the finite field GF(256)
    
3.  Each evaluation point becomes a share
    
4.  Reconstruction uses Lagrange interpolation at x = 0 to recover the constant term All arithmetic is performed in GF(2⁸) using the irreducible polynomial x⁸ + x⁴ + x³ + x + 1 (0x11b), which ensures every non-zero element has a multiplicative inverse.

---

*Originally published on [0xself](https://paragraph.com/@0xself/shamir-secret-sharing-toolkit)*
