Computational cryptography › Public-key encryption and key exchange › Classical number theory › Elliptic-curve discrete log
PUBLIC-KEY ENCRYPTIONPrimitive

ElGamal encryption

In plain words

An early public-key encryption built on Diffie-Hellman. Encrypted messages can be reshuffled and combined.

The idea: The recipient's public key is h = g^x. To encrypt, pick a fresh random r, send g^r, and multiply the message by h^r, which is the Diffie-Hellman secret between g^r and h. Only the holder of x can compute h^r from g^r and divide it out. Nothing is run backwards: even the recipient never learns r, so unlike RSA there is no trapdoor. Because every encryption uses a new r, the same message looks different each time, and anyone can re-randomize a ciphertext, which voting systems use to shuffle ballots so they can't be traced.

Why it matters: Popular in electronic voting systems.

The details

On the map: re-randomizable

Encrypt m to the public key h = g^x as the pair (g^r, m × h^r) for a fresh random r[1]. It hides the message under decisional Diffie-Hellman.

Decryption inverts nothing: the key holder computes (g^r)^x = h^r and divides it out, and r stays hidden, even from them. So ElGamal itself is not a trapdoor function. It still falls if trapdoor functions are impossible: decisional DH yields one through a different, cleverer construction[2], which is why that box carries the TD tag.

Ciphertexts can be re-randomized and multiplied together, handy for e-voting mix-nets[3] and threshold decryption. For general-purpose encryption, ECIES/HPKE is used instead.

Rests on

If any of these breaks, this breaks too.

If it falls

If this breaks, these break with it.

Nothing on the map depends on it: it is an end point, something people use directly.

References

  1. Taher ElGamal. A Public Key Cryptosystem and a Signature Scheme Based on Discrete Logarithms. Advances in Cryptology, 1985. doi:10.1007/3-540-39568-7_2
  2. Chris Peikert and Brent Waters. Lossy trapdoor functions and their applications. Proceedings of the fortieth annual ACM symposium on Theory of computing, 2008. doi:10.1145/1374376.1374406
  3. David L. Chaum. Untraceable electronic mail, return addresses, and digital pseudonyms. Communications of the ACM, 1981. doi:10.1145/358549.358563