Skip to content

Commit

Permalink
require correct ed25519 version to build
Browse files Browse the repository at this point in the history
Fixes #17

Signed-off-by: Scott Lamb <slamb@slamb.org>
  • Loading branch information
scottlamb authored and brooksmtownsend committed Jul 21, 2023
1 parent bf3a664 commit 84af670
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ required-features = ["cli"]

[dependencies]
signatory = "0.23"
ed25519 = { version = "1.3", default-features = false }
ed25519-dalek = { version = "1.0.1", default-features = false, features = ["u64_backend"] }
rand = "0.8"
byteorder = "1.3.4"
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,9 @@ impl KeyPair {

/// Attempts to verify that the given signature is valid for the given input
pub fn verify(&self, input: &[u8], sig: &[u8]) -> Result<()> {
let mut fixedsig = [0; ed25519_dalek::Signature::BYTE_SIZE];
let mut fixedsig = [0; ed25519::Signature::BYTE_SIZE];
fixedsig.copy_from_slice(sig);
let insig = ed25519_dalek::Signature::from_bytes(&fixedsig)?;
let insig = ed25519::Signature::from_bytes(&fixedsig)?;

match self.pk.verify(input, &insig) {
Ok(()) => Ok(()),
Expand Down

0 comments on commit 84af670

Please sign in to comment.