Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
Reuse existing method
Browse files Browse the repository at this point in the history
  • Loading branch information
Nashtare committed Oct 20, 2023
1 parent 9df0779 commit 8a509ac
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/dkg/secret_share.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,8 @@ impl<C: CipherSuite> SecretShare<C> {
) -> FrostResult<C, ()> {
let lhs = C::G::generator() * self.polynomial_evaluation;
let term: Scalar<C> = self.receiver_index.into();
let mut rhs: C::G = <C as CipherSuite>::G::zero();

for (index, com) in commitment.points.iter().rev().enumerate() {
rhs += com;

if index != (commitment.points.len() - 1) {
rhs *= term;
}
}
let rhs = commitment.evaluate_hiding(&term);

match lhs.into_affine() == rhs.into_affine() {
true => Ok(()),
Expand Down

0 comments on commit 8a509ac

Please sign in to comment.