[][src]Trait secp256k1_zkp::schnorrsig::Verify

pub trait Verify {
    fn schnorrsig_verify(
        &self,
        msg: &Message,
        sig: &Signature,
        pk: &PublicKey
    ) -> Result<(), Error>;
fn schnorrsig_verify_batch(
        &self,
        scratch_space: Option<ScratchSpace>,
        msgs: &[Message],
        sigs: &[Signature],
        pks: &[PublicKey]
    ) -> Result<(), Error>; }

Schnorrsig verification trait

Required methods

fn schnorrsig_verify(
    &self,
    msg: &Message,
    sig: &Signature,
    pk: &PublicKey
) -> Result<(), Error>

Verifies a Schnorr signature as defined by BIP-schnorr

fn schnorrsig_verify_batch(
    &self,
    scratch_space: Option<ScratchSpace>,
    msgs: &[Message],
    sigs: &[Signature],
    pks: &[PublicKey]
) -> Result<(), Error>

Takes slices of messages, Schnorr signatures and public keys and verifies them all at once. That's faster than if they would have been verified one by one. Returns an Error if a single Signature fails verification. If the scratch space is not provided, this function will create a scratch space on its own of size 8192 bytes.

Loading content...

Implementations on Foreign Types

impl<C: Verification> Verify for Secp256k1<C>[src]

Loading content...

Implementors

Loading content...