FACTOID # 20: Brazil is the heliport capital of the world.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

SEARCH ALL

FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:

 

 

(* = Graphable)

 

 


Encyclopedia > ElGamal discrete log cryptosystem

The ElGamal algorithm is an asymmetric key encryption algorithm for public key cryptography which is based on discrete logarithms. It was created by Taher ElGamal. The ElGamal algorithm is used in the free GNU Privacy Guard software, recent versions of PGP, and other cryptosystems. The Digital Signature Algorithm, even though it is a signature scheme and performs no encryption, is similar to ElGamal in many respects.


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 logs (see below).

Contents

The algorithm

As with all asymmetric key encryption algorithms, ElGamal consists of three components: the key generator, the encryption algorithm, and the decryption algorithm.


The key generator works as follows:

  • Alice generates an efficient description of a cyclic group G of order q with generator g. See below for specific examples of how this can be done.
  • Alice chooses a random x from .
  • Alice computes h = gx.
  • Alice publishes h, along with the description of G,q,g, as her public key. Alice retains x as her secret key.

The encryption algorithm works as follows: to encrypt a message m to Alice under her public key (G,q,g,h),

  • Bob converts m into an element of G.
  • Bob chooses a random k from , then calculates c1 = gk and .
  • Bob sends the ciphertext (c1,c2) to Alice.

The decryption algorithm works as follows: to decrypt a ciphertext (c1,c2) with her secret key x,

  • Alice computes as the plaintext message.

Note that the decryption algorithm produces the intended message:



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.


Security

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 G. 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.


Generating the group G

As described above, ElGamal can be defined over any cyclic group G, and is secure if a certain computational assumption (the "DDH Assumption") about that group is true. Unfortunately, the straightforward use of G = Zp for a prime p is insecure, because the DDH Assumption is false in this group. (In contrast, note that computing discrete logs is believed to be hard in Zp, but this is not enough for the security of ElGamal.)


The two most popular types of groups used in ElGamal are subgroups of Zp and groups defined over certain elliptic curves. Here is one popular way of choosing an appropriate subgroup of Zp which is believed to be secure:

  • Choose a random large prime p such that p - 1 = kq for some small integer k and large prime q. This can be done, for example with k = 2, by first choosing a random large prime q and checking if p = 2q + 1 is prime.
  • Choose a random element such that and gq = 1mod p, i.e. such that g is of order q.
  • The group G is the subgroup of Zp generated by g, i.e. the set of kth residues mod p.

Note also that when encrypting, care must be taken to properly encode the message m as an element of G, and not, say, as just an arbitrary element of Zp.


Efficiency

Encryption under ElGamal requires two exponentiations; however, these exponentiations are independent of the message and can be computed ahead of time if need be. Decryption only requires one exponentiation (plus one division, which is typically much faster). Unlike in the RSA and Rabin systems, ElGamal decryption cannot be sped up via the Chinese remainder theorem.


Miscellaneous

Note that ElGamal is malleable in an extreme way: for example, given a encryption (c1,c2) of some (possibly unknown) message m, one can easily construct an encryption of the message 2m. 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.


References

  • Taher ElGamal, "A Public-Key Cryptosystem and a Signature Scheme Based on Discrete Logarithms", IEEE Transactions on Information Theory, v. IT-31, n. 4, 1985, pp469–472 or CRYPTO 84, pp10–18, Springer-Verlag.
  • Handbook of Applied Cryptography (http://www.cacr.math.uwaterloo.ca/hac/), contains a detailed description of ElGamal Algorithm in Chapter 8 (http://www.cacr.math.uwaterloo.ca/hac/about/chap8.pdf) (PDF file).

  Results from FactBites:
 
Taher Elgamal - Wikipedia, the free encyclopedia (337 words)
Taher Elgamal (Arabic: طاهر الجمل) (born 18 August 1955) is an Egyptian-American cryptographer.
In 1985, Elgamal published a paper titled A Public key Cryptosystem and A Signature Scheme based on discrete Logarithms in which he proposed the design of the ElGamal discrete log cryptosystem and of the ElGamal signature scheme.
Elgamal's surname has been spelled as two words (the El part is equivalent to "the" in English), and as a single word with an intra-capital.
ElGamal discrete log cryptosystem (268 words)
The ElGamal algorithm is an asymmetric key encryption algorithm for public key cryptography which is based on discrete logarithms.
ElGamal is a simple example of a semantically secure asymmetric key encryption algorithm.
Breaking ElGamal is, in most cases, at least as hard as solving the discrete logarithm problem.
  More results at FactBites »


 
 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms, 1022, m