private PublicKey convertPublicKey(final SECPPublicKey publicKey) {
    try {
      return new PublicKeyImpl(
          ECPointUtil.fromBouncyCastleECPoint(signatureAlgorithm.publicKeyAsEcPoint(publicKey)));
    } catch (final Exception e) {
      throw new SecurityModuleException(
          "Unexpected error while converting ECPoint: " + e.getMessage(), e);
    }
  }
Instantiates a new Key pair security module.

@param keyPair the key pair
crypto/services/src/main/java/org/hyperledger/besu/cryptoservices/KeyPairSecurityModule.java