ElGamal algorithm (c++)