ElGamal publickey encryption
The ElGamal publickey encryption scheme can be viewed as DiffieHellman key agreement in key transfer mode. Its security is based on the intractability of the discrete logarithm problem and the DiffieHellman problem. The basic ElGamal and generalized ElGamal encryption schemes are described in this section.
Proof that decryption works. The decryption of Algorithm allows recovery of original plaintext because
