Skip to content

Commit a566ba5

Browse files
committed
revert changes to rust threshold schnorr
1 parent 5860f80 commit a566ba5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

rust/threshold-schnorr/dfx.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
"wasm": "https://github.com/dfinity/chainkey-testing-canister/releases/download/v0.1.0/chainkey_testing_canister.wasm.gz"
1414
}
1515
}
16-
}
16+
}

rust/threshold-schnorr/src/schnorr_example_rust/src/wasm_only.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,17 +146,17 @@ async fn verify(
146146
algorithm: SchnorrAlgorithm,
147147
) -> Result<SignatureVerificationReply, String> {
148148
let sig_bytes = hex::decode(&signature_hex).expect("failed to hex-decode signature");
149-
let msg_bytes = hex::decode(&message).expect("failed to hex-decode message");
149+
let msg_bytes = message.as_bytes();
150150
let pk_bytes = hex::decode(&public_key_hex).expect("failed to hex-decode public key");
151151

152152
match algorithm {
153153
SchnorrAlgorithm::Bip340Secp256k1 => match opt_merkle_tree_root_hex {
154154
Some(merkle_tree_root_hex) => {
155155
let merkle_tree_root_bytes = hex::decode(&merkle_tree_root_hex)
156156
.expect("failed to hex-decode merkle tree root");
157-
verify_bip341_secp256k1(&sig_bytes, &msg_bytes, &pk_bytes, &merkle_tree_root_bytes)
157+
verify_bip341_secp256k1(&sig_bytes, msg_bytes, &pk_bytes, &merkle_tree_root_bytes)
158158
}
159-
None => verify_bip340_secp256k1(&sig_bytes, &msg_bytes, &pk_bytes),
159+
None => verify_bip340_secp256k1(&sig_bytes, msg_bytes, &pk_bytes),
160160
},
161161
SchnorrAlgorithm::Ed25519 => {
162162
if let Some(_) = opt_merkle_tree_root_hex {

0 commit comments

Comments
 (0)