[][src]Struct secp256k1zkp::aggsig::AggSigContext

pub struct AggSigContext { /* fields omitted */ }

Manages an instance of an aggsig multisig context, and provides all methods to act on that context

Methods

impl AggSigContext[src]

pub fn new(secp: &Secp256k1, pubkeys: &Vec<PublicKey>) -> AggSigContext[src]

Creates new aggsig context with a new random seed

pub fn generate_nonce(&self, index: usize) -> bool[src]

Generate a nonce pair for a single signature part in an aggregated signature Returns: true on success false if a nonce has already been generated for this index In: index: which signature to generate a nonce for

pub fn partial_sign(
    &self,
    msg: Message,
    seckey: SecretKey,
    index: usize
) -> Result<AggSigPartialSignature, Error>
[src]

Generate a single signature part in an aggregated signature Returns: Ok(AggSigPartialSignature) on success In: msg: the message to sign seckey: the secret key index: which index to generate a partial sig for

pub fn combine_signatures(
    &self,
    partial_sigs: &Vec<AggSigPartialSignature>
) -> Result<Signature, Error>
[src]

Aggregate multiple signature parts into a single aggregated signature Returns: Ok(Signature) on success In: partial_sigs: vector of partial signatures

pub fn verify(&self, sig: Signature, msg: Message, pks: &Vec<PublicKey>) -> bool[src]

Verifies aggregate sig Returns: true if valid, okay if not In: msg: message to verify sig: combined signature pks: public keys

Trait Implementations

impl Clone for AggSigContext[src]

impl Debug for AggSigContext[src]

impl Drop for AggSigContext[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.