Implementation of Diffie-Hellman public key protocol in Python
Diffie, W., & Hellman, M. (1976). New directions in cryptography. IEEE transactions on Information Theory, 22(6), 644-654.
The program DH.py has a function called generators() that finds all generators of the multiplicative group of integers modulo n; and hence, its complexity is exponential.