[][src]Struct store::AggregateSignature

pub struct AggregateSignature { /* fields omitted */ }

A BLS aggregate signature.

This struct is a wrapper upon a base type and provides helper functions (e.g., SSZ serialization).


impl AggregateSignature[src]

pub fn new() -> AggregateSignature[src]

Instantiate a new AggregateSignature.

is_empty is false AggregateSignature is point at infinity

pub fn add(&mut self, signature: &Signature)[src]

Add (aggregate) a signature to the AggregateSignature.

pub fn add_aggregate(&mut self, agg_signature: &AggregateSignature)[src]

Add (aggregate) another AggregateSignature.

pub fn verify(
    msg: &[u8],
    domain: u64,
    aggregate_public_key: &AggregatePublicKey
) -> bool

Verify the AggregateSignature against an AggregatePublicKey.

Only returns true if the set of keys in the AggregatePublicKey match the set of keys that signed the AggregateSignature.

pub fn verify_multiple(
    messages: &[&[u8]],
    domain: u64,
    aggregate_public_keys: &[&AggregatePublicKey]
) -> bool

Verify this AggregateSignature against multiple AggregatePublickeys with multiple Messages.

All PublicKeys related to a Message should be aggregated into one AggregatePublicKey. Each AggregatePublicKey has a 1:1 ratio with a 32 byte Message.

pub fn as_bytes(&self) -> Vec<u8>[src]

Return AggregateSignature as bytes

pub fn from_bytes(bytes: &[u8]) -> Result<AggregateSignature, DecodeError>[src]

Convert bytes to AggregateSignature

pub fn as_raw(&self) -> &AggregateSignature[src]

Returns the underlying signature.

pub fn from_point(point: G2Point) -> AggregateSignature[src]

Returns the underlying signature.

pub fn is_empty(&self) -> bool[src]

Returns if the AggregateSignature is_empty

pub fn empty_signature() -> AggregateSignature[src]

Creates a new AggregateSignature

aggregate_signature set to the point infinity is_empty set to true

Trait Implementations

impl TestRandom for AggregateSignature[src]

impl Debug for AggregateSignature[src]

impl Clone for AggregateSignature[src]

impl Decode for AggregateSignature[src]

impl Default for AggregateSignature[src]

impl Eq for AggregateSignature[src]

impl TreeHash for AggregateSignature[src]

impl<'de> Deserialize<'de> for AggregateSignature[src]

fn deserialize<D>(
    deserializer: D
) -> Result<AggregateSignature, <D as Deserializer<'de>>::Error> where
    D: Deserializer<'de>, 

Serde serialization is compliant the Ethereum YAML test format.

impl Encode for AggregateSignature[src]

impl Serialize for AggregateSignature[src]

fn serialize<S>(
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer

Serde serialization is compliant the Ethereum YAML test format.

impl PartialEq<AggregateSignature> for AggregateSignature[src]

Auto Trait Implementations

impl Send for AggregateSignature

impl Unpin for AggregateSignature

impl Sync for AggregateSignature

impl UnwindSafe for AggregateSignature

impl RefUnwindSafe for AggregateSignature

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> Any for T where
    T: 'static + ?Sized

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized