Skip to main content

shamir_reconstruct

Function shamir_reconstruct 

Source
pub fn shamir_reconstruct(xs: &[u64], ys: &[u64], k: usize) -> u64
Expand description

Reconstruct the secret from k shares (xs[i], ys[i]) by Lagrange interpolation at x = 0. Any k of the n shares recover the secret; fewer reveal nothing. Zero-heap.