Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mithril-stm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mithril-stm"
version = "0.5.1"
version = "0.5.2"
edition = { workspace = true }
authors = { workspace = true }
homepage = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion mithril-stm/src/bls_multi_signature/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ mod tests {
let vk_infinity = BlsVerificationKey(p2_affine_to_vk(&p2));
let vkpop_infinity = BlsVerificationKeyProofOfPossession { vk: vk_infinity, pop };

let result = vkpop_infinity.verify_proof_of_possesion();
let result = vkpop_infinity.verify_proof_of_possession();
assert_eq!(result, Err(MultiSignatureError::VerificationKeyInfinity(Box::new(vkpop_infinity.vk))));
}

Expand Down
9 changes: 6 additions & 3 deletions mithril-stm/src/bls_multi_signature/verification_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ impl BlsVerificationKeyProofOfPossession {
/// manually.
// If we are really looking for performance improvements, we can combine the
// two final exponentiations (for verifying k1 and k2) into a single one.
pub(crate) fn verify_proof_of_possesion(&self) -> Result<(), MultiSignatureError> {
pub(crate) fn verify_proof_of_possession(&self) -> Result<(), MultiSignatureError> {
match self.vk.to_blst_verification_key().validate() {
Ok(_) => {
let result = verify_pairing(&self.vk, &self.pop);
Expand Down Expand Up @@ -164,9 +164,12 @@ impl BlsVerificationKeyProofOfPossession {
/// manually.
// If we are really looking for performance improvements, we can combine the
// two final exponentiations (for verifying k1 and k2) into a single one.
#[deprecated(since = "0.5.0", note = "Use `verify_proof_of_possesion` instead")]
#[deprecated(
since = "0.5.0",
note = "The verification of the proof of possession is not part of the public API any more"
)]
pub fn check(&self) -> Result<(), MultiSignatureError> {
Self::verify_proof_of_possesion(self)
Self::verify_proof_of_possession(self)
}

/// Convert to a 144 byte string.
Expand Down
4 changes: 2 additions & 2 deletions mithril-stm/src/key_registration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl KeyRegistration {
pk: BlsVerificationKeyProofOfPossession,
) -> Result<(), RegisterError> {
if let Entry::Vacant(e) = self.keys.entry(pk.vk) {
pk.verify_proof_of_possesion()?;
pk.verify_proof_of_possession()?;
e.insert(stake);
return Ok(());
}
Expand Down Expand Up @@ -136,7 +136,7 @@ mod tests {
}
Err(RegisterError::KeyInvalid(a)) => {
assert_eq!(fake_it, 0);
assert!(a.verify_proof_of_possesion().is_err());
assert!(a.verify_proof_of_possession().is_err());
}
Err(RegisterError::SerializationError) => unreachable!(),
_ => unreachable!(),
Expand Down
Loading