From b473bcb1541ce14a859c2e949bb734d23ef62f0f Mon Sep 17 00:00:00 2001 From: LLFourn Date: Sun, 22 Dec 2024 22:29:38 +1100 Subject: [PATCH] =?UTF-8?q?[=E2=9D=84]=20Add=20SharedKey::share=5Fimage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- schnorr_fun/src/frost/shared_key.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/schnorr_fun/src/frost/shared_key.rs b/schnorr_fun/src/frost/shared_key.rs index 7ebe9f80..c610f33e 100644 --- a/schnorr_fun/src/frost/shared_key.rs +++ b/schnorr_fun/src/frost/shared_key.rs @@ -174,6 +174,18 @@ impl SharedKey { 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 { + poly::point::eval(&self.point_polynomial, index) + } } impl SharedKey {