Skip to content

Commit

Permalink
fix: hash message instead of vk bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
sebasti810 authored and distractedm1nd committed Oct 8, 2024
1 parent 1a37358 commit b895f4e
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ prism-errors = { path = "crates/errors" }
prism-main = { path = "crates/prism" }
prism-groth16 = { path = "crates/groth16" }
rocksdb = { version = "0.21.0", features = ["multi-threaded-cf"] }
lazy_static = "1.5.0"


[patch.crates-io]
Expand Down
1 change: 0 additions & 1 deletion crates/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ ed25519-dalek.workspace = true
secp256k1.workspace = true
base64.workspace = true
rand.workspace = true
lazy_static.workspace = true

[features]
default = []
Expand Down
2 changes: 1 addition & 1 deletion crates/common/src/operation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl VerifyingKey {
.map_err(|e| anyhow!(e))
}
VerifyingKey::Secp256k1(bytes) => {
let hashed_message = Digest::hash(bytes).to_bytes();
let hashed_message = Digest::hash(message).to_bytes();
let vk = Secp256k1VerifyingKey::from_slice(bytes.as_slice())?;
let message = Secp256k1Message::from_digest(hashed_message);
let signature = Secp256k1Signature::from_compact(signature)?;
Expand Down

0 comments on commit b895f4e

Please sign in to comment.