In cryptography, the ElGamal encryption system is an asymmetric key encryption algorithm for public-key cryptography which is based on the Diffie–Hellman key exchange. It was described by Taher Elgamal in 1985.[1] ElGamal encryption is used in the free GNU Privacy Guard software, recent versions of PGP, and other cryptosystems. The Digital Signature Algorithm (DSA) is a variant of the ElGamal signature scheme, which should not be confused with ElGamal encryption.
ElGamal encryption can be defined over any cyclic group , like multiplicative group of integers modulo n if and only if n is 1, 2, 4, pk or 2pk, where p is an odd prime and k > 0. Its security depends upon the difficulty of a certain problem in related to computing discrete logarithms.