pub trait Curve {
type PublicKey;
type Signature;
// Required method
fn verify(
public_key: &Self::PublicKey,
msg: &[u8],
signature: &Self::Signature,
) -> bool;
}Expand description
Digital Signature Algorithm.
Required Associated Types§
Required Methods§
Sourcefn verify(
public_key: &Self::PublicKey,
msg: &[u8],
signature: &Self::Signature,
) -> bool
fn verify( public_key: &Self::PublicKey, msg: &[u8], signature: &Self::Signature, ) -> bool
Verify the signature over the message for given public key
NOTE: implementations MAY require msg to be prehash (i.e. output
of cryptographic hash function) of a fixed length and reject
the signature otherwise. Check corresponding docs before using.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.