Trait ecdsa::CheckSignatureBytes
source ·
[−]pub trait CheckSignatureBytes: Curve where
SignatureSize<Self>: ArrayLength<u8>, {
fn check_signature_bytes(bytes: &SignatureBytes<Self>) -> Result<(), Error> { ... }
}
Expand description
Ensure a signature is well-formed.
Provided methods
fn check_signature_bytes(bytes: &SignatureBytes<Self>) -> Result<(), Error>
fn check_signature_bytes(bytes: &SignatureBytes<Self>) -> Result<(), Error>
Validate that the given signature is well-formed.
This trait is auto-impl’d for curves which impl the
elliptic_curve::ProjectiveArithmetic
trait, which validates that the
r
and s
components of the signature are in range of the
scalar field.
Note that this trait is not for verifying a signature, but allows for
asserting properties of it which allow infallible conversions
(e.g. accessors for the r
and s
components)