Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frost reuse message in test and some docs grammar #123

Merged
merged 2 commits into from
Oct 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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