31 Number-Theoretic Algorithms 31.1 Elementary number-theoretic notions 31.2 Greatest common divisor 31.3 Modular arithmetic 31.4 Solving modular linear equations 31.5 The Chinese remainder theorem 31.6 Powers of an element 31.7 The RSA public-key cryptosystem 31.8 Primality testing 31.9 Integer factorization Problems