Elgamal cryptographic system is a public-key algorithm based on discrete logarithm.
Elgamal cryptographic system is used in digital signature standard (DSS).
Elgamal Cryptographic algorithm There are prime number q and primitive root of \(q = a\).
User A want to generate private and public keys as the following:
1- Generate a random integer \({X}_ {a}\) such that 1 < \({X}_{a}\) < \(q-1\).
2- Compute \({Y}_{a}=a^{{X}_{a}} mod(q)\).
\({X}_{a}\) is A’s private key and (q,a,\({Y}_{a}\)) is A’s public key.