El_Gamal is a public-key cryptosystem technique was designed by Dr. Taher Elgamal .
El_Gamal depends on the one way function, means that the encryption and decryption are done in separate functions.
Sender B must do the following :
1- Obtain the public key (p , a , d ) from the receiver A.
2- Choose an integer k such that : 1 < k < p-2
3- Represent the plaintext as an integer m where 0 < m < p-1
4- compute (y) as follows : y = ak mod p
5- compute (z) as follows : z = (dk * m ) mod p
6- Find the ciphertext (C) as follows : C= ( y , z )
7- The sender B send C to The receiver A .
Receiver A must do the following :
1- Obtain the ciphertext (C) from B.
2- compute (r) as follows : r = yp-1-x mod p.
3- Recover the plaintext as follows: m = ( r * z ) mod p