(k,n) threshold lockbox based on Shamir’s Secret Sharing
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:
Ad5xdKFfyHQAYJRInVPN5DbyK7mDkxYBgkNtzxNBe1k1/6rPc7F1XT5yMys=
AqLbxUZGWNN/V8HG6aV4kwyglD1W3LC6tuZKILMXbwP8Tyk4cx9AC81CxcA=
A329qhu6KEWhsfK8xffgvhplCkHuEtLTUYVXjtMlYzW71KOec45TOZxSl5k=
BFqSupV0ZYCBOWvHAVQPfXgE9yjhQuHR3rEE4+67R7dzMjLLc14qpzYiNAs=
BYX01ciIFRZf31i9LQaXUG7BaVRZjIO4OdIZTY6JS4E0qbhtc885lWcyZlI=
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.)
git submodule update --init
make
surf index.html
A demo lives at https://mrdomino.github.io/lockbox/.
app.js
and app.html
to be saner/better-tested.TypedArray
(for rhino and older browsers).