Pollard Rho Implementation