Bls12NativeFp class

Native BLS12-381 base field element backed by a single BigInt.

Inheritance
Mixed-in types

Constructors

Bls12NativeFp(BigInt v)
Creates a field element reduced modulo p.
Bls12NativeFp.b()
factory
Bls12NativeFp.beta()
factory
Bls12NativeFp.conditionalSelect(Bls12NativeFp a, Bls12NativeFp b, bool choice)
factory
Bls12NativeFp.fromBytes(List<int> bytes)
factory
Bls12NativeFp.nP(BigInt v)
Creates a field element assuming v is already in canonical form.
Bls12NativeFp.one()
factory
Bls12NativeFp.r2()
factory
Bls12NativeFp.sumOfProducts(List<Bls12NativeFp> a, List<Bls12NativeFp> b)
factory
Bls12NativeFp.zero()
Returns the additive identity.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
p BigInt
Prime modulus p of the field.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
v BigInt
Canonical field value in the range [0, p).
final
variables List
no setteroverride

Methods

double() Bls12NativeFp
override
invert() Bls12NativeFp?
override
isZero() bool
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(BigInt r) Bls12NativeFp
sqrt() FieldSqrtResult<Bls12NativeFp>
override
square() Bls12NativeFp
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 *(Bls12NativeFp rhs) Bls12NativeFp
override
operator +(Bls12NativeFp rhs) Bls12NativeFp
override
operator -(Bls12NativeFp rhs) Bls12NativeFp
override
operator ==(Object other) bool
The equality operator.
inherited
operator unary-() Bls12NativeFp
override