Cryptography, Python, Math, Mathematics, Diffie Hellman.
Test. Returns a random integer Z such that lowerBound≤Z≤upperBound. MRPrimalityTest(): Continues to perform the Miller-Rabin Primality Test on random 29-digit integers until a pseudoprime is found. isPrime(n): Performs the Miller-Rabin Primality Test on (p-1)/2. chooseP(): This is the main function