#[repr(C)]pub struct G1 {
pub x: [u64; 6],
pub y: [u64; 6],
pub z: [u64; 6],
}Expand description
signature type
Fields§
§x: [u64; 6]§y: [u64; 6]§z: [u64; 6]Implementations§
Source§impl G1
impl G1
Sourcepub fn verify(&self, public_key: G2, msg: &[u8]) -> bool
pub fn verify(&self, public_key: G2, msg: &[u8]) -> bool
return true if self is valid signature of msg for public_key
Sourcepub fn fast_aggregate_verify(&self, public_keys: &[G2], msg: &[u8]) -> bool
pub fn fast_aggregate_verify(&self, public_keys: &[G2], msg: &[u8]) -> bool
return true if self is a valid signature of msg for public keys
public_keys- array of public keymsg- message
Sourcepub fn add_assign(&mut self, signature: G1)
pub fn add_assign(&mut self, signature: G1)
add a signature to self
Sourcepub fn is_valid_order(&self) -> bool
pub fn is_valid_order(&self) -> bool
return true if self has the valid order
Sourcepub fn aggregate(&mut self, sigs: &[G1])
pub fn aggregate(&mut self, sigs: &[G1])
set the aggregated signature of sigs
sigs- signatures to be aggregated
Sourcepub fn is_zero(&self) -> bool
pub fn is_zero(&self) -> bool
Checks if the G1 element is the point at infinity (zero element).
This function determines whether the G1 element represented by self
is the zero element, which is the identity element in the group.
§Returns
true if the G1 element is the zero element, otherwise false.
Sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Checks if the G1 element is valid.
This function determines whether the G1 element represented by self
is valid according to the cryptographic library’s requirements.
§Returns
true if the G1 element is valid, otherwise false.
Sourcepub fn verify_signature_order(verify: bool)
pub fn verify_signature_order(verify: bool)
verify the correctness whenever signature setter is used
verify- enable if true (default off)
Sourcepub fn deserialize(&mut self, buf: &[u8]) -> bool
pub fn deserialize(&mut self, buf: &[u8]) -> bool
return true if buf is deserialized successfully
buf- serialized data byserialize
Sourcepub fn from_serialized(buf: &[u8]) -> Result<Self, BlsError>
pub fn from_serialized(buf: &[u8]) -> Result<Self, BlsError>
return deserialized buf