[]Trait recrypt::api_480::SchnorrOps

pub trait SchnorrOps {
    fn schnorr_sign<A: Hashable>(
        &mut self,
        priv_key: &PrivateKey,
        pub_key: &PublicKey,
        message: &A
    ) -> SchnorrSignature;
fn schnorr_verify<A: Hashable>(
        &self,
        pub_key: &PublicKey,
        augmenting_priv_key: Option<&PrivateKey>,
        message: &A,
        signature: SchnorrSignature
    ) -> bool; }

Required methods

fn schnorr_sign<A: Hashable>(
    &mut self,
    priv_key: &PrivateKey,
    pub_key: &PublicKey,
    message: &A
) -> SchnorrSignature

Create a signature for the message using priv_key.

  • priv_key - The private key which is used to generate the signature.
  • pub_key the public key which will be used to validate the signature.
  • message the message to sign.

fn schnorr_verify<A: Hashable>(
    &self,
    pub_key: &PublicKey,
    augmenting_priv_key: Option<&PrivateKey>,
    message: &A,
    signature: SchnorrSignature
) -> bool

Verify that the message was signed by the matching private key to pub_key. Note that if pub_key was augmented the private key used in the augmentation should be passed in as augmenting_priv_key.

  • pub_key - The pub_key that was used in the signing process.
  • augmenting_priv_key - If the pub_key was augmented, pass the private key that was used to augment. None if no augmentation was done.
  • message - Message that was signed.
  • signature - The signature that was generated from schnorr_sign.
Loading content...

Implementors

impl<H: Sha256Hashing, S, CR: RngCore + CryptoRng> SchnorrOps for Recrypt480<H, S, RandomBytes<CR>>

Loading content...