x25519 library
Package curve25519 provides an implementation of the X25519 function, which performs scalar multiplication on the elliptic curve known as Curve25519. See RFC 7748.
Classes
- KeyPair
- KeyPair is the type of Curve25519 public/private key pair.
Constants
- PointSize → const int
-
PointSize is the size of the point input to X25519.
32
- ScalarSize → const int
-
ScalarSize is the size of the scalar input to X25519.
32
Functions
-
checkBasepoint(
) → void -
generateKeyPair(
) → KeyPair - GenerateKey generates a public/private key pair using entropy from secure random.
-
ScalarBaseMult(
List< int> dst, List<int> scalar) → void - ScalarBaseMult sets dst to the product scalar * base where base is the standard generator.
-
ScalarMult(
List< int> dst, List<int> scalar, List<int> point) → void - ScalarMult sets dst to the product scalar * point.
-
X25519(
List< int> scalar, List<int> point) → Uint8List - X25519 returns the result of the scalar multiplication (scalar * point), according to RFC 7748, Section 5. scalar, point and the return value are slices of 32 bytes.
-
x25519(
List< int> dst, List<int> scalar, List<int> point) → Uint8List