INNER CODE UNIT · Rust
num
ZcashFoundation/frost · frost-core/src/lib.rs:319
num = num * x_j.to_scalar();
den = den * (x_j.to_scalar() - x_i.to_scalar());
}
}
if !x_i_found {
return Err(Error::UnknownIdentifier);
}
Ok(
num * <<C::Group as Group>::Field>::invert(&den)
.map_err(|_| Error::DuplicatedIdentifier)?,
)
}
/// Generates the lagrange coefficient for the i'th participant (for `signer_id`).
///
/// Implements [`derive_interpolating_value()`] from the spec.
///