Search This Blog

Wednesday, July 29, 2009

algorithm ElGamal public key cryptography

P { margin-bottom: 0.08in } -Our lives at this time influenced by cryptography. From transactions in the ATM machine, hold a conversation via telephone, Internet access, until the missile control using cryptography. Once the importance of cryptography for security information (Information Security), so that when talking about security problems associated with the use of computer, so can not be separated from the cryptography.

One of the algorithms used for encryption and discussed in this article are ElGamal algorithm. This algorithm emphasizes the problems mathematics algorithms. Problems with the ElGamal encryption chipertext results will be very difficult in kriptanalis.

The problems raised in this article are:

  1. How to generate random numbers (prime and not prime) to be the key cryptography in the system?
  2. How to publish public key and private key to hide?
  3. How do I calculate a exponent operation that produces an integer that is very large so that can not be saved by any type of data in a resource program (JAVA)?
  4. How do I calculate the modulo operation of an integer is very large?
  5. How do I calculate the inversion modulo operation of an integer is very large?
  6. How to plain text character conversion chiper text or otherwise using the ASCII table, where the maximum number of ASCII characters must be a prime?
Problems in discrite Algorithm El Gamal is: if p is a prime and g and y is any integer. Find x so that g ^ x ≡ y (mod p). Scale used in the El Gamal is:
1. The prime p (not secret)
2. Random number, g (g

Elgamal algorithm algorithm is one of the public-key cryptography is created by Taher ElGamal in 1984. In the algorithm is generally used for digital signatures, but then modified so that it can also be used for encryption and description.

Encryption process is as follows:

  • Encryption
  1. Plainteks organized into blocks of m1, m2, ..., so that each block represents the value in the range 0 to p - 1.
  2. Select a random number k, which in this case 0
  3. Each block is encrypted with the formula m
  4. a = g^k mod p (1)
  5. b = y^km mod p (2)
  6. Pair a and b are cipherteks to block the message m. Thus, the size ciphertext twice its size plainteks.
  • Decryption
  1. For a and b mendekripsi use a secret key, x, and m plainteks be back with the equality
    m = b / a^x mod p (3)
    mathematics from the equation above can be plainteks that can be returned with the pair a and b
Making a System
Here is a flowchart used in Agoritma ElGamal:

The first prime number p randomly resurrected. Numbers p Range data is used as a reference for plainteks and chiper text. Eg reference to the ASCII code 0 - 256 then the p value is 257.
After that raised random value g and x. X is the value of private key can be raised up so the user wishes and do not have to be random. Terms of generation g and the value of x is:




After the countdown y (public key) to call a function to calculate the y value of the shipment paremeter g, x, and p. After we made the key y g, y, p as a public key and private key as x.

After determining the key encryption process is complete then the message begins with a special encryption function call with parameter m post plain text and key - public key.

After the encryption then email is sent to the destination email. Chiper text size 2X plain text. Once the recipient receives the email in the text chiper decryption with the decryption function with parameters that are sent chiper text. The process of decryption will be done by using the private key of the recipient email (x).

Operation in the a and y is the same value pangkatnya just different. In the a, g dipangkatkan with k while the y, g dipangkatkan with x.

Encryption algorithm from the above looks simple. However, there are complex issues that matter for inclusion in the program code. This is because the algorithm ElGamal operation perpangkatan and modulo the number that large. For example eg in the y and a:
If p = 223 g = 13 x = 131 and k = 127



Above problems can be overcome with the addition of the concept of chaining or divide and conquer

Decryption
Decryption formula is as follows:

formula derived above need to be counted as regular as if it will result in a decimal value. In fact the value in the ASCII table is always integer. So 1 / (a^x) will be downgraded to


Results obtained in decryption is the same value of mj mj with a value that is sent before encryption

the sender does not need to know the private key of the goal. Simply use the public key issued by the Email recipient. With the mathematics diskrit Chipper results obtained a text which does not contain any information on if taken by the man in the middle. That can perform decryption of the text Chipper only party that has a private key or know the purpose of email.










Calendar