From 3a603d51a3e9c4c0af1e74a4bbf6f3415ed31c82 Mon Sep 17 00:00:00 2001 From: Kevaundray Wedderburn Date: Wed, 10 May 2023 19:41:26 +0100 Subject: [PATCH] modify test --- crates/nargo_cli/tests/test_data/ecdsa_secp256k1/src/main.nr | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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