Multisig and Shamir's Secret Sharing

in #bitcoin6 years ago

Shamir's Secret Sharing (sss) is the mathematical basis for bitcoins multisig addresses. Here I have provided my implementation of sss that works independent of bitcoin and can turn any ordinary 1xxx bitcoin address (or in fact any address of any coin) into a multisig address.

what-is-multisig-and-why-does-it-matter.png

Instead of verifying the multisig on the chain, the private key is separated into multiple pieces and then distributed. To claim the money, no redeem script is required, but all participants have to provide their piece to reconstruct the private key, at which point the money can be spent.

The sss implementation is a great way to securely store your keys, while for situations involving multiple non-trusted participants p2sh bitcoin addresses are better suited. My sss is especially useful for coins that do not (yet) support multisig, as all encryption is done based on only the private key. There are also no limits. You want a 51 out of 120 multisig but p2sh only supports max 15 out of 15? No problem.

There are lots of useful applications for multisig or sss:

  • Securely storing your keys: Make a 3 of 5, where you store some keys at home, some at work, ... This makes your bitcoin safe against hackers, burglars and even when you loose some keys, you can get your money back. Much better than having a piece of paper with the private keys somewhere. A fire, kids, thieves, ... ? No problem anymore
  • Save money for your child: 2 of 3. You get one share, your kid gets one (if old enough), and a trusted third party gets one. If you agree how to spend the money with your kid, fine. If you are dead, the trusted-third party can provide access to the money to the kid in case your key cannot be recovered anymore.
  • Make a deal with a trustless escrow: 2 of 3. Both parties get one share. If they agree the money can be spent. If there is a dispute the escrow can settle.

Please make sure your crypto is secured properly against the most common causes of loss. These are hackers (stroing your key centrally), and loss (not being able to recover your key), and rarely burglars finding keys accidentally. All of these problems are solved by distributed storage using secret sharing, either implemented as multisig, or direct sss.

Coin Marketplace

STEEM 0.35
TRX 0.12
JST 0.040
BTC 70601.11
ETH 3576.21
USDT 1.00
SBD 4.78