diff --git a/Cargo.lock b/Cargo.lock index fa221c2c7d..692be0ce7f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2719,18 +2719,18 @@ dependencies = [ [[package]] name = "secp256k1" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f" +checksum = "2acea373acb8c21ecb5a23741452acd2593ed44ee3d343e72baaa143bc89d0d5" dependencies = [ "secp256k1-sys", ] [[package]] name = "secp256k1-sys" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a129b9e9efbfb223753b9163c4ab3b13cff7fd9c7f010fbac25ab4099fa07e" +checksum = "09e67c467c38fd24bd5499dc9a18183b31575c12ee549197e3e20d57aa4fe3b7" dependencies = [ "cc", ] diff --git a/crates/precompile/Cargo.toml b/crates/precompile/Cargo.toml index 6a54124529..9e7c114836 100644 --- a/crates/precompile/Cargo.toml +++ b/crates/precompile/Cargo.toml @@ -22,7 +22,7 @@ c-kzg = { version = "0.1.1", default-features = false, optional = true } # ecRecover precompile k256 = { version = "0.13", default-features = false, features = ["ecdsa"] } -secp256k1 = { version = "0.27.0", default-features = false, features = [ +secp256k1 = { version = "0.28.0", default-features = false, features = [ "alloc", "recovery", ], optional = true } diff --git a/crates/precompile/src/secp256k1.rs b/crates/precompile/src/secp256k1.rs index dc74737e11..33246faf2b 100644 --- a/crates/precompile/src/secp256k1.rs +++ b/crates/precompile/src/secp256k1.rs @@ -54,7 +54,7 @@ mod secp256k1 { RecoverableSignature::from_compact(&sig[0..64], RecoveryId::from_i32(sig[64] as i32)?)?; let secp = Secp256k1::new(); - let public = secp.recover_ecdsa(&Message::from_slice(&msg[..32])?, &sig)?; + let public = secp.recover_ecdsa(&Message::from_digest_slice(&msg[..32])?, &sig)?; let mut hash = keccak256(&public.serialize_uncompressed()[1..]).0; hash[..12].fill(0);