Trait k256::ecdsa::hazmat::VerifyPrimitive
source · pub trait VerifyPrimitive<C>: Sized + AffineCoordinates<FieldRepr = GenericArray<u8, <C as Curve>::FieldBytesSize>> + Copywhere
C: PrimeCurve + CurveArithmetic<AffinePoint = Self>,
<<C as Curve>::FieldBytesSize as Add>::Output: ArrayLength<u8>,{
// Provided methods
fn verify_prehashed(
&self,
z: &GenericArray<u8, <C as Curve>::FieldBytesSize>,
sig: &Signature<C>,
) -> Result<(), Error> { ... }
fn verify_digest<D>(
&self,
msg_digest: D,
sig: &Signature<C>,
) -> Result<(), Error>
where D: FixedOutput<OutputSize = <C as Curve>::FieldBytesSize> { ... }
}
Available on crate feature
ecdsa-core
and (crate features ecdsa
or sha256
) and crate feature arithmetic
only.Expand description
Verify the given prehashed message using ECDSA.
This trait is intended to be implemented on type which can access
the affine point represeting the public key via &self
, such as a
particular curve’s AffinePoint
type.
Provided Methods§
sourcefn verify_prehashed(
&self,
z: &GenericArray<u8, <C as Curve>::FieldBytesSize>,
sig: &Signature<C>,
) -> Result<(), Error>
fn verify_prehashed( &self, z: &GenericArray<u8, <C as Curve>::FieldBytesSize>, sig: &Signature<C>, ) -> Result<(), Error>
Verify the prehashed message against the provided ECDSA signature.
Accepts the following arguments:
z
: message digest to be verified. MUST BE OUTPUT OF A CRYPTOGRAPHICALLY SECURE DIGEST ALGORITHM!!!sig
: signature to be verified against the key and message
Object Safety§
This trait is not object safe.
Implementors§
impl VerifyPrimitive<Secp256k1> for AffinePoint
Available on crate feature
ecdsa
only.