secretKeyToPubKey static method

List<int> secretKeyToPubKey({
  1. required List<int> secretKey,
})

Implementation

static List<int> secretKeyToPubKey({required List<int> secretKey}) {
  if (CryptoOps.scCheck(secretKey) != 0) {
    throw const SquareRootError(
        "The provided scalar exceeds the allowed range.");
  }
  final List<int> pubKey = zero();
  final GroupElementP3 point = GroupElementP3();
  CryptoOps.geScalarMultBase(point, secretKey);

  CryptoOps.geP3Tobytes(pubKey, point);
  return pubKey;
}