[][src]Struct bls_like::distinct::DistinctMessages

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

Distinct messages with attached BLS signature

We can aggregate BLS signatures on distinct messages without additional assuptions or delinearization. In this variant, there is obviously no aggregation on the signature curve, so verification still requires one pairing per message. We can however aggregate numerous messages with the same signer, so this works well when a small signer set signs numerous messages, even if the signer set remains unknown.

We also of course benifit from running one single Miller loop and final exponentiation when compiuting all these pairings. We note that proofs-of-possession require distinct messages because the message must uniquely single out the signing key, so they may be aggregated or batch verified with distinct message mode, and indeed using distinct messages aggregation is optimal.

We recommend using this for either batching or aggregation, but we do yet not provide any serialization scheme for the aggregate version. Instead, you should serialize the aggregated signature seperately, and reconstruct this type using its add_* methods.

Methods

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

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

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

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

Useful in constructing an aggregate signature from this type.

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

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

Useful in constructing an aggregate signature from this type.

We require that duplicate message halt verification by consuming self by vaule and return it only if no duplicates occur.

pub fn add(self, signed: &SignedMessage<E>) -> DistinctMessagesResult<E>[src]

Aggregage BLS signatures from singletons with distinct messages

We require that duplicate message halt verification by consuming self by vaule and return it only if no duplicates occur.

pub fn merge(self, signed: &DistinctMessages<E>) -> DistinctMessagesResult<E>[src]

Aggregage BLS signatures from sources with distinct messages

We require that duplicate message halt verification by consuming self by vaule and return it only if no duplicates occur.

Trait Implementations

impl<'a, E: EngineBLS> Signed for &'a DistinctMessages<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 DistinctMessages<E>[src]

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

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<E> Send for DistinctMessages<E> where
    <E as EngineBLS>::PublicKeyGroup: Send,
    <E as EngineBLS>::SignatureGroup: Send

impl<E> Unpin for DistinctMessages<E> where
    <E as EngineBLS>::PublicKeyGroup: Unpin,
    <E as EngineBLS>::SignatureGroup: Unpin

impl<E> Sync for DistinctMessages<E> where
    <E as EngineBLS>::PublicKeyGroup: Sync,
    <E as EngineBLS>::SignatureGroup: Sync

impl<E> UnwindSafe for DistinctMessages<E> where
    <E as EngineBLS>::PublicKeyGroup: RefUnwindSafe + UnwindSafe,
    <E as EngineBLS>::SignatureGroup: UnwindSafe

impl<E> RefUnwindSafe for DistinctMessages<E> where
    <E as EngineBLS>::PublicKeyGroup: RefUnwindSafe,
    <E as EngineBLS>::SignatureGroup: RefUnwindSafe

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

impl<T, U> Into<U> for T where
    U: From<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