Expand description
Provides encryption of secret shares to specific recipients using crypto_box
Internally uses dark-crystal-secret-sharing-rust
,
which uses sharks
for Shamirs secret sharing and xsalsa20poly1305
for authenticated encryption.
This is part of a work-in-progress Rust implementation of the Dark Crystal Key Backup Protocol.
Structs
A set of encrypted shares, together with the public key used for encryption and the encrypted secret
Error type.
A crypto_box
public key.
A crypto_box
secret key.
Functions
Combine a set of shares and ciphertext produced by share_authenticated
Decrypt a given ciphertext using crypto_box
Encrypt a given message using crypto_box
Create a set of shares and encrypt them to a given set of public keys
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.