[−][src]Struct bls_amcl::multi_sig_slow::MultiSignature
Methods
impl MultiSignature
[src]
pub fn from_sigs<'a, T, I>(sigs_and_ver_keys: T) -> Signature where
T: IntoIterator<Item = &'a I>,
T::IntoIter: Clone,
I: AsRef<VerKey> + AsRef<Signature> + 'a,
[src]
T: IntoIterator<Item = &'a I>,
T::IntoIter: Clone,
I: AsRef<VerKey> + AsRef<Signature> + 'a,
The aggregator needs to know of all the signer before it can generate the aggregate signature.
Takes individual signatures from each of the signers and their verkey and aggregates the
signatures. For each signature s_i
from signer with verkey v_i
calculate
a_i = hashed_verkey_for_aggregation(vk_i, [vk_1, vk_2,...vk_n])
a_si = s_i * a_i
Add all a_si
.
An alternate construction is (as described in the paper) to let signer compute s_i * a_i
and
the aggregator simply adds each signer's output. In that model, signer does more work but in the
implemented model, aggregator does more work and the same signer implementation can be used by
signers of "slow" and "fast" implementation.
pub fn verify<'a, T, K>(
sig: &Signature,
msg: &[u8],
ver_keys: T,
params: &Params
) -> bool where
T: IntoIterator<Item = &'a K>,
T::IntoIter: Clone,
K: AsRef<VerKey> + 'a,
[src]
sig: &Signature,
msg: &[u8],
ver_keys: T,
params: &Params
) -> bool where
T: IntoIterator<Item = &'a K>,
T::IntoIter: Clone,
K: AsRef<VerKey> + 'a,
An aggregate VerKey is created from ver_keys
. When verifying signature using the same
set of keys frequently generate a verkey once and then use Signature::verify
Auto Trait Implementations
impl Send for MultiSignature
impl Sync for MultiSignature
impl Unpin for MultiSignature
impl UnwindSafe for MultiSignature
impl RefUnwindSafe for MultiSignature
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, 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> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
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
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,