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 ($k$), it will try to fit a polynomial in any case, thus providing an incorrect secret if there are fewer than $k$ shares provided or at least one of the $k$ provided shares is incorrect.