given a short term public key from a given party calculate the next
message in the agreement sequence.
DHPublicKeyParameters pub = (DHPublicKeyParameters)pubKey;
if (!pub.getParameters().equals(dhParams))
{
throw new IllegalArgumentException("Diffie-Hellman public key has wrong parameters.");
}
return pub.getY().modPow(key.getX(), dhParams.getP());