From 4fb1d429eba15019cfefa75d589f2479c94fee71 Mon Sep 17 00:00:00 2001 From: Charles Edward Gagnon Date: Sun, 6 Jul 2025 16:27:11 -0400 Subject: [PATCH 1/3] remove: prehashSignature --- signature/src/lib.rs | 6 ------ signature/src/prehash_signature.rs | 26 -------------------------- 2 files changed, 32 deletions(-) delete mode 100644 signature/src/prehash_signature.rs diff --git a/signature/src/lib.rs b/signature/src/lib.rs index b8678e329..6f8d5bc3c 100644 --- a/signature/src/lib.rs +++ b/signature/src/lib.rs @@ -140,13 +140,7 @@ mod keypair; mod signer; mod verifier; -#[cfg(feature = "digest")] -mod prehash_signature; - 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; -} From fa736bb348cf0c2a8e2ba7d27df18402c32f9426 Mon Sep 17 00:00:00 2001 From: Charles Edward Gagnon Date: Sun, 6 Jul 2025 16:28:01 -0400 Subject: [PATCH 2/3] update: changelog --- signature/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) 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 From afd29adceb0e1df1c4442657667943f0e3bf0268 Mon Sep 17 00:00:00 2001 From: Charles Edward Gagnon Date: Sun, 6 Jul 2025 16:48:58 -0400 Subject: [PATCH 3/3] fix: accidently removed digest re-export --- signature/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/signature/src/lib.rs b/signature/src/lib.rs index 6f8d5bc3c..2baa59f1b 100644 --- a/signature/src/lib.rs +++ b/signature/src/lib.rs @@ -140,6 +140,9 @@ mod keypair; mod signer; mod verifier; +#[cfg(feature = "digest")] +pub use digest; + pub use crate::{encoding::*, error::*, keypair::*, signer::*, verifier::*}; #[cfg(feature = "rand_core")]