public static SECPPublicKey create(
      final SECPPrivateKey privateKey, final ECDomainParameters curve, final String algorithm) {
    BigInteger privKey = privateKey.getEncodedBytes().toUnsignedBigInteger();

    /*
     * TODO: FixedPointCombMultiplier currently doesn't support scalars longer than the group
     * order, but that could change in future versions.
     */
    if (privKey.bitLength() > curve.getN().bitLength()) {
      privKey = privKey.mod(curve.getN());
    }

    final ECPoint point = new FixedPointCombMultiplier().multiply(curve.getG(), privKey);
    return SECPPublicKey.create(
        Bytes.wrap(Arrays.copyOfRange(point.getEncoded(false), 1, 65)), algorithm);
  }
Create secp public key.

@param privateKey the private key
@param curve the curve
@param algorithm the algorithm
@return the secp public key
crypto/algorithms/src/main/java/org/hyperledger/besu/crypto/SECPPublicKey.java