Skip to content
This repository has been archived by the owner on Feb 25, 2021. It is now read-only.

Commit

Permalink
ed25519: Use ed25519::Signature from upstream crate
Browse files Browse the repository at this point in the history
Sources the `ed25519::Signature` type from RustCrypto `ed25519` crate:

<https://docs.rs/ed25519/latest/ed25519/struct.Signature.html>
  • Loading branch information
tony-iqlusion committed Aug 10, 2019
1 parent fd5dcda commit 18037ae
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 104 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ autobenches = false
circle-ci = { repository = "tendermint/signatory", branch = "develop" }

[dependencies]
ed25519 = { version = "0.1", optional = true, default-features = false }
generic-array = { version = "0.12", optional = true, default-features = false }
getrandom = { version = "0.1", optional = true, default-features = false }
sha2 = { version = "0.8", optional = true, default-features = false }
signature = { version = "0.2", default-features = false }
zeroize = { version = "0.9", optional = true, default-features = false }
zeroize = { version = "0.9", default-features = false }

[dependencies.subtle-encoding]
version = "0.3.6"
Expand All @@ -32,9 +33,8 @@ features = ["base64", "hex"]
alloc = []
default = ["encoding", "getrandom", "std"]
digest = ["signature/digest"]
ecdsa = ["generic-array", "zeroize"]
ed25519 = ["zeroize"]
encoding = ["subtle-encoding", "zeroize"]
ecdsa = ["generic-array"]
encoding = ["subtle-encoding"]
pkcs8 = ["encoding"]
std = ["alloc", "signature/std", "subtle-encoding/std"]
test-vectors = []
Expand Down
2 changes: 1 addition & 1 deletion signatory-ring/src/ed25519.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ impl signatory::Verifier<Signature> for Verifier {
&ring::signature::ED25519,
untrusted::Input::from(self.0.as_bytes()),
untrusted::Input::from(msg),
untrusted::Input::from(signature.as_bytes()),
untrusted::Input::from(signature.as_ref()),
)
.map_err(|_| Error::new())
}
Expand Down
5 changes: 3 additions & 2 deletions src/ed25519.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
mod public_key;
mod seed;
mod signature;

#[cfg(feature = "test-vectors")]
#[macro_use]
Expand All @@ -45,5 +44,7 @@ pub use self::test_vectors::TEST_VECTORS;
pub use self::{
public_key::{PublicKey, PUBLIC_KEY_SIZE},
seed::{Seed, SEED_SIZE},
signature::{Signature, SIGNATURE_SIZE},
};

// Import `Signature` type from the `ed25519` crate
pub use ::ed25519::{Signature, SIGNATURE_LENGTH as SIGNATURE_SIZE};
97 changes: 0 additions & 97 deletions src/ed25519/signature.rs

This file was deleted.

0 comments on commit 18037ae

Please sign in to comment.