diff --git a/Cargo.toml b/Cargo.toml index f3c04f0..27bbe7b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "salty" -version = "0.2.0-alpha.0" +version = "0.1.0-alpha.2" authors = ["Nicolas Stalder "] edition = "2018" description = "Small, sweet, swift Ed25519 signatures for microcontrollers" @@ -18,8 +18,6 @@ zeroize = { version = "1.2.0", default-features = false } [dev-dependencies] hex = { version = "0.4.2", default-features = false } hex-literal = "0.2.1" -wycheproof = { version = "0.1", path = "wycheproof" } -wycheproof-gen = { version = "0.1", path = "wycheproof/wycheproof-gen" } [features] slow-motion = [] diff --git a/tests/wycheproof_eddsa.rs b/tests/wycheproof_eddsa.rs deleted file mode 100644 index 2b3cad8..0000000 --- a/tests/wycheproof_eddsa.rs +++ /dev/null @@ -1,45 +0,0 @@ -#[cfg(test)] -mod wycheproof_tests { - - use wycheproof_gen::test_eddsa; - - use wycheproof::eddsa::*; - - use core::convert::TryFrom; - use salty::{PublicKey, Signature}; - use salty::constants::{PUBLICKEY_SERIALIZED_LENGTH, SIGNATURE_SERIALIZED_LENGTH}; - - #[test_eddsa("tests/eddsa_test.json", "eddsa_verify_schema.json")] - fn eddsa_testcase (tg: &EddsaTestGroup, tc: &SignatureTestVector) { - - let pk = <[u8; PUBLICKEY_SERIALIZED_LENGTH]>::try_from(tg.key.pk); - let sig = <[u8; SIGNATURE_SERIALIZED_LENGTH]>::try_from(tc.sig); - let valid: bool; - - if pk.is_err() || sig.is_err() { - valid = false; - } else { - let pk = PublicKey::try_from(&pk.unwrap()); - if pk.is_err() { - valid = false; - } else { - let sig = Signature::from(&sig.unwrap()); - let result = pk.unwrap().verify(&tc.msg, &sig); - valid = result.is_ok(); - } - } - - match tc.result { - ExpectedResult::Valid => assert!(valid), - ExpectedResult::Invalid => { - if tc.flags.contains(&"SignatureMalleability") { - // accept failing SignatureMalleability tests - assert!(true) - } else { - assert!(!valid) - } - }, - ExpectedResult::Acceptable => assert!(true), - } - } -}