Trait ecdsa::hazmat::VerifyPrimitive
source · pub trait VerifyPrimitive<C>: AffineXCoordinate<C> + Copy + Sizedwhere
C: PrimeCurve + AffineArithmetic<AffinePoint = Self> + ProjectiveArithmetic,
Scalar<C>: Reduce<C::UInt>,
SignatureSize<C>: ArrayLength<u8>,{
// Provided methods
fn verify_prehashed(
&self,
z: FieldBytes<C>,
sig: &Signature<C>
) -> Result<()> { ... }
fn verify_digest<D>(&self, msg_digest: D, sig: &Signature<C>) -> Result<()>
where D: FixedOutput<OutputSize = FieldSize<C>> { ... }
}
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: FieldBytes<C>, sig: &Signature<C>) -> Result<()>
fn verify_prehashed(&self, z: FieldBytes<C>, sig: &Signature<C>) -> Result<()>
Verify the prehashed message against the provided 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
sourcefn verify_digest<D>(&self, msg_digest: D, sig: &Signature<C>) -> Result<()>where
D: FixedOutput<OutputSize = FieldSize<C>>,
fn verify_digest<D>(&self, msg_digest: D, sig: &Signature<C>) -> Result<()>where D: FixedOutput<OutputSize = FieldSize<C>>,
Verify message digest against the provided signature.