Let be a finite group, and let be arbitrary. Then choosing uniform and setting gives the same distribution for as choosing uniform Put differently, for any we have
where the probability is taken over uniform choice of
By Taher El Gamal in 1985
If the DDH problem is hard relative to then the El Gamal encryption scheme is CPA -secure.
Let denote the El Gamal encryption scheme. We prove that has indistinguishable encryptions in the presence of an eavesdropper; this implies it is CPA-secure.
: Choosing uniform and outputting the ciphertext
: Given as input, where and is either or .
set and run to obtain two messages
Choose a uniform bit and set and
Give the ciphertext to and obtain an output bit If output otherwise, output 0
Case 1:
Case 2:
Under the assumption that the DDH problem is hard relative to there is a negligible function negl such that
So