Public API for ed25519_dart.
Constants
- baseX → dynamic
-
15112221349535400772501151409588531511454012693041857206046113283949847762202
- baseY → dynamic
-
46316835694926478169428394003475163141307993866256225615783033603165251855960
- bits → dynamic
-
256
- d → dynamic
-
37095705934669439343138083508754565189542113879843219016388785533085940283555
- I → dynamic
-
19681161376707505956807079304988542015446066515923890162744021073123829784752
- mask → dynamic
-
28948022309329048855892746252171976963317496166410141009864396001978282409976
- primeL → dynamic
-
7237005577332262213973186563042994240857116359379907606001950938285454250989
- primeQ → dynamic
-
57896044618658097711785492504343953926634992332820282019728792003956564819949
Properties
- basePoint → List<int>
-
read / write
Functions
-
bitClamp(
Uint8List bytes) → Uint8List -
Clamps the lower and upper bits as required by the specification. Returns
bytes
with clamped bits. Length of thebytes
should be at least 32. -
bytesFromList(
List<int> lst) → Uint8List -
Returns
Uint8List
created fromlst
. Shortcut to avoid constructor duplication. -
bytesToInteger(
List<int> bytes) → int -
Converts
bytes
into fixed-size integer.bytes
length should be at least 32. -
decodePoint(
int intVal) → List<int> -
Converts integer
intVal
intox, y
point. -
edwards(
List<int> P, List<int> Q) → List<int> -
Adds points on the Edwards curve. Returns sum of points.
-
encodePoint(
List<int> P) → Uint8List -
Encodes point
P
intoUint8List
. -
Hash(
Uint8List m) → Uint8List -
Returns digest message of SHA-512 hash function. Digest message is result of hashing message
m
. -
integerToBytes(
int e, int length) → Uint8List -
Converts integer
e
intoUint8List
with lengthlength
. -
isOnCurve(
List<int> P) → bool -
Returns
bool
that that indicates if pointP
is on curve. -
modularInverse(
int z) → int -
Returns the modular multiplicative inverse of integer
z
and modulo primeQ. -
modularPow(
int x, int p) → int -
Returns integer
x
to the power ofpow(2, p)
with modulo primeQ. -
publicKey(
Uint8List sk) → Uint8List -
Generates public key from given secret key
sk
. Public key isUint8List
with size 32. -
scalarMult(
List<int> P, int e) → List<int> -
Returns result of scalar multiplication of point
P
by integere
. -
secretKey(
) → Uint8List -
Generates random secret key. Secret key is
Uint8List
with length 64. -
sign(
Uint8List message, Uint8List secretKey, Uint8List pubKey) → Uint8List -
Creates signature for message
message
by using secret keysecretKey
and public keypubKey
. Signature isUint8List
with size 64. -
verifySignature(
Uint8List signature, Uint8List message, Uint8List pubKey) → bool -
Verifies given signature
signature
with messagemessage
and public keypubKey
. Returnsbool
that indicates if verification is successful. -
xRecover(
int y) → int -
Recovers coordinate
x
by given coordinatey
. Returns recoveredx
.