Adding Miller-Rabin implementation