G2Projective class

BLS12-381 G2 group in projective coordinates (x : y : z) over GF(p²).

Inheritance

Constructors

G2Projective({required Bls12Fp2 x, required Bls12Fp2 y, required Bls12Fp2 z})
G2Projective.conditionalSelect(G2Projective a, G2Projective b, bool choice)
factory
G2Projective.fromAffine(G2AffinePoint affine)
factory
G2Projective.fromBytes(List<int> bytes)
Creates a G2 point from bytes, validating that it is on-curve and in the correct subgroup.
factory
G2Projective.fromBytesUnchecked(List<int> bytes)
Creates a G2 point from bytes without checking curve or subgroup validity.
factory
G2Projective.generator()
generator
factory
G2Projective.identity()
identity element
factory

Properties

hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
x Bls12Fp2
final
y Bls12Fp2
final
z Bls12Fp2
final

Methods

cast<T extends ECPoint<SCALAR, POINT>>() → T
inherited
clearCofactor() G2Projective
Clears the G2 cofactor.
double() G2Projective
Point doubling.
override
isIdentity() bool
check identity
override
isOnCurve() bool
Checks whether the point satisfies the BLS12-381 curve equation in projective form.
mulBy3b(Bls12Fp2 x) Bls12Fp2
mulByX() G2Projective
Multiply by BLS_X, using double and add.
multiply(List<int> by) G2Projective
simple double-and-add implementation of point multiplication
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
psi() G2Projective
psi2() G2Projective
toAffine() G2AffinePoint
toBytes({PubKeyModes mode = PubKeyModes.compressed}) List<int>
Serializes the point to bytes in either compressed or uncompressed form.
override
toHex() String
inherited
toString() String
A string representation of this object.
inherited

Operators

operator *(JubJubFq rhs) G2Projective
Scalar multiplication using non-native field elements.
override
operator +(Bls12Point<G2Projective> rhs) G2Projective
Point addition.
override
operator -(Bls12Point<G2Projective> rhs) G2Projective
operator ==(Object other) bool
The equality operator.
override
operator unary-() G2Projective