keyx v0.4.0 KeyX
Documentation for KeyX.
Link to this section Summary
Functions
Generate secret shares using Shamir’s Secret Sharing alrgorithm
Same as generate_shares
but no extra error handlineg
Recover secrets from an appropriate number of shares. Must be equal or greater than the K
parameters
Same as recover_secret
but no extra error handlineg
Link to this section Functions
Link to this function
recover_secret(shares, base \\ :binary, base_opts \\ [case: :lower])
Recover secrets from an appropriate number of shares. Must be equal or greater than the K
parameters.
Parameters
- Shares: List of shares (Base64 encoding) containing information about the share, and if signed, the signature.
- base: Encoding for binary. Can be :raw, :base16, :base32, :base64. Default: :binary
- base_opts: Options to pass to Base.baseXX decoding functions.
Examples
iex> KeyX.recover_secret(["1-2-c3VwZXIgZHVwZXIgc2VjcmV0", "1-2-c3VwZXIgZHVwZXIgc2VjcmV0"])
{:ok, "super duper secret"}
Link to this function
recover_secret!(shares)
Same as recover_secret
but no extra error handlineg.
Parameters
- Shares: List of shares (Base64 encoding) containing information about the share, and if signed, the signature.