The ElGamal signature scheme is a
digital signature
A digital signature is a mathematical scheme for verifying the authenticity of digital messages or documents. A valid digital signature, where the prerequisites are satisfied, gives a recipient very high confidence that the message was created b ...
scheme which is based on the difficulty of computing
discrete logarithm
In mathematics, for given real numbers ''a'' and ''b'', the logarithm log''b'' ''a'' is a number ''x'' such that . Analogously, in any group ''G'', powers ''b'k'' can be defined for all integers ''k'', and the discrete logarithm log''b' ...
s. It was described by
Taher Elgamal
Taher Elgamal (Arabic: طاهر الجمل) (born 18 August 1955) is an Egyptian cryptographer and entrepreneur. He has served as the Chief Technology Officer (CTO) of Security at Salesforce since 2013. Prior to that, he was the founder and CEO ...
in 1985.
[ (conference version appeared in ]CRYPTO
Crypto commonly refers to:
* Cryptocurrency, a type of digital currency secured by cryptography and decentralization
* Cryptography, the practice and study of hiding information
Crypto or Krypto may also refer to:
Cryptography
* Cryptanalysis, ...
'84, pp. 10–18)
The ElGamal signature algorithm is rarely used in practice. A variant developed at the
NSA
The National Security Agency (NSA) is a national-level intelligence agency of the United States Department of Defense, under the authority of the Director of National Intelligence (DNI). The NSA is responsible for global monitoring, collectio ...
and known as the
Digital Signature Algorithm
The Digital Signature Algorithm (DSA) is a Public-key cryptography, public-key cryptosystem and Federal Information Processing Standards, Federal Information Processing Standard for digital signatures, based on the mathematical concept of modular e ...
is much more widely used. There are several other variants. The ElGamal signature scheme must not be confused with
ElGamal encryption
In cryptography, the ElGamal encryption system is an asymmetric key encryption algorithm for public-key cryptography which is based on the Diffie–Hellman key exchange. It was described by Taher Elgamal in 1985. ElGamal encryption is used in th ...
which was also invented by Taher Elgamal.
Overview
The ElGamal signature scheme is a digital signature scheme based on the algebraic properties of modular exponentiation, together with the discrete logarithm problem. The algorithm uses a key pair consisting of a public key and a private key. The private key is used to generate a digital signature for a message, and such a signature can be verified by using the signer's corresponding public key. The digital signature provides message authentication (the receiver can verify the origin of the message), integrity (the receiver can verify that the message has not been modified since it was signed) and non-repudiation (the sender cannot falsely claim that they have not signed the message).
History
The ElGamal signature scheme was described by
Taher Elgamal
Taher Elgamal (Arabic: طاهر الجمل) (born 18 August 1955) is an Egyptian cryptographer and entrepreneur. He has served as the Chief Technology Officer (CTO) of Security at Salesforce since 2013. Prior to that, he was the founder and CEO ...
in 1985.
Operation
The scheme involves four operations: key generation (which creates the key pair), key distribution, signing and signature verification.
Key generation
Key generation has two phases. The first phase is a choice of algorithm parameters which may be shared between different users of the system, while the second phase computes a single key pair for one user.
Parameter generation
* Choose a key length
.
* Choose a
-bit
prime number
A prime number (or a prime) is a natural number greater than 1 that is not a product of two smaller natural numbers. A natural number greater than 1 that is not prime is called a composite number. For example, 5 is prime because the only ways ...
* Choose a
cryptographic hash function
A cryptographic hash function (CHF) is a hash algorithm (a map of an arbitrary binary string to a binary string with fixed size of n bits) that has special properties desirable for cryptography:
* the probability of a particular n-bit output re ...
with output length
bits. If
, only the leftmost
bits of the hash output are used.
* Choose a
generator
Generator may refer to:
* Signal generator, electronic devices that generate repeating or non-repeating electronic signals
* Electric generator, a device that converts mechanical energy to electrical energy.
* Generator (circuit theory), an eleme ...
of the
multiplicative group of integers modulo ''p'',
.
The algorithm parameters are
. These parameters may be shared between users of the system.
Per-user keys
Given a set of parameters, the second phase computes the key pair for a single user:
* Choose an integer
randomly from
.
* Compute
.
is the private key and
is the public key.
Key distribution
The signer should send the public key
to the receiver via a reliable, but not necessarily secret, mechanism. The signer should keep the private key
secret.
Signing
A message
is signed as follows:
* Choose an integer
randomly from
with
relatively prime to
.
* Compute
.
* Compute
.
* In the unlikely event that
start again with a different random
.
The signature is
.
Verifying a signature
One can verify that a signature
is a valid signature for a message
as follows:
* Verify that