pub fn reconstruct_secret_key<E: Curve>(
key_shares: &[impl AnyKeyShare<E>],
) -> Result<SecretScalar<E>, ReconstructError>Available on crate feature
spof only.Expand description
Reconstructs a secret key from set of at least min_signers key shares
Requires at least min_signers distinct key shares from the same generation
(key refresh produces key shares of the next generation). Accepts both KeyShare and IncompleteKeyShare.
Returns error if input is invalid.
Note that, normally, secret key is not supposed to be reconstructed, and key shares should never be at one place. This basically defeats purpose of MPC and creates single point of failure/trust.