From 13a8359ad163ddc5b8b0d4f0f45c07d6556f7097 Mon Sep 17 00:00:00 2001 From: Nick Farrow Date: Sun, 24 Dec 2023 23:40:15 +1100 Subject: [PATCH] [frost] small accessibility fixups --- schnorr_fun/src/frost.rs | 5 +++++ schnorr_fun/src/share_backup.rs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/schnorr_fun/src/frost.rs b/schnorr_fun/src/frost.rs index 9ef02111..ce01b2f3 100644 --- a/schnorr_fun/src/frost.rs +++ b/schnorr_fun/src/frost.rs @@ -405,6 +405,11 @@ impl FrostKey { pub fn threshold(&self) -> usize { self.point_polynomial.len() } + + /// The public image of the key's polynomial on the elliptic curve. + pub fn point_polynomial(&self) -> Vec { + self.point_polynomial.clone() + } } impl FrostKey { diff --git a/schnorr_fun/src/share_backup.rs b/schnorr_fun/src/share_backup.rs index 3b9b05cc..390cc720 100644 --- a/schnorr_fun/src/share_backup.rs +++ b/schnorr_fun/src/share_backup.rs @@ -96,7 +96,7 @@ pub fn polynomial_identifier>( pub fn encode_backup>( polynomial: &Vec, secret_share: &Scalar, - share_index: &Scalar, + share_index: &Scalar, ) -> String { let threshold = polynomial.len(); let mut data = [u5::default(); 1 + 4 + 52 + 52];