ElGamal cryptosystem and cryptanalysis, with Pollard Rho factorization and Miller Rabin primality test