diff --git a/signature/CHANGELOG.md b/signature/CHANGELOG.md index 619aa4e92..4eeb0c2cf 100644 --- a/signature/CHANGELOG.md +++ b/signature/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `std` feature - replaced with `core::error::Error` - `derive` feature - `SignerMut` blanket implementation for `Signer` +- `PrehashSignature` trait [#1448]: https://github.com/RustCrypto/traits/pull/1448 [#1759]: https://github.com/RustCrypto/traits/pull/1759 diff --git a/signature/src/lib.rs b/signature/src/lib.rs index b8678e329..2baa59f1b 100644 --- a/signature/src/lib.rs +++ b/signature/src/lib.rs @@ -141,12 +141,9 @@ mod signer; mod verifier; #[cfg(feature = "digest")] -mod prehash_signature; +pub use digest; pub use crate::{encoding::*, error::*, keypair::*, signer::*, verifier::*}; -#[cfg(feature = "digest")] -pub use {crate::prehash_signature::*, digest}; - #[cfg(feature = "rand_core")] pub use rand_core; diff --git a/signature/src/prehash_signature.rs b/signature/src/prehash_signature.rs deleted file mode 100644 index 773dc6ff9..000000000 --- a/signature/src/prehash_signature.rs +++ /dev/null @@ -1,26 +0,0 @@ -//! `PrehashSignature` trait. - -/// For intra-doc link resolution. -#[allow(unused_imports)] -use crate::{ - signer::{DigestSigner, Signer}, - verifier::{DigestVerifier, Verifier}, -}; - -/// Marker trait for `Signature` types computable as `𝐒(𝐇(𝒎))` -/// i.e. ones which prehash a message to be signed as `𝐇(𝒎)` -/// -/// Where: -/// -/// - `𝐒`: signature algorithm -/// - `𝐇`: hash (a.k.a. digest) function -/// - `𝒎`: message -/// -/// This approach is relatively common in signature schemes based on the -/// [Fiat-Shamir heuristic]. -/// -/// [Fiat-Shamir heuristic]: https://en.wikipedia.org/wiki/Fiat%E2%80%93Shamir_heuristic -pub trait PrehashSignature { - /// Preferred `Digest` algorithm to use when computing this signature type. - type Digest: digest::Digest; -}