[−][src]Struct bls_like::delinear::Delinearized
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]
&mut self,
message: &Message,
publickey: PublicKey<E>
) -> E::Scalar
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.
fn messages_and_publickeys(self) -> Self::PKnM
[src]
fn signature(&self) -> Signature<E>
[src]
fn verify(self) -> bool
[src]
impl<E: EngineBLS> Clone for Delinearized<E>
[src]
fn clone(&self) -> 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,
<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,
<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,
<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,
<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,
<E as EngineBLS>::PublicKeyGroup: RefUnwindSafe + UnwindSafe,
<E as EngineBLS>::SignatureGroup: UnwindSafe,
Blanket Implementations
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> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for 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