secretKeyToPubKey static method
generate public key from valid secret scalar bytes.
Implementation
static List<int> secretKeyToPubKey({required List<int> secretKey}) {
if (CryptoOps.scCheck(secretKey) != 0) {
throw ArgumentException.invalidOperationArguments(
"secretKeyToPubKey",
name: "secretKey",
reason: "Invalid ED25519 secret key bytes.",
);
}
final List<int> pubKey = zero();
final GroupElementP3 point = GroupElementP3();
CryptoOps.geScalarMultBase(point, secretKey);
CryptoOps.geP3Tobytes(pubKey, point);
return pubKey;
}