From 54e9ec8c0d1c4c9aaa2761eaf6f7d05b4d998aef Mon Sep 17 00:00:00 2001 From: Tony Arcieri Date: Sat, 6 Oct 2018 11:31:02 -0700 Subject: [PATCH] Move 'curve' module (back) under 'ecdsa' `WeierstrassCurve` is specialized to ECDSA right now. It makes sense for it to be under ECDSA. --- src/{ => ecdsa}/curve/mod.rs | 0 src/{ => ecdsa}/curve/nistp256/mod.rs | 0 src/{ => ecdsa}/curve/nistp256/test_vectors.rs | 0 src/{ => ecdsa}/curve/nistp384/mod.rs | 0 src/{ => ecdsa}/curve/nistp384/test_vectors.rs | 0 src/{ => ecdsa}/curve/point.rs | 0 src/{ => ecdsa}/curve/secp256k1/mod.rs | 0 src/{ => ecdsa}/curve/secp256k1/test_vectors.rs | 0 src/ecdsa/mod.rs | 1 + src/lib.rs | 4 +--- 10 files changed, 2 insertions(+), 3 deletions(-) rename src/{ => ecdsa}/curve/mod.rs (100%) rename src/{ => ecdsa}/curve/nistp256/mod.rs (100%) rename src/{ => ecdsa}/curve/nistp256/test_vectors.rs (100%) rename src/{ => ecdsa}/curve/nistp384/mod.rs (100%) rename src/{ => ecdsa}/curve/nistp384/test_vectors.rs (100%) rename src/{ => ecdsa}/curve/point.rs (100%) rename src/{ => ecdsa}/curve/secp256k1/mod.rs (100%) rename src/{ => ecdsa}/curve/secp256k1/test_vectors.rs (100%) diff --git a/src/curve/mod.rs b/src/ecdsa/curve/mod.rs similarity index 100% rename from src/curve/mod.rs rename to src/ecdsa/curve/mod.rs diff --git a/src/curve/nistp256/mod.rs b/src/ecdsa/curve/nistp256/mod.rs similarity index 100% rename from src/curve/nistp256/mod.rs rename to src/ecdsa/curve/nistp256/mod.rs diff --git a/src/curve/nistp256/test_vectors.rs b/src/ecdsa/curve/nistp256/test_vectors.rs similarity index 100% rename from src/curve/nistp256/test_vectors.rs rename to src/ecdsa/curve/nistp256/test_vectors.rs diff --git a/src/curve/nistp384/mod.rs b/src/ecdsa/curve/nistp384/mod.rs similarity index 100% rename from src/curve/nistp384/mod.rs rename to src/ecdsa/curve/nistp384/mod.rs diff --git a/src/curve/nistp384/test_vectors.rs b/src/ecdsa/curve/nistp384/test_vectors.rs similarity index 100% rename from src/curve/nistp384/test_vectors.rs rename to src/ecdsa/curve/nistp384/test_vectors.rs diff --git a/src/curve/point.rs b/src/ecdsa/curve/point.rs similarity index 100% rename from src/curve/point.rs rename to src/ecdsa/curve/point.rs diff --git a/src/curve/secp256k1/mod.rs b/src/ecdsa/curve/secp256k1/mod.rs similarity index 100% rename from src/curve/secp256k1/mod.rs rename to src/ecdsa/curve/secp256k1/mod.rs diff --git a/src/curve/secp256k1/test_vectors.rs b/src/ecdsa/curve/secp256k1/test_vectors.rs similarity index 100% rename from src/curve/secp256k1/test_vectors.rs rename to src/ecdsa/curve/secp256k1/test_vectors.rs diff --git a/src/ecdsa/mod.rs b/src/ecdsa/mod.rs index 63ad4d9..ea367b1 100644 --- a/src/ecdsa/mod.rs +++ b/src/ecdsa/mod.rs @@ -1,6 +1,7 @@ //! The Elliptic Curve Digital Signature Algorithm (ECDSA) as specified in //! FIPS 186-4 (Digital Signature Standard) +pub mod curve; mod public_key; mod secret_key; mod signature; diff --git a/src/lib.rs b/src/lib.rs index f108029..b5a018b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -66,8 +66,6 @@ extern crate zeroize; #[macro_use] pub mod error; -#[cfg(feature = "ecdsa")] -pub mod curve; #[cfg(feature = "ecdsa")] pub mod ecdsa; #[cfg(feature = "ed25519")] @@ -87,7 +85,7 @@ mod verifier; #[cfg(feature = "digest")] pub use digest::Digest; #[cfg(feature = "ecdsa")] -pub use ecdsa::{EcdsaPublicKey, EcdsaSecretKey, EcdsaSignature}; +pub use ecdsa::{curve, EcdsaPublicKey, EcdsaSecretKey, EcdsaSignature}; #[cfg(feature = "ed25519")] pub use ed25519::{Ed25519PublicKey, Ed25519Signature, Seed as Ed25519Seed}; #[cfg(feature = "encoding")]