Skip to main content

split_secret

Function split_secret 

Source
pub fn split_secret(secret: &Scalar, t: u32, n: u32) -> Vec<Share>
Expand description

Split a secret into n shares with threshold t. Any t of the n shares can reconstruct the secret.

Polynomial: f(x) = secret + a_1x + a_2x^2 + … + a_{t-1}*x^{t-1} Share i: (i, f(i)) for i in 1..=n