Shamir Secret Sharing¶
Overview¶
Shamir Secret Sharing (SSS) is a (t, n) threshold secret sharing scheme proposed by Adi Shamir in 1979. The scheme is based on Lagrange interpolation: a polynomial of degree t-1 is constructed with the secret as the constant term, and each share (sub-secret) is a coordinate point on the polynomial.
Threshold secret sharing is a cryptographic technique that divides a secret S into n shares distributed among n participants. The threshold value k (between 1 and n) ensures that any k-1 or fewer shares cannot compute any information about the secret S, while any k or more shares can reconstruct the secret S.
Technical Principles¶
Lagrange Interpolation Theorem: Any t shares can reconstruct the polynomial to recover the secret, while t-1 or fewer shares cannot reconstruct the polynomial and thus cannot obtain any information about the secret.
Mathematical Foundation: The core mathematical principle is the Lagrange interpolation algorithm. Using a function generated by a polynomial, the secret serves as the polynomial's constant term, and each share is the polynomial's value at a different point.
Applications in Blockchain¶
Decentralized Key Sharing Scheme: A key is divided into n shares; each secret part is encrypted and stored on the blockchain, solving key distribution and storage problems. When a key recovery requester needs to recover the key, they can broadcast a key recovery message to the network and pay tokens to key storage nodes.
Distributed Storage: Key fragments are distributed across different nodes in the blockchain network. More than the threshold number of key fragments must be obtained from the entire blockchain network to reconstruct the private key.
Use Cases¶
- Multi-Signature Wallets: Using threshold signatures to protect assets, requiring multi-party cooperation to access funds
- Key Backup: Storing private key shards in different locations to prevent single points of failure
- Secure Storage: Preventing any single party from having complete control over a key
- Access Control: Implementing flexible permission management mechanisms
Recommended Reading¶
Related Concepts¶
- Threshold Signatures
- Multi-Signature Wallets
- Secret Sharing
- Lagrange Interpolation
- Distributed Key Generation