Cryptography, Python, Math, Mathematics, Diffie Hellman.
from which all other functions stem from. It ensures that a pseudoprime is found that can be used for the Diffie-Hellman Key Exchange. That is, p and (p-1)/2 are pseudoprime. It also ensures that 2 has order (p-1)/2. Simulating PersonA and PersonB With a Person Object: To implement the remaining