diff --git a/schnorr_fun/src/frost/chilldkg/encpedpop.rs b/schnorr_fun/src/frost/chilldkg/encpedpop.rs index 6740008f..3ed501c1 100644 --- a/schnorr_fun/src/frost/chilldkg/encpedpop.rs +++ b/schnorr_fun/src/frost/chilldkg/encpedpop.rs @@ -243,7 +243,7 @@ impl AggKeygenInput { let tweak_poly = shared_key.grind_fingerprint::(fingerprint); // replace our poly with the one that has the fingerprint self.inner.agg_poly = shared_key.point_polynomial()[1..].to_vec(); - debug_assert!(self.shared_key().check_fingerprint::(&fingerprint)); + debug_assert!(self.shared_key().check_fingerprint::(fingerprint)); for (share_index, (_encryption_key, encrypted_secret_share)) in &mut self.encrypted_shares { // 💡 The share encryption is homomorphic so we can apply the tweak @@ -566,7 +566,7 @@ mod test { assert_eq!(shared_key.pair_secret_share(*share.secret_share()), Some(share)); } - assert!(shared_key.check_fingerprint::(&fingerprint), "fingerprint was grinded correctly"); + assert!(shared_key.check_fingerprint::(fingerprint), "fingerprint was grinded correctly"); } } } diff --git a/schnorr_fun/src/frost/shared_key.rs b/schnorr_fun/src/frost/shared_key.rs index cfba141c..77347d13 100644 --- a/schnorr_fun/src/frost/shared_key.rs +++ b/schnorr_fun/src/frost/shared_key.rs @@ -195,10 +195,7 @@ impl SharedKey { /// /// Returns `true` if all coefficients match the fingerprint pattern, `false` /// if any coefficient fails to meet the difficulty requirement. - pub fn check_fingerprint( - &self, - fingerprint: &Fingerprint, - ) -> bool { + pub fn check_fingerprint(&self, fingerprint: Fingerprint) -> bool { use crate::fun::hash::HashAdd; // the fingerprint is only placed on the non-constant coefficients so it @@ -597,7 +594,7 @@ mod test { // Verify the fingerprint is valid assert!( - shared_key.check_fingerprint::(&fingerprint), + shared_key.check_fingerprint::(fingerprint), "Grinded fingerprint should be valid" ); }