reconstruct

Function reconstruct 

Source
pub fn reconstruct<C: Ciphersuite>(
    key_packages: &[KeyPackage<C>],
) -> Result<SigningKey<C>, Error<C>>
Expand description

Recompute the secret from at least min_signers secret shares (inside KeyPackages) using Lagrange interpolation.

This can be used if for some reason the original key must be restored; e.g. if threshold signing is not required anymore.

This is NOT required to sign with FROST; the point of FROST is being able to generate signatures only using the shares, without having to reconstruct the original key.

The caller is responsible for providing at least min_signers packages; if less than that is provided, a different key will be returned.