Skip to content

Commit

Permalink
ecdsa: add explicit Copy bounds on VerifyingKey
Browse files Browse the repository at this point in the history
Analogous change to RustCrypto/traits#667
  • Loading branch information
tarcieri committed Jun 9, 2021
1 parent 5715cfd commit 5cea59b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions ecdsa/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ categories = ["cryptography", "no-std"]
keywords = ["crypto", "ecc", "nist", "secp256k1", "signature"]

[dependencies]
elliptic-curve = { version = "0.10", default-features = false }
elliptic-curve = { version = "0.10.1", default-features = false }
hmac = { version = "0.11", optional = true, default-features = false }
signature = { version = ">= 1.3.0, < 1.4.0", default-features = false, features = ["rand-preview"] }

# optional dependencies
der = { version = "0.4", optional = true }

[dev-dependencies]
elliptic-curve = { version = "0.10", default-features = false, features = ["dev"] }
elliptic-curve = { version = "0.10.1", default-features = false, features = ["dev"] }
hex-literal = "0.3"
sha2 = { version = "0.9", default-features = false }

Expand Down
4 changes: 3 additions & 1 deletion ecdsa/src/verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use core::str::FromStr;
/// Requires an [`elliptic_curve::ProjectiveArithmetic`] impl on the curve, and a
/// [`VerifyPrimitive`] impl on its associated `AffinePoint` type.
#[cfg_attr(docsrs, doc(cfg(feature = "verify")))]
#[derive(Copy, Clone, Debug)]
#[derive(Clone, Debug)]
pub struct VerifyingKey<C>
where
C: Curve + ProjectiveArithmetic,
Expand Down Expand Up @@ -66,6 +66,8 @@ where
}
}

impl<C> Copy for VerifyingKey<C> where C: Curve + ProjectiveArithmetic {}

impl<C, D> DigestVerifier<D, Signature<C>> for VerifyingKey<C>
where
C: Curve + ProjectiveArithmetic,
Expand Down

0 comments on commit 5cea59b

Please sign in to comment.