#[repr(C)]pub struct G2 {
pub x: [[u64; 6]; 2],
pub y: [[u64; 6]; 2],
pub z: [[u64; 6]; 2],
}Expand description
public key type
Fields§
§x: [[u64; 6]; 2]§y: [[u64; 6]; 2]§z: [[u64; 6]; 2]Implementations§
Source§impl G2
impl G2
Sourcepub fn add_assign(&mut self, public_key: G2)
pub fn add_assign(&mut self, public_key: G2)
Adds the given public_key to self.
This function performs an addition operation on the G2 element represented by self
and the provided public_key.
§Arguments
public_key- AG2element to be added toself.
Sourcepub fn is_valid_order(&self) -> bool
pub fn is_valid_order(&self) -> bool
Checks if the G2 element has a valid order.
This function verifies whether the G2 element represented by self
is of a valid order as per the cryptographic library’s requirements.
§Returns
trueif theG2element has a valid order.falseotherwise.
Sourcepub fn deserialize_g2(&mut self, buf: &[u8]) -> bool
pub fn deserialize_g2(&mut self, buf: &[u8]) -> bool
Sourcepub fn is_zero(&self) -> bool
pub fn is_zero(&self) -> bool
Checks if the G2 element is the point at infinity (zero element).
This function determines whether the G2 element represented by self
is the zero element, which is the identity element in the group.
§Returns
true if the G2 element is the zero element, otherwise false.
Sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Checks if the G2 element is valid.
This function determines whether the G2 element represented by self
is valid according to the cryptographic library’s requirements.
§Returns
true if the G2 element is valid, otherwise false.
Sourcepub fn verify_public_key_order(verify: bool)
pub fn verify_public_key_order(verify: bool)
verify the correctness whenever public key setter is used
verify- enable if true (default off)
pub fn deserialize(&mut self, buf: &[u8]) -> bool
Sourcepub fn from_serialized(buf: &[u8]) -> Result<Self, BlsError>
pub fn from_serialized(buf: &[u8]) -> Result<Self, BlsError>
return deserialized buf