diff --git a/coins/ethereum/tests/contract.rs b/coins/ethereum/tests/contract.rs index 06b18d65..f4dbc8ef 100644 --- a/coins/ethereum/tests/contract.rs +++ b/coins/ethereum/tests/contract.rs @@ -12,7 +12,7 @@ use ethers::{ use frost::{ curve::Secp256k1, Participant, - algorithm::Schnorr as Algo, + algorithm::IetfSchnorr, tests::{key_gen, algorithm_machines, sign}, }; @@ -52,7 +52,7 @@ async fn test_ecrecover_hack() { let full_message = &[chain_id.to_be_byte_array().as_slice(), &hashed_message].concat(); - let algo = Algo::::new(); + let algo = IetfSchnorr::::ietf(); let sig = sign( &mut OsRng, algo.clone(), diff --git a/coins/ethereum/tests/crypto.rs b/coins/ethereum/tests/crypto.rs index 01413ece..cc8359ed 100644 --- a/coins/ethereum/tests/crypto.rs +++ b/coins/ethereum/tests/crypto.rs @@ -36,7 +36,7 @@ fn test_ecrecover() { #[test] fn test_signing() { use frost::{ - algorithm::Schnorr, + algorithm::IetfSchnorr, tests::{algorithm_machines, key_gen, sign}, }; use rand_core::OsRng; @@ -46,12 +46,12 @@ fn test_signing() { const MESSAGE: &[u8] = b"Hello, World!"; - let algo = Schnorr::::new(); + let algo = IetfSchnorr::::ietf(); let _sig = sign( &mut OsRng, algo, keys.clone(), - algorithm_machines(&mut OsRng, Schnorr::::new(), &keys), + algorithm_machines(&mut OsRng, IetfSchnorr::::ietf(), &keys), MESSAGE, ); } @@ -59,7 +59,7 @@ fn test_signing() { #[test] fn test_ecrecover_hack() { use frost::{ - algorithm::Schnorr, + algorithm::IetfSchnorr, tests::{algorithm_machines, key_gen, sign}, }; use rand_core::OsRng; @@ -76,7 +76,7 @@ fn test_ecrecover_hack() { let full_message = &[chain_id.to_be_byte_array().as_slice(), &hashed_message].concat(); - let algo = Schnorr::::new(); + let algo = IetfSchnorr::::ietf(); let sig = sign( &mut OsRng, algo.clone(), diff --git a/crypto/frost/Cargo.toml b/crypto/frost/Cargo.toml index 637c1498..1ce90194 100644 --- a/crypto/frost/Cargo.toml +++ b/crypto/frost/Cargo.toml @@ -39,6 +39,7 @@ dleq = { path = "../dleq", version = "0.2", features = ["serialize"] } dkg = { path = "../dkg", version = "0.2" } [dev-dependencies] +hex = "0.4" serde_json = "1" dkg = { path = "../dkg", version = "0.2", features = ["tests"] }