From af0acbf097ec18e0c33ff878917b00c93d81398d Mon Sep 17 00:00:00 2001 From: natalie Date: Thu, 14 Sep 2023 18:52:42 +0100 Subject: [PATCH] Remove secret function from SecretShare (#495) This is because we now can use the getter to get signing_share() without the need for an additional function --- frost-core/src/frost/keys.rs | 5 ----- frost-core/src/tests/repairable.rs | 2 +- frost-core/src/tests/vectors.rs | 4 ++-- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/frost-core/src/frost/keys.rs b/frost-core/src/frost/keys.rs index 02f42a17..68ec597d 100644 --- a/frost-core/src/frost/keys.rs +++ b/frost-core/src/frost/keys.rs @@ -390,11 +390,6 @@ where } } - /// Gets the inner [`SigningShare`] value. - pub fn secret(&self) -> &SigningShare { - &self.signing_share - } - /// Verifies that a secret share is consistent with a verifiable secret sharing commitment, /// and returns the derived group info for the participant (their public verification share, /// and the group public key) if successful. diff --git a/frost-core/src/tests/repairable.rs b/frost-core/src/tests/repairable.rs index 5b4f746d..1b3837ee 100644 --- a/frost-core/src/tests/repairable.rs +++ b/frost-core/src/tests/repairable.rs @@ -89,7 +89,7 @@ pub fn check_rts(mut rng: R) { ); // TODO: assert on commitment equality as well once updates have been made to VerifiableSecretSharingCommitment - assert!(participant.secret() == participant_recovered_share.secret()) + assert!(participant.signing_share() == participant_recovered_share.signing_share()) } fn generate_scalar_from_byte_string( diff --git a/frost-core/src/tests/vectors.rs b/frost-core/src/tests/vectors.rs index 310dc74b..4a4f5e2f 100644 --- a/frost-core/src/tests/vectors.rs +++ b/frost-core/src/tests/vectors.rs @@ -213,7 +213,7 @@ pub fn check_sign_with_test_vectors(json_vectors: &Value) { ); assert_eq!( key_package.signing_share(), - secret_shares[key_package.identifier()].secret() + secret_shares[key_package.identifier()].signing_share() ) } @@ -225,7 +225,7 @@ pub fn check_sign_with_test_vectors(json_vectors: &Value) { let nonces = signer_nonces.get(&i).unwrap(); // compute nonces from secret and randomness - let secret = secret_shares[&i].secret(); + let secret = secret_shares[&i].signing_share(); let hiding_nonce_randomness = &hiding_nonces_randomness[&i]; let hiding_nonce = Nonce::nonce_generate_from_random_bytes(