Expand description

Create encrypted share payloads, which are encoded into links to the dark-crystal-web3 dapp. Recover a secret from a set of decrypted shares.

Modules

Encode secrets as various types

Structs

A set of encrypted shares, together with the public key used for encryption and the encrypted secret
Error type.
A plaintext share together with associated ciphertext
Error created when recovery fails
Error when creating shares

Constants

Functions

Combine a set of shares and ciphertext produced by share_authenticated
Give a recommended threshold value for a given number of shares
Attempt recovery for a set of shares, handling the case that shares from different share sets are mixed together, and also handling duplicate shares. This will only return the first secret found. If there is more than one complete set, multiple secrets will not be recovered
Create an encrypted share payload link
Create a set of shares and encrypt them to a given set of public keys but make the shares shorted by using the nonce from the ciphertext when encrypting the shares
Encrypt a secret and create shares of its key. This gives authentication so we know whether recovery was successful It also reduces duplication with long (> 32 bytes) secrets, and improves security when using non-uniformly random secrets such as passwords.