This page uses content from Wikipedia and is licensed under CC BY-SA.
The ElGamal signature algorithm is rarely used in practice. A variant developed at NSA and known as the Digital Signature Algorithm is much more widely used. There are several other variants. The ElGamal signature scheme must not be confused with ElGamal encryption which was also invented by Taher ElGamal.
The ElGamal signature scheme allows a third-party to confirm the authenticity of a message.
These system parameters may be shared between users.
These steps are performed once by the signer.
To sign a message m the signer performs the following steps.
Then the pair (r,s) is the digital signature of m. The signer repeats these steps for every signature.
A signature (r,s) of a message m is verified as follows.
The verifier accepts a signature if all conditions are satisfied and rejects it otherwise.
The algorithm is correct in the sense that a signature generated with the signing algorithm will always be accepted by the verifier.
The signature generation implies
Hence Fermat's little theorem implies
A third party can forge signatures either by finding the signer's secret key x or by finding collisions in the hash function . Both problems are believed to be difficult. However, as of 2011 no tight reduction to a computational hardness assumption is known.
The signer must be careful to choose a different k uniformly at random for each signature and to be certain that k, or even partial information about k, is not leaked. Otherwise, an attacker may be able to deduce the secret key x with reduced difficulty, perhaps enough to allow a practical attack. In particular, if two messages are sent using the same value of k and the same key, then an attacker can compute x directly.
Another more serious attack: Given attacker can attempt to solve for unknown x,k such that This involves solving linear equation in 2 variables and can discover private key from just 1 signature.
The original paper did not include a hash function as a system parameter. The message m was used directly in the algorithm instead of H(m). This enables an attack called existential forgery, as described in section IV of the paper. Pointcheval and Stern generalized that case and described two levels of forgeries:
Improved version (with a hash) is known as Pointcheval–Stern signature algorithm