@@ -28,46 +28,25 @@ use {
2828} ;
2929
3030#[ cfg( feature = "digest" ) ]
31- use {
32- elliptic_curve:: FieldBytesSize ,
33- signature:: {
34- PrehashSignature ,
35- digest:: { Digest , FixedOutput , FixedOutputReset , block_api:: BlockSizeUser } ,
36- } ,
37- } ;
31+ use signature:: digest:: { Digest , FixedOutput , FixedOutputReset , block_api:: BlockSizeUser } ;
3832
3933#[ cfg( feature = "rfc6979" ) ]
4034use elliptic_curve:: FieldBytesEncoding ;
4135
42- #[ cfg( any( feature = "arithmetic" , feature = "digest " ) ) ]
36+ #[ cfg( any( feature = "arithmetic" , feature = "rfc6979 " ) ) ]
4337use crate :: { Signature , elliptic_curve:: array:: ArraySize } ;
4438
4539/// Bind a preferred [`Digest`] algorithm to an elliptic curve type.
4640///
4741/// Generally there is a preferred variety of the SHA-2 family used with ECDSA
4842/// for a particular elliptic curve.
49- ///
50- /// This trait can be used to specify it, and with it receive a blanket impl of
51- /// [`PrehashSignature`], used by [`signature_derive`][1]) for the [`Signature`]
52- /// type for a particular elliptic curve.
53- ///
54- /// [1]: https://github.com/RustCrypto/traits/tree/master/signature/derive
5543#[ cfg( feature = "digest" ) ]
5644pub trait DigestAlgorithm : EcdsaCurve {
5745 /// Preferred digest to use when computing ECDSA signatures for this
5846 /// elliptic curve. This is typically a member of the SHA-2 family.
5947 type Digest : BlockSizeUser + Digest + FixedOutput + FixedOutputReset ;
6048}
6149
62- #[ cfg( feature = "digest" ) ]
63- impl < C > PrehashSignature for Signature < C >
64- where
65- C : DigestAlgorithm ,
66- <FieldBytesSize < C > as core:: ops:: Add >:: Output : ArraySize ,
67- {
68- type Digest = C :: Digest ;
69- }
70-
7150/// Partial implementation of the `bits2int` function as defined in
7251/// [RFC6979 § 2.3.2] as well as [SEC1] § 2.3.8.
7352///
0 commit comments