[][src]Trait bls_like::Signed

pub trait Signed: Sized {
    type E: EngineBLS;
    type M: Borrow<Message> = Message;
    type PKG: Borrow<PublicKey<Self::E>> = PublicKey<Self::E>;
    type PKnM: Iterator<Item = (Self::M, Self::PKG)> + ExactSizeIterator;
    fn signature(&self) -> Signature<Self::E>;
fn messages_and_publickeys(self) -> Self::PKnM; fn verify(self) -> bool { ... } }

Representation of an aggregated BLS signature.

We implement this trait only for borrows of appropriate structs because otherwise we'd need extensive lifetime plumbing here, due to the absence of assocaited type constructers (ATCs). We shall make messages_and_publickeys take &sefl and remove these limitations in the future once ATCs stabalize, thus removing PKG. See Rust RFC 1598 We shall eventually remove MnPK entirely whenever -> impl Trait in traits gets stabalized. See [Rust RFCs 1522, 1951, and 2071](https://github.com/rust-lang/rust/issues/34511

Associated Types

type E: EngineBLS

type M: Borrow<Message> = Message

type PKG: Borrow<PublicKey<Self::E>> = PublicKey<Self::E>

type PKnM: Iterator<Item = (Self::M, Self::PKG)> + ExactSizeIterator

Iterator over messages and public key reference pairs.

Loading content...

Required methods

fn signature(&self) -> Signature<Self::E>

Return the aggregated signature

fn messages_and_publickeys(self) -> Self::PKnM

Returns an iterator over messages and public key reference for pairings, often only partially aggregated.

Loading content...

Provided methods

fn verify(self) -> bool

Appropriate BLS signature verification for the Self type.

We use verify_simple as a default implementation because it supports unstable self.messages_and_publickeys() securely by calling it only once, and does not expect pulic key points to be normalized, but this should usually be replaced by more optimized variants.

Loading content...

Implementors

impl<'a, E, POP> Signed for &'a BitPoPSignedMessage<E, POP> where
    E: EngineBLS,
    POP: ProofsOfPossession<E>, 
[src]

type E = E

type M = Message

type PKG = PublicKey<E>

type PKnM = Once<(Message, PublicKey<E>)>

impl<'a, E, POP> Signed for &'a CountPoPSignedMessage<E, POP> where
    E: EngineBLS,
    POP: ProofsOfPossession<E>, 
[src]

type E = E

type M = Message

type PKG = PublicKey<E>

type PKnM = Once<(Message, PublicKey<E>)>

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>>

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>>

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>>

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

type E = E

type M = Message

type PKG = PublicKey<E>

type PKnM = Once<(Message, PublicKey<E>)>

Loading content...