@Override
  public boolean isValidPublicKey(final SECPPublicKey publicKey) {
    try {
      publicKeyAsEcPoint(publicKey);
    } catch (IllegalArgumentException e) {
      return false;
    }

    return true;
  }
Calculates an ECDH key agreement between the private and the public key.

@param privKey The private key.
@param theirPubKey The public key.
@return The agreed secret.
crypto/algorithms/src/main/java/org/hyperledger/besu/crypto/AbstractSECP256.java