Common byte-level curve operations, shared across every supported curve. pointLen/scalarLen vary per curve — e.g. 32 bytes for Ed25519, 48 for BLS12-381 G1.
Properties
Methods
-
add(
List< int> a, List<int> b) → BuBytes - Point addition; both pointLen bytes. Returns pointLen bytes. Throws on invalid encoding.
-
generator(
) → BuBytes - Generator point. Returns pointLen bytes, never null.
-
identity(
) → BuBytes - Identity (zero) point. Returns pointLen bytes, never null.
-
mulAdd(
List< int> s1, List<int> p1, List<int> s2, List<int> p2) → BuBytes - Computes s1·p1 + s2·p2; scalars scalarLen bytes, points pointLen bytes. Returns pointLen bytes. Throws on invalid input.
-
mult(
List< int> scalar, List<int> point) → BuBytes -
Scalar-times-point;
scalaris scalarLen bytes,pointis pointLen bytes. Returns pointLen bytes. Throws on invalid input. -
multBase(
List< int> scalar) → BuBytes -
Scalar-times-generator;
scalaris scalarLen bytes. Returns pointLen bytes. Throws on invalid scalar/point. -
neg(
List< int> point) → BuBytes - Point negation; pointLen bytes. Returns pointLen bytes. Throws on invalid encoding.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
scAdd(
List< int> a, List<int> b) → BuBytes - Scalar addition mod n; both scalarLen bytes. Returns scalarLen bytes. Throws on invalid scalar.
-
scCheck(
List< int> scalar) → bool -
True if
scalaris a canonically encoded scalar of scalarLen bytes, else false, never throws for length mismatch. -
scMul(
List< int> a, List<int> b) → BuBytes - Scalar multiplication mod n; both scalarLen bytes. Returns scalarLen bytes. Throws on invalid scalar.
-
scNeg(
List< int> s) → BuBytes - Scalar negation mod n; scalarLen bytes. Returns scalarLen bytes. Throws on invalid scalar.
-
scReduce(
List< int> s) → BuBytes -
Reduces arbitrary-length
smod n. Returns scalarLen bytes. Throws on empty input. -
scSub(
List< int> a, List<int> b) → BuBytes - Scalar subtraction mod n; both scalarLen bytes. Returns scalarLen bytes. Throws on invalid scalar.
-
sub(
List< int> a, List<int> b) → BuBytes - Point subtraction; both pointLen bytes. Returns pointLen bytes. Throws on invalid encoding.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited