Skip to content

Commit

Permalink
Merge pull request #197 from LLFourn/add_share_image
Browse files Browse the repository at this point in the history
[❄] Add SharedKey::share_image
  • Loading branch information
LLFourn authored Dec 30, 2024
2 parents c22eea3 + 73c3088 commit 55edbf2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions schnorr_fun/src/frost/shared_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,18 @@ impl<T: PointType, Z: ZeroChoice> SharedKey<T, Z> {

Some(Self::from_inner(poly))
}

/// Gets an image at any index for the shared key. This can't be used for much other than
/// checking whether `Point` is the correct share image at a certain index. This can be useful
/// when you load in a share backup and want to check that it's correct.
///
/// To verify a signature share for certain share you should use [`verification_share`] (which
/// contains a share image).
///
/// [`verification_share`]: Self::verification_share
pub fn share_image(&self, index: PartyIndex) -> Point<NonNormal, Public, Zero> {
poly::point::eval(&self.point_polynomial, index)
}
}

impl SharedKey<Normal> {
Expand Down

0 comments on commit 55edbf2

Please sign in to comment.