diff --git a/crates/nargo_cli/tests/test_data/ecdsa_secp256k1/src/main.nr b/crates/nargo_cli/tests/test_data/ecdsa_secp256k1/src/main.nr index 62bf738d385..700a7defa00 100644 --- a/crates/nargo_cli/tests/test_data/ecdsa_secp256k1/src/main.nr +++ b/crates/nargo_cli/tests/test_data/ecdsa_secp256k1/src/main.nr @@ -9,9 +9,10 @@ use dep::std; // - Noir should be agnostic to backends, so even though // the only backend implemented does not work properly for this, // we can still implement it on the frontend. -fn main(hashed_message : [u8;38], pub_key_x : [u8;32], pub_key_y : [u8;32], signature : [u8;64]) { +fn main(message : [u8;38], pub_key_x : [u8;32], pub_key_y : [u8;32], signature : [u8;64]) { // Is there ever a situation where someone would want // to ensure that a signature was invalid? - let x = std::ecdsa_secp256k1::verify_signature(pub_key_x, pub_key_y, signature, hashed_message,); + let hashed_message = std::hash::sha256(message); + let x = std::ecdsa_secp256k1::verify_signature(pub_key_x, pub_key_y, signature, hashed_message); assert(x == 1); } \ No newline at end of file