Cryptography, Python, Math, Mathematics, Diffie Hellman.
four steps until a 29-digit pseudoprime is found. Let n be a random 29-digit integer. Compute the unique integers m and k such that m is odd and n-1 = m(2^k). Let a be a random integer such that 1<a<n. Let b = a^m (mod n) and 1≤r≤(k-1). If b ≡ ±1 (mod n) or b^(2^r)≡-1(mod n) for any r, then n is