Lably
Skip to content

Shamir's secret sharing

Cryptographic algorithm created by Adi Shamir

  • 16 min read
  • 7 chapters

Related on Lably

Through Algorithm, Safe and Polynomial

Shamir's secret sharing is used in some applications to share the access keys to a master secret.

High-level explanation

SSS is used to secure a secret in a distributed form, most often to secure encryption keys. The secret is split into multiple shares, which individually do not give any information about the secret.

To reconstruct a secret secured by SSS, a number of shares is needed, called the threshold. No information about the secret can be gained from any number of shares below the threshold (a property called perfect secrecy). In this sense, SSS is a generalisation of the one-time pad (which can be viewed as SSS with a two-share threshold and two shares in total).

Application example

A company needs to secure their vault. If a single person knows the code to the vault, the code might be lost or unavailable when the vault needs to be opened. If there are several people who know the code, they may not trust each other to always act honestly.

SSS can be used in this situation to generate shares of the vault's code which are distributed to authorized individuals in the company. The minimum threshold and number of shares given to each individual can be selected such that the vault is accessible only by (groups of) authorized individuals. If fewer shares than the threshold are presented, the vault cannot be opened.

By accident, coercion or as an act of opposition, some individuals might present incorrect information for their shares. If the total of correct shares fails to meet the minimum threshold, the vault remains locked.

Use cases

Shamir's secret sharing can be used to

  • share a key for decrypting the root key of a password manager,
  • recover a user key for encrypted email access,
  • share the passphrase used to recreate a master secret, which is in turn used to access a cryptocurrency wallet and
  • recover the combination to a physical safe.

Sign in to keep reading

6 more chapters are free with a Lably account.

More in Computing and communication