VerifyRecoverable

Trait VerifyRecoverable 

Source
pub trait VerifyRecoverable: Eq + Sized {
    type Sig: RecoverableSignature<PubKey = Self>;

    // Provided methods
    fn verify_recoverable(
        &self,
        msg: &[u8],
        signature: &Self::Sig,
    ) -> Result<(), FastCryptoError> { ... }
    fn verify_recoverable_with_hash<H: HashFunction<32>>(
        &self,
        msg: &[u8],
        signature: &Self::Sig,
    ) -> Result<(), FastCryptoError> { ... }
}

Required Associated Types§

Source

type Sig: RecoverableSignature<PubKey = Self>

Provided Methods§

Source

fn verify_recoverable( &self, msg: &[u8], signature: &Self::Sig, ) -> Result<(), FastCryptoError>

Verify a recoverable signature by recovering the public key and compare it to self.

Source

fn verify_recoverable_with_hash<H: HashFunction<32>>( &self, msg: &[u8], signature: &Self::Sig, ) -> Result<(), FastCryptoError>

Verify a recoverable signature by recovering the public key and compare it to self. The recovery is using the given hash function.

Note: This is currently only used for Secp256r1 and Secp256k1 where the hash function must have 32 byte output.

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§