Shamir secret sharing using GF^256.
This module is an Erlang NIF binding to the "sss" secret-sharing library written by Daan Sprenkels (https://github.com/dsprenkels/sss). The following is taken from the library's README:
sss is a library that exposes an API to split secret data buffers into a number of different shares. With the possession of some or all of these shares, the original secret can be restored. It is the schoolbook example of a cryptographic threshold scheme.
As often with crypto libraries, there is a lot of Shamir secret sharing code around that does not meet cryptographic standards (a.k.a. is insecure). Some details—like integrity checks and side-channel resistance—are often forgotten. But these slip-ups can often fully compromise the security of the scheme. With this in mind, I have made this library to:message() = iolist()
A secret message which can be split into shares. Messages must be of a
fixed length (which you can retrieve by calling
get_message_len/0
).
share() = binary()
A share of a secret message, used to recover it later.
combine_shares/1 | Combine a list of shares returned by create_shares/3 to
restore the original secret. |
create_shares/3 | Create N shares of a secret message. |
get_message_len/0 | Returns the required length of a message(). |
Combine a list of shares returned by create_shares/3
to
restore the original secret.
Create N
shares of a secret message.
K
or more shares will be able
to restore the secret.
get_message_len() -> integer()
Returns the required length of a message().
This is configurable, but only at compile-time by editing sss.h
.
create_shares/3
.
Generated by EDoc