[][src]Struct bls_eth_rust::Signature

#[repr(C)]
pub struct Signature { /* fields omitted */ }

signature type

Methods

impl Signature[src]

pub fn zero() -> Signature[src]

return zero instance

pub unsafe fn uninit() -> Signature[src]

return uninitialized instance

impl Signature[src]

pub fn deserialize(&mut self, buf: &[u8]) -> bool[src]

return true if buf is deserialized successfully

  • buf - serialized data by serialize

pub fn from_serialized(buf: &[u8]) -> Result<Signature, BlsError>[src]

return deserialized buf

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

return serialized byte array

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

alias of serialize

impl Signature[src]

pub fn verify_message(&self, pubkey: *const PublicKey, msg: &Message) -> bool[src]

not used in eth2.0

pub fn verify_aggregated_message(
    &self,
    pubkeys: &[PublicKey],
    msgs: &[Message]
) -> bool
[src]

not used in eth2.0

pub fn verify(&self, pubkey: *const PublicKey, msg: &[u8]) -> bool[src]

return true if self is valid signature of msg for pubkey pubkey - public key msg - message

pub fn add_assign(&mut self, x: *const Signature)[src]

add x to self

  • x - signature to be added

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

return true if self has the valid order

pub fn aggregate(&mut self, sigs: &[Signature])[src]

set the aggregated signature of sigs

  • sigs - signatures to be aggregated

pub fn fast_aggregate_verify(&self, pubs: &[PublicKey], msg: &[u8]) -> bool[src]

return true if self is a valid signature of msgs for pubs

  • pubs - array of public key
  • msg - message

pub fn aggregate_verify_no_check(&self, pubs: &[PublicKey], msgs: &[u8]) -> bool[src]

return true if self is a valid signature of msgs for pubs

  • pubs - array of public key
  • msgs - concatenated byte pubs.len() array of 32-byte messages
  • Note - this function does not call are_all_msg_different

pub fn aggregate_verify(&self, pubs: &[PublicKey], msgs: &[u8]) -> bool[src]

return true if self is a valid signature of msgs for pubs

  • pubs - array of public key
  • msgs - concatenated byte pubs.len() array of 32-byte messages

Trait Implementations

impl Clone for Signature[src]

impl Copy for Signature[src]

impl Debug for Signature[src]

impl Default for Signature[src]

impl Eq for Signature[src]

impl PartialEq<Signature> for Signature[src]

fn eq(&self, rhs: &Self) -> bool[src]

return true if self is equal to rhs

Auto Trait Implementations

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.