G2NativeProjective class

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

Inheritance

Constructors

G2NativeProjective({required Bls12NativeFp2 x, required Bls12NativeFp2 y, required Bls12NativeFp2 z})
G2NativeProjective.conditionalSelect(G2NativeProjective a, G2NativeProjective b, bool choice)
factory
G2NativeProjective.fromAffine(G2NativeAffinePoint affine)
factory
G2NativeProjective.fromBytes(List<int> bytes)
Creates a G2 point from bytes, validating that it is on-curve and in the correct subgroup.
factory
G2NativeProjective.fromBytesUnchecked(List<int> bytes)
Creates a G2 point from bytes without checking curve or subgroup validity.
factory
G2NativeProjective.generator()
generator
factory
G2NativeProjective.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 Bls12NativeFp2
final
y Bls12NativeFp2
final
z Bls12NativeFp2
final

Methods

cast<T extends ECPoint<SCALAR, POINT>>() → T
inherited
clearCofactor() G2NativeProjective
Clears the G2 cofactor.
copyWith({Bls12NativeFp2? x, Bls12NativeFp2? y, Bls12NativeFp2? z}) G2NativeProjective
double() G2NativeProjective
Point doubling.
override
isIdentity() bool
check identity
override
isOnCurve() bool
Checks whether the point satisfies the BLS12-381 curve equation in projective form.
mulBy3b(Bls12NativeFp2 x) Bls12NativeFp2
mulByX() G2NativeProjective
Multiply by BLS_X, using double and add.
multiply(List<int> by) G2NativeProjective
simple double-and-add implementation of point multiplication
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
psi() G2NativeProjective
psi2() G2NativeProjective
toAffine() G2NativeAffinePoint
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 *(JubJubNativeFq rhs) G2NativeProjective
Scalar multiplication using native field elements.
override
operator +(Bls12NativePoint<G2NativeProjective> rhs) G2NativeProjective
Point addition using native (single BigInt) field arithmetic.
override
operator -(Bls12NativePoint<G2NativeProjective> rhs) G2NativeProjective
operator ==(Object other) bool
The equality operator.
override
operator unary-() G2NativeProjective