View Source ekeyx (ekeyx v1.0.0)
Shamir's Secret Sharing (SSS) algorithm
byte-compatible to Hashicorp Vault's implementation of Shamir's Secret Sharing (SSS) algorithm.
Summary
Functions
Generate secret shares using Shamir's Secret Sharing algorithm.
Generate secret shares using Shamir's Secret Sharing algorithm.
Recover secret from shares.
Recover secret from shares.
Functions
-spec recover_secret(Shares :: [binary(), ...]) -> Secret :: nonempty_binary().
Recover secret from shares.
Number of shares must be equal or greater than the K
parameter used to generate shares.
-spec recover_secret(Shares :: [binary(), ...], Base :: binary | base16 | base64) -> Secret :: nonempty_binary().
Recover secret from shares.
Equivalent to
recover_secret(Shares, binary)