[][src]Struct bls_like::pop::BatchAssumingProofsOfPossession

pub struct BatchAssumingProofsOfPossession<E: EngineBLS> { /* fields omitted */ }

Batch or aggregate BLS signatures with attached messages and signers, for whom we previously checked proofs-of-possession.

In this type, we provide a high-risk low-level batching and aggregation mechanism that merely adds up signatures under the assumption that all required proofs-of-possession were previously checked.

We say a signing key has provided a proof-of-possession if the verifier remembers having checked some self-signed certificate by that key. It's insecure to use this aggregation strategy without first cehcking proofs-of-possession. In particular it is insecure to use this aggregation strategy when checking proofs-of-possession, and could not improve performance anyways.
Distinct message aggregation is always optimal for checking proofs-of-possession. Please see the module level doumentation for additional discussion and notes on security.

We foresee this type primarily being used to batch several BitPoPSignedMessages into one verification. We do not track aggreggated public keys here, instead merging multiples signers public keys anytime they sign the same message, so this type essentially provides only fast batch verificartion.
In principle, our add_* methods suffice for building an actual aggregate signature type. Yet, normally direct approaches like BitPoPSignedMessage work better for aggregation because the ProofsOfPossession trait tooling permits both enforce the proofs-of-possession and provide a compact serialization. We see no reason to support serialization for this type as present.

Methods

impl<E: EngineBLS> BatchAssumingProofsOfPossession<E>[src]

pub fn new() -> BatchAssumingProofsOfPossession<E>[src]

pub fn add_signature(&mut self, signature: &Signature<E>)[src]

Add only a Signature<E> to our internal signature.

Useful for constructing an aggregate signature, but we recommend instead using a custom types like BitPoPSignedMessage.

pub fn add_message_n_publickey(
    &mut self,
    message: &Message,
    publickey: &PublicKey<E>
)
[src]

Add only a Message and PublicKey<E> to our internal data.

Useful for constructing an aggregate signature, but we recommend instead using a custom types like BitPoPSignedMessage.

pub fn aggregate<'a, S>(&mut self, signed: &'a S) where
    &'a S: Signed<E = E>,
    <&'a S as Signed>::PKG: Borrow<PublicKey<E>>, 
[src]

Aggregage BLS signatures assuming they have proofs-of-possession

Trait Implementations

impl<'a, E: EngineBLS> Signed for &'a BatchAssumingProofsOfPossession<E>[src]

type E = E

type M = &'a Message

type PKG = &'a PublicKey<Self::E>

type PKnM = Iter<'a, Message, PublicKey<E>>

Iterator over messages and public key reference pairs.

impl<E: Clone + EngineBLS> Clone for BatchAssumingProofsOfPossession<E>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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

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.

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self