ElGamal signature scheme 2026-10-05
For a prime number , primitive root and public key , choose a fresh secret coprime to , set and , and verify . Reusing the cryptographic nonce can reveal secret information. The unhashed historical construction allows existential forgery of specially chosen message exponents, so authentication claims require suitable hashing and protocol assumptions.
In the RSA cryptosystem, choose distinct large prime numbers , set , and choose coprime to . Choose with . A plaintext residue class is encrypted as and decrypted as . Fermat's little theorem modulo and , followed by the Chinese remainder theorem, proves correctness even when is not coprime to .
Textbook RSA cryptosystem is multiplicative: . For a chosen-ciphertext attack, multiply an intercepted by for a known invertible . A decryption oracle returns , from which multiplication by recovers . Likewise, multiplying two textbook RSA signatures produces a signature of their product. These are homomorphism attacks, exploiting algebra rather than factoring .
For an ElGamal signature, choose a prime , a primitive root modulo , a private exponent , and public . To sign a message digest , choose a fresh secret coprime to and set
Verification checks and , which follows because . Authenticating the ciphertext and its context with such a digital signature, before decryption, prevents the simple multiplicative modification from being accepted without a fresh valid signature. One needs an appropriate cryptographic hash function and fresh secret cryptographic nonces: this is not a claim that every algebraic attack is impossible. In particular, the unhashed historical ElGamal signature scheme admits existential forgeries of specially chosen message exponents; mere multiplication of encrypted messages is not an authentication mechanism.