Bls12Fp class

Implementation of the BLS12-381 base field GF(p).

Inheritance
Mixed-in types

Constructors

Bls12Fp(List<BigInt> limbs)
Bls12Fp.b()
factory
Bls12Fp.beta()
factory
Bls12Fp.conditionalSelect(Bls12Fp a, Bls12Fp b, bool choice)
factory
Bls12Fp.fromBytes(List<int> bytes)
Creates a BLS12-381 field element from a byte array.
factory
Bls12Fp.montgomeryReduce(BigInt t0, BigInt t1, BigInt t2, BigInt t3, BigInt t4, BigInt t5, BigInt t6, BigInt t7, BigInt t8, BigInt t9, BigInt t10, BigInt t11)
Montgomery reduction of a 12-limb intermediate into a BLS12-381 field element.
factory
Bls12Fp.one()
One element of the BLS12-381 base field.
factory
Bls12Fp.r2()
Square root of the BLS12-381 base field modulus.
factory
Bls12Fp.sumOfProducts(List<Bls12Fp> a, List<Bls12Fp> b)
factory
Bls12Fp.zero()
Zero element of the BLS12-381 base field.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
limbs List<BigInt>
Fixed-size limb representation of the field element.
final
publicFields List<Object?>
Public, non-secret fields that can be compared normally.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secretFields List<List<int>>
Secret fields that MUST be compared in constant time.
no setterinherited

Methods

constantEquality(Bls12Fp other) bool
check equality
override
double() Bls12Fp
double field
override
invert() Bls12Fp?
Invert null of field is zero
override
isZero() bool
check zero
override
lexicographicallyLargest() bool
Returns whether or not this element is strictly lexicographically larger than its negation.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pow(List<BigInt> by) Bls12Fp
pow
sqrt() FieldSqrtResult<Bls12Fp>
sqrt
override
square() Bls12Fp
Square
override
toBytes() List<int>
Serializes the field element to a 48-byte big-endian representation.
override
toString() String
A string representation of this object.
inherited

Operators

operator *(Bls12Fp rhs) Bls12Fp
override
operator +(Bls12Fp rhs) Bls12Fp
override
operator -(Bls12Fp rhs) Bls12Fp
override
operator ==(Object other) bool
The equality operator.
inherited
operator unary-() Bls12Fp
override