Skip to content

Commit

Permalink
Frost reuse message in test and some docs grammar (#123)
Browse files Browse the repository at this point in the history
reuse message and some doc grammar
  • Loading branch information
nickfarrow committed Oct 6, 2022
1 parent 5826a09 commit f0cb2d0
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions schnorr_fun/src/frost.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
//! # )
//! # .unwrap();
//! // signing parties must use a common set of nonces when creating signature shares.
//! // nonces can be derived from a session id that use includes publicly known values.
//! // nonces can be derived from a session id which is created from publicly known values.
//! let verification_shares_bytes: Vec<_> = frost_key
//! .verification_shares()
//! .map(|share| share.to_bytes())
Expand Down Expand Up @@ -501,7 +501,7 @@ impl XOnlyFrostKey {
///
/// ## Return value
///
/// A point (normalised to have an even Y coordinate).
/// A point (normalized to have an even Y coordinate).
pub fn public_key(&self) -> Point<EvenY> {
self.public_key
}
Expand Down Expand Up @@ -1141,10 +1141,11 @@ mod test {
received_nonces.push((*i, nonce.public()));
}

let message = Message::plain("test", b"test");
let signing_session = frost.start_sign_session(
&frost_keys[signer_indexes[0]],
received_nonces.clone(),
Message::plain("test", b"test")
message
);

let mut signatures = vec![];
Expand All @@ -1153,7 +1154,7 @@ mod test {
let session = frost.start_sign_session(
&frost_keys[signer_index],
received_nonces.clone(),
Message::plain("test", b"test")
message
);
let sig = frost.sign(
&frost_keys[signer_index],
Expand All @@ -1176,7 +1177,7 @@ mod test {

assert!(frost.schnorr.verify(
&frost_keys[signer_indexes[0]].public_key(),
Message::<Public>::plain("test", b"test"),
message,
&combined_sig
));
}
Expand Down

0 comments on commit f0cb2d0

Please sign in to comment.