Elgamal Encryption, Cybersecurity, Encryption, Cryptography.
import libnum import sys import hashlib def primitive_root(p_val: int) -> int: while True: g = random.randrange(3, p_val) if pow(g, 2, p_val) == 1: continue if pow(g, p_val, p_val) == 1: continue return g bits=512 M="hello" if (len(sys.argv)>1): M=sys.argv[1] if (len(sys.argv)>2):