Loading [MathJax]/jax/output/HTML-CSS/jax.js
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Engineering LibreTexts

15.3: ElGamal Encryption

( \newcommand{\kernel}{\mathrm{null}\,}\)

ElGamal encryption is a public-key encryption scheme that is based on DHKA.

Construction 15.6 (ElGamal)

The public parameters are a choice of cyclic group G with n elements and generator g.

fig-ch01_patchfile_01.jpg
Figure 15.3.1: Copy and Paste Caption here. (Copyright; author via source)

The scheme satisfies correctness, since for all M:

Dec(sk,Enc(pk,M))=Dec(sk,(gb,MAb))=(MAb)((gb)a)1=M(gab)(gab)1=M

Security

Imagine an adversary who is interested in attacking an ElGamal scheme. This adversary sees the public key A=ga and a ciphertext (gb,Mgab) go by. Intuitively, the Decisional Diffie-Hellman assumption says that the value gab looks random, even to someone who has seen ga and gb. Thus, the message M is masked with a pseudorandom group element - as we’ve seen before, this is a lot like masking the message with a random pad as in one-time pad. The only change here is that instead of the xor operation, we are using the group operation in G.

More formally, we can prove the security of ElGamal under the DDH assumption:

Claim 15.7

 

If the DDH assumption in group G is true, then ElGamal in group G is CPA$-secure.

Proof

It suffices to show that ElGamal has pseudorandom ciphertexts when the calling program sees only a single ciphertext. In other words, we will show that Lpk-ots$-real Lpk-ots$-rand, , where these libraries are the Lpk-cpa$- libraries from Definition 15.2 but with the single-ciphertext restriction used in Definition 15.4. It is left as an exercise to show that Lpk-ots$-real Lpk-ots$-rand  implies CPA$ security (which in turn implies CPA security); the proof is very similar to that of Claim 15.5.

The sequence of hybrid libraries is given below:

fig-ch01_patchfile_01.jpg
Figure 15.3.1: Copy and Paste Caption here. (Copyright; author via source)
The starting point is the Lpk-ots $-real library, shown here  with the details of ElGamal filled in.
fig-ch01_patchfile_01.jpg
Figure 15.3.1: Copy and Paste Caption here. (Copyright; author via source)
The main body of QUERY computes some intermediate values B and Ab. But since those lines are only reachable one time, it does not change anything to precompute them at initialization time.
fig-ch01_patchfile_01.jpg
Figure 15.3.1: Copy and Paste Caption here. (Copyright; author via source)
We can factor out the generation of A,B,C in terms of the Ldh-real library from the Decisional Diffie-Hellman security definition (Definition 14.5).
fig-ch01_patchfile_01.jpg
Figure 15.3.1: Copy and Paste Caption here. (Copyright; author via source)
Applying the security of DDH, we can replace Ldh-real  with Ldh-rand .
fig-ch01_patchfile_01.jpg
Figure 15.3.1: Copy and Paste Caption here. (Copyright; author via source)
The call to DHQUERY has been inlined.
fig-ch01_patchfile_01.jpg
Figure 15.3.1: Copy and Paste Caption here. (Copyright; author via source)
As before, since the main body of QUERY is only reachable once, we can move the choice of B and C into that subroutine instead of at initialization time.
fig-ch01_patchfile_01.jpg
Figure 15.3.1: Copy and Paste Caption here. (Copyright; author via source)
When b is sampled uniformly from Zn, the expression B=gb is a uniformly distributed element of G. Also recall that when C is a uniformly distributed element of G, then MC is uniformly distributed this is analogous to the one-time pad property (see Exercise 2.5). Applying this change gives the library to the left.

In the final hybrid, the response to QUERY is a pair of uniformly distributed group elements (B,X). Hence that library is exactly Lpk-ots$-rand, as desired.


This page titled 15.3: ElGamal Encryption is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Mike Rosulek (Open Oregon State) .

Support Center

How can we help?