From 9e778fad9c334ff2fd5c34b1a348a3590518046d Mon Sep 17 00:00:00 2001 From: Marvin Jones Date: Mon, 15 Jun 2026 12:00:19 -0400 Subject: [PATCH] address issue 514 --- Cargo.toml | 1 + lee/state_machine/src/signature/mod.rs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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..2b6732c3 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; 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() } }