Use Pollard's Rho algorithm.