Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

(k,n) threshold lockbox based on Shamir’s Secret Sharing

branch: master

SSSS Lockbox

This is a distributed lockbox based on Shamir’s Secret Sharing Scheme. It can be used to split a message like:

the password is foobar

into keys like:


any k (in this case, 2) of which can be recombined to produce the original message. You can use this to distribute a secret among trusted friends, relying on them to only combine keys if some prearranged condition is met (e.g. you lose your password and need it, or you die and want to give them access to your information.)

To try it out, first make sure that the following hold:

  • ../closure-library (relative to the checkout path) points to a checkout of Closure library.
  • ../closure-compiler/compiler.jar points to a copy of the Closure compiler jar.

Then, run make and open app.html in your browser. Try pasting any two of the keys above into the combine textarea (separated by newlines) and pressing “Combine”.

A precompiled version of app.html exists on this project’s github page.


  • Rewrite app.js and app.html to be saner/better-tested.
  • Expand functionality to encode longer-form messages with substitution.
  • Come up with a reasonable text representation for keys and implement formatting/parsing for it.
  • Verify that the message encoding scheme H(m) + m is secure against corruption and (reasonable) attack, or come up with a better one.
  • Provide an option for truly paranoid people to manually enter entropy.
  • Make the code work without TypedArray (for rhino and older browsers).
  • Use GF(2m) for larger m to allow more keys.
  • Automated testing.
  • Add nicer documentation.
  • Once it’s passed the “my mom can use it” bar, spread it around.


Something went wrong with that request. Please try again.