ElGamal encryptionFrom CryptoDox, The Online Encyclopedia on Cryptography and Information SecurityThe 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 G. Its security depends upon the difficulty of a certain problem in G related to computing discrete logarithms.
AlgorithmElGamal consists of three components:
Key Generator
Encryption AlgorithmThe encryption algorithm works as follows: to encrypt a message m to Alice under her public key (G,q,g,h),
Decryption AlgorithmThe decryption algorithm works as follows: to decrypt a ciphertext (c1,c2) with her secret key x,
The decryption algorithm produces the intended message, since
If the space of possible messages is larger than the size of G, 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. External Links |




.
.
as the plaintext message.