[−][src]Struct bls_like::pop::BatchAssumingProofsOfPossession
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
BitPoPSignedMessage
s 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]
&mut self,
message: &Message,
publickey: &PublicKey<E>
)
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]
&'a S: Signed<E = E>,
<&'a S as Signed>::PKG: Borrow<PublicKey<E>>,
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.
fn messages_and_publickeys(self) -> Self::PKnM
[src]
fn signature(&self) -> Signature<E>
[src]
fn verify(self) -> bool
[src]
impl<E: Clone + EngineBLS> Clone for BatchAssumingProofsOfPossession<E>
[src]
fn clone(&self) -> BatchAssumingProofsOfPossession<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 BatchAssumingProofsOfPossession<E> where
<E as EngineBLS>::PublicKeyGroup: Sync,
<E as EngineBLS>::SignatureGroup: Sync,
<E as EngineBLS>::PublicKeyGroup: Sync,
<E as EngineBLS>::SignatureGroup: Sync,
impl<E> Unpin for BatchAssumingProofsOfPossession<E> where
<E as EngineBLS>::PublicKeyGroup: Unpin,
<E as EngineBLS>::SignatureGroup: Unpin,
<E as EngineBLS>::PublicKeyGroup: Unpin,
<E as EngineBLS>::SignatureGroup: Unpin,
impl<E> Send for BatchAssumingProofsOfPossession<E> where
<E as EngineBLS>::PublicKeyGroup: Send,
<E as EngineBLS>::SignatureGroup: Send,
<E as EngineBLS>::PublicKeyGroup: Send,
<E as EngineBLS>::SignatureGroup: Send,
impl<E> UnwindSafe for BatchAssumingProofsOfPossession<E> where
<E as EngineBLS>::PublicKeyGroup: RefUnwindSafe + UnwindSafe,
<E as EngineBLS>::SignatureGroup: UnwindSafe,
<E as EngineBLS>::PublicKeyGroup: RefUnwindSafe + UnwindSafe,
<E as EngineBLS>::SignatureGroup: UnwindSafe,
impl<E> RefUnwindSafe for BatchAssumingProofsOfPossession<E> where
<E as EngineBLS>::PublicKeyGroup: RefUnwindSafe,
<E as EngineBLS>::SignatureGroup: RefUnwindSafe,
<E as EngineBLS>::PublicKeyGroup: RefUnwindSafe,
<E as EngineBLS>::SignatureGroup: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self