[][src]Struct bls_like::delinear::Delinearized

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

Delinearized batched and aggregated BLS signatures.

We caution that this type only represents one of several optimizations possible. We believe it fits well when messages are often repeated but signers are rarely repeated.

We should create another type for when repeated signers are expected, likely by keying the hash map on the pubkic key. In practice though, if signers are often repeated then you should should consider a proof-of-possession scheme, which requiees all signers register in advance.

Methods

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

pub fn new(key: Shake128) -> Delinearized<E>[src]

pub fn new_keyed(key: &[u8]) -> Delinearized<E>[src]

pub fn new_batched_rng<R: Rng>(rng: R) -> Delinearized<E>[src]

pub fn new_batched() -> Delinearized<E>[src]

pub fn mask(&self, publickey: &PublicKey<E>) -> E::Scalar[src]

Return the mask used for a particular public key.

TODO: We only want 128 bits here, not a full scalar. We thus need mul_bits exposed by the pairing crate, at which point our return type here changes.

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

Add only a Signature<E> to our internal signature, assumes the signature was previously delinearized elsewhere.

Useful for constructing an aggregate signature.

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

Add only a Message and PublicKey<E> to our internal data, doing delinearization ourselves.

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

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

Aggregage BLS signatures from singletons using delinearization

pub fn agreement(&self, other: &Delinearized<E>) -> bool[src]

Test that two Delinearized use the same key.

You should call this before calling merge, although we do enforce this because several untestable related conditions suffice too.

pub fn merge(&mut self, other: &Delinearized<E>)[src]

Merge another Delinearized for simultanious verification.

You should only call this if self.agreement(other) or some related condition holds, or if you have message disjointness.

Trait Implementations

impl<'a, E: EngineBLS> Signed for &'a Delinearized<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: EngineBLS> Clone for Delinearized<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> Sync for Delinearized<E> where
    <E as EngineBLS>::PublicKeyGroup: Sync,
    <E as EngineBLS>::SignatureGroup: Sync

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

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

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

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

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