PastaFieldElement<F extends PastaFieldElement<F>> class abstract

Abstract base class for elements of a Pasta prime field, supporting arithmetic, comparison, and byte/bit conversions.

Inheritance
Implemented types
Implementers

Constructors

PastaFieldElement()
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

compareTo(F other) int
Lexicographic comparison of field elements.
override
conditionalSelect(F a, F b, bool choice) → F
Conditional selection: returns b if choice is true, a otherwise.
double() → F
Doubles the element.
override
getLower32() int
Returns the lowest 32 bits of the field element.
invert() → F?
Computes the multiplicative inverse.
override
isOdd() bool
Returns true if the element is odd (least significant bit = 1)
isZero() bool
Returns true if the element is zero.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
powByTMinus1Over2() → F
Computes (self)^((t - 1)/2), used in curve-specific operations.
sqrt() FieldSqrtResult<F>
Computes the square root of the element.
override
square() → F
Squares the element.
override
sRatio(F a, F b) FieldSqrtResult<F>
toBits() List<bool>
Returns the field element as a list of bits (little-endian per limb).
toBytes() List<int>
Serializes the field element to bytes.
override
toString() String
A string representation of this object.
inherited

Operators

operator *(F other) → F
inherited
operator +(F other) → F
inherited
operator -(F other) → F
inherited
operator ==(Object other) bool
The equality operator.
inherited
operator unary-() → F
inherited