Skip to main content

recover_share_scalar

Function recover_share_scalar 

Source
pub fn recover_share_scalar(
    surviving_shares: &[Cmp20Share],
    lost_party_idx: u32,
) -> Result<Scalar, RecoverError>
Expand description

Recover a lost share’s scalar value from T surviving shares.

surviving_shares: at least T shares from the original keyset. lost_party_idx: the 1-based DKG roster index of the lost share.

Returns the recovered scalar. The caller wraps it into a new Cmp20Share via Cmp20Share::from_parts(recovered, pk, lost_idx).