Primality Testing Tests based on Fermat's little theorem and Miller-Rabin algorithm to check a number for primality.