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})
const
G2Projective.conditionalSelect(G2Projective a, G2Projective b, bool choice)
factory
G2Projective.conditionalSelectMask(G2Projective a, G2Projective b, Uint64 bit)
Mask form of conditionalSelect: bit is a 0/1 Uint64 (never a bool), so scalar-multiplication selects stay straight-line.
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

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
Casts this point to T, throwing CastFailedException on mismatch.
inherited
clearCofactor() → G2Projective
Clears the G2 cofactor.
copyWith({Bls12Fp2? x, Bls12Fp2? y, Bls12Fp2? z}) → G2Projective
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({CryptoKeyEncoding mode = CryptoKeyEncoding.base}) → BuBytes
Serializes the point to bytes in either compressed or uncompressed form.
override
toString() → String
A string representation of this object.
inherited

Operators

operator *(JubJubFq rhs) → G2Projective
Scalar multiplication using limbs 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

Constants

generator → const G2Projective
generator
identity → const G2Projective
identity element