diff --git a/Cargo.toml b/Cargo.toml index ae2f05d7..6f30b095 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -157,6 +157,7 @@ k256 = { version = "0.13.3", features = [ "expose-field", "serde", "pem", + "schnorr", ] } ml-kem = { version = "0.3", features = ["hazmat"] } elliptic-curve = { version = "0.13.8", features = ["arithmetic"] } diff --git a/lee/state_machine/src/signature/mod.rs b/lee/state_machine/src/signature/mod.rs index a46b1ff5..ba049419 100644 --- a/lee/state_machine/src/signature/mod.rs +++ b/lee/state_machine/src/signature/mod.rs @@ -1,6 +1,7 @@ use std::str::FromStr; use borsh::{BorshDeserialize, BorshSerialize}; +use k256::ecdsa::signature::hazmat::PrehashVerifier as _; pub use private_key::PrivateKey; pub use public_key::PublicKey; use rand::{RngCore as _, rngs::OsRng}; @@ -72,7 +73,7 @@ impl Signature { return false; }; - pk.verify_raw(bytes, &sig).is_ok() + pk.verify_prehash(bytes, &sig).is_ok() } }