ElGamal encryption for cryptography class assignment