🌑

Explore / Study / Computer Science / Cryptography 1.2k words | 7 minutes

§15 Public Key Encryption, CCA Security, and El Gamal Encryption

  1. Public-Key Encryption
    1. Eavesdropping Indistinguishability Experiment PubK⁡A,Πeav(n)\operatorname{PubK}_{\mathscr{A}, \Pi}^{\mathrm{eav}}(n)PubKA,Πeav​(n)
    2. Computational (EAV) Security in the Public Key setting
    3. CPA Security in the Public Key setting
    4. Insecurity of Deterministic Public-Key Encryption
    5. Impossibility of Perfectly Secret Public-Key Encryption
    6. Multiple message security
  2. CCA Security
    1. CCA Indistinguishability Experiment PubK⁡A,Πcca(n)\operatorname{PubK}_{\mathscr{A}, \Pi}^{\mathrm{cca}}(n)PubKA,Πcca​(n)
    2. CCA Security in the Public Key setting
  3. El Gamal Encryption
    1. Lemma underlying El Gamal encryption
    2. El Gamal Encryption Scheme
    3. Security of El Gamal encryption scheme

Public-Key Encryption

  • A public-key encryption scheme is a triple of probabilistic polynomial-time algorithms (Gen,Enc,Dec)(Gen, Enc, Dec) such that:
    • GenGen is the key generation algorithm that takes as input the security parameter 1n1^n and outputs the public-private key pair (pk,sk)(pk, sk). We assume that pkpk and sksk each have length n\ge n, and that nn can be determined from pk,skpk, sk.
    • EncEnc is the encryption algorithm that takes as input a public key pkpk and a message mMm \in \mathscr{M}. It outputs a ciphertext cc, we write this as cEncpk(m)c \leftarrow Enc_{pk}(m).
    • DecDec is the decryption algorithm that takes as input a private key sksk and a ciphertext cc, and outputs a message mm or \perp. We write this as m:=Decsk(c)m := Dec_{sk}(c).

Eavesdropping Indistinguishability Experiment PubKA,Πeav(n)\operatorname{PubK}_{\mathscr{A}, \Pi}^{\mathrm{eav}}(n)

  • Given a public-key encryption scheme Π=(Gen,Enc,Dec)\Pi = (Gen, Enc, Dec) and an adversary A\mathscr{A}, we define the eavesdropping indistinguishability experiment PubKA,Πeav(n)\operatorname{PubK}_{\mathscr{A}, \Pi}^{\mathrm{eav}}(n) as follows:
    1. Gen(1n)Gen(1^n) is run to obtain keys (pk,sk)(pk, sk).
    2. Adversary A\mathscr A is given pkpk, and outputs a pair of equal-length messages m0,m1m_0, m_1 belonging to the message space M\mathscr{M}.
    3. A uniform bit b{0,1}b \in \{0,1\} is chosen, and a ciphertext cEncpk(mb)c \leftarrow Enc_{pk}(m_b) is computed and given to A\mathscr{A}. We call cc the challenge ciphertext.
    4. A\mathscr{A} outputs a bit bb'. The output of the experiment is 11 if b=bb' = b, and 00 otherwise. If b=bb' = b, we say that A\mathscr{A} succeeds.

Computational (EAV) Security in the Public Key setting

  • Definition. A public-key encryption scheme Π=(Gen,Enc,Dec)\Pi = (Gen, Enc, Dec) has indistinguishable encryptions in the presence of an eavesdropper if for all probabilistic polynomial-time adversaries A\mathscr{A}, there is a negligible function ϵ\epsilon such that

    Pr[PubKA,Πeav(n)=1]12+ϵ(n)\Pr\left[\operatorname{PubK}_{\mathscr{A}, \Pi}^{\mathrm{eav}}(n)=1\right] \le \frac{1}{2}+\epsilon(n)

CPA Security in the Public Key setting

  • Proposition. If a public-key encryption scheme has indistinguishable encryptions in the presence of an eavesdropper, then it is CPA-secure.

Insecurity of Deterministic Public-Key Encryption

  • Theorem: No deterministic public-key encryption scheme is CPA-secure.

Impossibility of Perfectly Secret Public-Key Encryption

  • Prop. There is no perfectly secret public-key encryption. Unbounded attackers can always figure out mm given c,pkc, pk.

Multiple message security

  • Theorem. If a public-key encryption scheme Π\Pi is CPA-secure, then it also has indistinguishable multiple encryptions.

