Point class

Constructors

Point(BigInt px, BigInt py, BigInt pz)
3d=less inversions
const

Properties

hashCode int
The hash code for this object.
no setterinherited
px BigInt
final
py BigInt
final
pz BigInt
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(Point other) Point
Point addition: P+Q, complete, exception
affinePoint() AffinePoint
Convert point to 2d xy affine point.
assertValidity() Point
Checks if the point is valid and on-curve
copy() Point
Make a copy of the point
double() Point
Point doubling: P+P, complete formula.
equals(Point other) bool
Equality check: compare points
mul(BigInt n, [bool safe = true]) Point
Point scalar multiplication.
mulAddQUns(Point R, BigInt u1, BigInt u2) Point
to private keys. Doesn't use Shamir trick Unsafe: do NOT use for stuff related
multiply(BigInt n) Point
Aliases to compress code
negate() Point
Flip point over y coord
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
ok() Point
toHex([bool isCompressed = true]) String
Encode point to hex string.
toRawBytes([bool isCompressed = true]) Uint8List
Encode point to Uint8Array.
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

BASE Point
Generator / base point
final
G Point
Alias for base point
final
I Point
Alias for identity point
final
ZERO Point
Identity / zero point
final

Static Methods

fromAffine(AffinePoint p) Point
Create a point from a AffinePoint
fromBytes(Uint8List bytes) Point
fromHex(String hex) Point
Create a point from Hex
fromPrivateKey(BigInt k) Point
Create point from a private key