BW6G2Affine

Git Source

State Variables

INFINITY_FLAG

INFINITY_FLAG

bytes1 private constant INFINITY_FLAG = bytes1(0x40);

Y_IS_NEGATIVE

Y_IS_NEGATIVE

bytes1 private constant Y_IS_NEGATIVE = bytes1(0x80);

Functions

zero

Returns the additive identity element of Bw6G2.

function zero() internal pure returns (Bw6G2 memory);

Returns

NameTypeDescription
<none>Bw6G2Bw6G2(BW6FP.zero(), BW6FP.zero())

is_zero

Returns true if self is equal to the additive identity.

function is_zero(Bw6G2 memory self) internal pure returns (bool);

Parameters

NameTypeDescription
selfBw6G2Bw6G2.

Returns

NameTypeDescription
<none>boolResult of zero check.

is_infinity

Returns true if self is infinity point.

function is_infinity(Bw6G2 memory self) internal pure returns (bool);

Parameters

NameTypeDescription
selfBw6G2Bw6G2.

Returns

NameTypeDescription
<none>boolResult of infinity check.

serialize

Serialize Bw6G2.

function serialize(Bw6G2 memory g2) internal pure returns (bytes memory r);

Parameters

NameTypeDescription
g2Bw6G2Bw6G2.

Returns

NameTypeDescription
rbytesCompressed serialized bytes of Bw6G2.