Cryptography, Python, Math, Mathematics, Diffie Hellman.
order of a divisor of p-1. That is, each element of (ℤ/pℤ)* has either order of 1, 2, (p-1)/2, or p-1. Next, PersonA and PersonB choose an integer g such that g generates (ℤ/pℤ)*. The process of finding a g that generates (ℤ/pℤ)* involves finding an element of order p-1. If 2 has order (p-1)/2,