Skip to content

Commit

Permalink
Remove secret function from SecretShare (#495)
Browse files Browse the repository at this point in the history
This is because we now can use the getter to get signing_share() without the need for an additional function
  • Loading branch information
natalieesk committed Sep 14, 2023
1 parent b72646c commit af0acbf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
5 changes: 0 additions & 5 deletions frost-core/src/frost/keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,11 +390,6 @@ where
}
}

/// Gets the inner [`SigningShare`] value.
pub fn secret(&self) -> &SigningShare<C> {
&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.
Expand Down
2 changes: 1 addition & 1 deletion frost-core/src/tests/repairable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ pub fn check_rts<C: Ciphersuite, R: RngCore + CryptoRng>(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<C: Ciphersuite>(
Expand Down
4 changes: 2 additions & 2 deletions frost-core/src/tests/vectors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ pub fn check_sign_with_test_vectors<C: Ciphersuite>(json_vectors: &Value) {
);
assert_eq!(
key_package.signing_share(),
secret_shares[key_package.identifier()].secret()
secret_shares[key_package.identifier()].signing_share()
)
}

Expand All @@ -225,7 +225,7 @@ pub fn check_sign_with_test_vectors<C: Ciphersuite>(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(
Expand Down

0 comments on commit af0acbf

Please sign in to comment.