Explanation of Rabin-Miller test and Fermat's little theorem.