CCA Security

CCA Indistinguishability Experiment PubKA,Πcca(n)\operatorname{PubK}_{\mathscr{A}, \Pi}^{\mathrm{cca}}(n)

  • Given a public-key encryption scheme Π=(Gen,Enc,Dec)\Pi = (Gen, Enc, Dec) and an adversary A\mathscr{A}, we define the CCA indistinguishability experiment PubKA,Πcca(n)\operatorname{PubK}_{\mathscr{A}, \Pi}^{\mathrm{cca}}(n) as follows:
    1. Gen(1n)Gen(1^n) is run to obtain keys (pk,sk)(pk, sk).

    2. Adversary A\mathscr{A} is given pkpk, and access to a decryption oracle Decsk()Dec_{sk}( \cdot ).

      It outputs a pair of messages m0,m1m_0, m_1 of the same length, belonging to the message space M\mathscr{M}.

    3. A uniform bit b{0,1}b \in \{0,1\} is chosen, and then a ciphertext cEncpk(mb)c \leftarrow Enc_{pk}(m_b) is computed and given to A\mathscr{A}. We call cc the challenge ciphertext.

    4. A\mathscr{A} continues to interact with the decryption oracle, but may not request a decryption of cc itself. Finally, A\mathscr{A} outputs a bit bb'.

    5. A\mathscr{A} succeeds and the output of the experiment is 11 if b=bb' = b, and 00 otherwise.

CCA Security in the Public Key setting

  • Definition. A public-key encryption scheme Π=(Gen,Enc,Dec)\Pi = (Gen, Enc, Dec) has indistinguishable encryptions under a chosen-ciphertext attack, or is CCA-secure, if for all probabilistic polynomial-time adversaries A\mathscr{A}, there exists a negligible function ϵ\epsilon such that

    Pr[PubKA,Πcca(n)]12+ϵ(n)\Pr\left[\operatorname{PubK}_{\mathscr{A}, \Pi}^{\mathrm{cca}}(n)\right] \le \frac{1}{2}+\epsilon(n)

El Gamal Encryption

Lemma underlying El Gamal encryption

  • Lemma. Let G\mathbb{G} be a finite group, and let mGm \in \mathbb{G} be arbitrary. Then, choosing uniform kGk \in \mathbb{G}, and setting c:=kmc := k \cdot m gives the same distribution for cc as choosing uniform cGc \in \mathbb{G}. That is, for any g^G\hat{g} \in \mathbb{G}, we have Pr[km=g^]=1G\displaystyle \Pr [k ⋅ m = \hat{g}] = \frac{1}{ |\mathbb{G}|} where the probability is over uniform choice of kGk \in \mathbb{G}.

El Gamal Encryption Scheme

  1. Gen(1n)Gen(1^n): On input 1n1^n, run G(1n)\mathscr{G}(1^n) to obtain (G,q,g)(\mathbb{G}, q, g). Choose uniform xZqx \in \mathbb{Z}_q, compute h:=gxh := g^x

    The public key is G,q,g,h\langle \mathbb{G}, q, g, h \rangle, and the secret private key is G,q,g,x\langle \mathbb{G}, q, g, x \rangle.

    The message space is G\mathbb{G}.

  2. Encpk(m)Enc_{pk}(m): Given as inputs the public key pk=G,q,g,hpk = \langle \mathbb{G}, q, g, h \rangle, and message mGm \in \mathbb{G}, choose uniform yZqy \in \mathbb{Z}_q.

    Output the ciphertext c1,c2=gy,hym\langle c_1, c_2 \rangle = \langle g^y, h^y \cdot m\rangle.

  3. Decsk(c1,c2)Dec_{sk}(c_1, c_2): Given as inputs the private key sk=G,q,g,xsk = \langle \mathbb{G}, q, g, x \rangle, and ciphertext c1,c2\langle c_1, c_2 \rangle.

    Output m^:=c2c1x\displaystyle \hat{m}:=\frac{c_2}{c^x_1}.

Security of El Gamal encryption scheme

  • Theorem. If the DDH problem is hard relative to G\mathscr{G}, then the El Gamal encryption scheme is CPA-secure.

— Mar 28, 2023

Creative Commons License
§15 Public Key Encryption, CCA Security, and El Gamal Encryption by Lu Meng is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Permissions beyond the scope of this license may be available at About.