Cryptography, Cybersecurity.
to p): import sys def issafe(g,p): exp=1 rand=g next = rand % p while (next != 1 ): next = (next*rand) % p exp = exp+1 if (exp==p-1): return True else: return False p=11 g=4 if (len(sys.argv)>1): p=int(sys.argv[1]) if (len(sys.argv)>2): g=int(sys.argv[2]) print ("Is g={0} safe for p={1}?