Trait Curve

Source
pub trait Curve {
    type PublicKey;
    type Signature;
    type Message: AsRef<[u8]> + ?Sized;
    type VerifyingKey;

    // Required method
    fn verify(
        signature: &Self::Signature,
        message: &Self::Message,
        verifying_key: &Self::VerifyingKey,
    ) -> Option<Self::PublicKey>;
}

Required Associated Types§

Source

type PublicKey

Source

type Signature

Source

type Message: AsRef<[u8]> + ?Sized

Message that can be signed by this curve

Source

type VerifyingKey

Public key that should be known prior to verification

Required Methods§

Source

fn verify( signature: &Self::Signature, message: &Self::Message, verifying_key: &Self::VerifyingKey, ) -> Option<Self::PublicKey>

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.

Implementors§