Skip to content

Commit

Permalink
modify test
Browse files Browse the repository at this point in the history
  • Loading branch information
kevaundray committed May 10, 2023
1 parent eed5e70 commit a693d74
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
hashed_message = [
message = [
0x49,
0x6e,
0x73,
Expand Down
5 changes: 3 additions & 2 deletions crates/nargo_cli/tests/test_data/ecdsa_secp256k1/src/main.nr
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit a693d74

Please sign in to comment.