The ElGamal algorithm is an asymmetric key encryption algorithm for public key cryptography which is based on Diffie-Hellman key agreement. It was described by Taher Elgamal in 1984. The ElGamal algorithm is used in the free GNU Privacy Guard software, recent versions of PGP, and other cryptosystems. The Digital Signature Algorithm is a variant of the ElGamal signature scheme, which should not be confused with the ElGamal algorithm.
ElGamal can be defined over any cyclic group . Its security depends upon the difficulty of a certain problem in related to computing discrete logarithms (see below).
The key generator works as follows:
The encryption algorithm works as follows: to encrypt a message to Alice under her public key ,
The decryption algorithm works as follows: to decrypt a ciphertext with her secret key ,
The decryption algorithm produces the intended message, since
If the space of possible messages is larger than the size of , then the message can be split into several pieces and each piece can be encrypted independently. Typically, however, a short key to a symmetric-key cipher is first encrypted under ElGamal, and the (much longer) intended message is encrypted more efficiently using the symmetric-key cipher — this is termed hybrid encryption.
ElGamal is a simple example of a semantically secure asymmetric key encryption algorithm (under reasonable assumptions). It is probabilistic, meaning that a single plaintext can be encrypted to many possible ciphertexts, with the consequence that a general ElGamal encryption produces a 2:1 expansion in size from plaintext to ciphertext.
ElGamal's security rests, in part, on the difficulty of solving the discrete logarithm problem in . Specifically, if the discrete logarithm problem could be solved efficiently, then ElGamal would be broken. However, the security of ElGamal actually relies on the so-called Decisional Diffie-Hellman (DDH) assumption. This assumption is often stronger than the discrete log assumption, but is still believed to be true for many classes of groups.
As described above, ElGamal can be defined over any cyclic group , and is secure if a certain computational assumption (the "DDH Assumption") about that group is true. Unfortunately, the straightforward use of for a prime is insecure, because the DDH Assumption is false in this group. In contrast, computing discrete logs is believed to be hard in , but this is not enough for the security of ElGamal.
The two most popular types of groups used in ElGamal are subgroups of and groups defined over certain elliptic curves. Here is one popular way of choosing an appropriate subgroup of which is believed to be secure:
When encrypting, care must be taken to properly encode the message as an element of , and not, say, as just an arbitrary element of .
Encryption under ElGamal requires two exponentiations; however, these exponentiations are independent of the message and can be computed ahead of time if need be. The ciphertext is twice as long as the plaintext, which is a disadvantage as compared to some other algorithms. Decryption only requires one exponentiation (instead of division, exponentiate to ). Unlike in the RSA and Rabin systems, ElGamal decryption cannot be sped up via the Chinese remainder theorem.
ElGamal is malleable in an extreme way: for example, given an encryption of some (possibly unknown) message , one can easily construct an encryption of the message . Therefore ElGamal is not secure under chosen ciphertext attack. On the other hand, the Cramer-Shoup system (which is based on ElGamal) is secure under chosen ciphertext attack.
ElGamal | Elgamal-Kryptosystem | Cryptosystème de ElGamal | ElGamal暗号 | ElGamal | Elgamal
This article is licensed under the GNU Free Documentation License.
It uses material from the
"ElGamal encryption".
Home Page • arts • business • computers • games • health • hospitals • home • kids & teens • news • physicians • recreation• reference • regional • science • shopping • society • sports • world