Function crypto::shamir::reconstruct

source ·
pub fn reconstruct<S: AsRef<[u8]>>(shares: &[S]) -> Vec<u8>
Expand description

This function attempts to reconstruct a secret from some amount of shares. Given that this function doesn’t know the number of shares required (kk), it will try to fit a polynomial in any case, thus providing an incorrect secret if there are fewer than kk shares provided or at least one of the kk provided shares is incorrect.