pub trait PrehashVerifier<S> {
// Required method
fn verify_prehash(&self, prehash: &[u8], signature: &S) -> Result<(), Error>;
}Expand description
Verify the provided message prehash using Self (e.g. a public key)
Required Methods§
Sourcefn verify_prehash(&self, prehash: &[u8], signature: &S) -> Result<(), Error>
fn verify_prehash(&self, prehash: &[u8], signature: &S) -> Result<(), Error>
Use Self to verify that the provided signature for a given message
prehash is authentic.
The prehash parameter should be the output of a secure cryptographic
hash function.
Returns Error if it is inauthentic or some other error occurred, or
otherwise returns Ok(()).
§⚠️ Security Warning
If prehash is something other than the output of a cryptographically
secure hash function, an attacker can potentially forge signatures by
solving a system of linear equations.
Implementations on Foreign Types§
Source§impl PrehashVerifier<Signature<NistP521>> for VerifyingKey
Available on crate feature ecdsa only.
impl PrehashVerifier<Signature<NistP521>> for VerifyingKey
Available on crate feature
ecdsa only.Source§impl<C> PrehashVerifier<Signature<C>> for VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic + DigestPrimitive,
<C as CurveArithmetic>::AffinePoint: VerifyPrimitive<C>,
<<C as Curve>::FieldBytesSize as Add>::Output: ArrayLength<u8> + Add<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B1>>,
<<<C as Curve>::FieldBytesSize as Add>::Output as Add<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B1>>>::Output: ArrayLength<u8>,
Available on crate feature der only.
impl<C> PrehashVerifier<Signature<C>> for VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic + DigestPrimitive,
<C as CurveArithmetic>::AffinePoint: VerifyPrimitive<C>,
<<C as Curve>::FieldBytesSize as Add>::Output: ArrayLength<u8> + Add<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B1>>,
<<<C as Curve>::FieldBytesSize as Add>::Output as Add<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B1>>>::Output: ArrayLength<u8>,
Available on crate feature
der only.