Ed25519Gate class abstract
Pluggable backend for Ed25519 curve operations (Monero, etc.). All inputs/outputs are byte arrays so native backends avoid BigInt conversion.
Constructors
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
-
isOnCurve(
Uint8List encoded) → bool -
Check whether
encodedis a valid point on Ed25519. -
load(
) → Future< void> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pointAdd(
Uint8List p1, Uint8List p2) → Uint8List -
Point addition:
p1+p2. Both 32 bytes (compressed). -
pointToBytes(
Uint8List point) → Uint8List - Compress a point to 32 bytes. Input may already be compressed. Identity for most implementations since we work in compressed form.
-
scalarAdd(
Uint8List a, Uint8List b) → Uint8List - Scalar addition: (a + b) mod L. Both inputs 32 bytes.
-
scalarMod(
Uint8List scalar) → Uint8List - Scalar modular reduction of a 32-byte value by L. Unlike scalarReduce, input must be exactly 32 bytes.
-
scalarMult(
Uint8List scalar, Uint8List point) → Uint8List -
Scalar multiplication:
scalar*point. Both 32 bytes (compressed). -
scalarMultBase(
Uint8List scalar) → Uint8List -
Scalar multiplication with the base point G:
scalar* G. -
scalarReduce(
Uint8List input) → Uint8List - Reduce a byte array (up to 64 bytes) modulo the group order L. Returns a 32-byte scalar.
-
toString(
) → String -
A string representation of this object.
inherited
-
validatePoint(
Uint8List encoded) → Uint8List - Decompress a 32-byte encoded point and re-encode it. Throws on invalid points. Returns the validated 32-byte encoding.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited