PastaUtils class

Shared hash-to-curve and square-root helpers used by the Pasta curves.

Constructors

PastaUtils()

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

hashToField({required String curveId, required String domainPrefix, required List<int> message}) → (List<int>, List<int>)
isoMap<F extends PastaFieldElement<F>>({required (F, F, F) p, required List<F> iso}) → (F, F, F)
Applies the isogeny map, moving a point p from the isogenous curve back to the target Pasta curve.
mapToCurveSimpleSwu<F extends PastaFieldElement<F>>({required F u, required F theta, required F z, required F r, required PastaCurveParams<F> isogenyParams}) → (F, F, F)
The Simplified SWU map: sends a field element u to a point on the isogenous curve (as projective (x, y, z)), for hash-to-curve.
sqrtRatioGeneric<F extends CryptoField<F>>({required F num, required F div, required F zero, required F rootOfUnity}) → FieldSqrtResult<F>
Computes sqrt(num/div) (or a related non-square value — see FieldSqrtResult.isSquare) without a dedicated per-field table.
sqrtTonelliShanks<F extends CryptoField<F>>({required F f, required F fPowTm1d2, required F rootOfUnity, required F one, required F conditionalSelect(F a, F b, bool choice), required int s}) → FieldSqrtResult<F>
Tonelli-Shanks square root, in constant-time style.