Function dark_crystal_key_backup_rust::share_authenticated
source · [−]pub fn share_authenticated(
secret: &[u8],
num_shares: u8,
threshold: u8
) -> Result<(Vec<Vec<u8, Global>, Global>, Vec<u8, Global>), ShareError>
Expand description
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.