Public key encryption

A public key encryption (PKE) scheme allows anyone to encrypt a message to a receiver using a public key, while the holder of the corresponding secret key can decrypt. Its security notions specify what an adversary can learn about the message, allowing leakage of its length.

Syntax

A PKE scheme is a tuple of efficient algorithms with respect to secret keyspace , public keyspace , message space , and ciphertext space :

  • is a randomized algorithm which samples a secret key and public key ,
  • is a randomized algorithm which takes a public key and message , outputting a ciphertext ,
  • is a deterministic algorithm which takes a secret key and ciphertext , outputting a message or to indicate an invalid ciphertext.

is randomized because a correct scheme with deterministic is not CPA-secure, under the conditions stated there: holding , the adversary encrypts a candidate message itself and compares the result with the challenge.

Every PKE scheme on this page is -correct, as defined under Correctness, for a negligible function , and for every its message space contains two distinct messages of equal length that an efficient algorithm outputs on input , or on input when the message space depends on the public key, as in group-based schemes, as and with do. Without correctness, a scheme whose ignores its message meets every security notion below, and without two such messages so does the scheme that outputs in the clear.

Properties

Correctness

A PKE scheme is -correct if for all and ,

over the choice of and randomness of When , we say is perfectly correct.

CPA Security

The CPA game takes the form of a single challenge: the adversary receives , submits two messages, and tries to determine which was encrypted. The adversary can encrypt messages with . An admissible adversary submits with ; otherwise ciphertext length may reveal the challenge bit — standard.

\begin{algorithm}
\algname{Game}
\caption{$\Game^{\mathrm{cpa}}_{\PKE,\calA}(\secpar)$}
\begin{algorithmic}
\State $(\sk, \pk) \gets \KeyGen(1^\secpar)$; $b \getsr \bits$
\State $(m_0, m_1, \stA) \gets \calA(1^\secpar, \pk)$
\Comment{$m_0,m_1 \in \calM$ and $|m_0|=|m_1|$}
\State $c^* \gets \Enc(\pk, m_b)$
\State $b' \gets \calA(c^*, \stA)$
\Return $[b' = b]$
\end{algorithmic}
\end{algorithm}

A PKE scheme is CPA-secure if for all admissible efficient ,

is negligible.

A PKE scheme whose is deterministic is not CPA-secure if the two equal-length messages of Syntax are computed from alone, or if it decrypts correctly under every key pair that outputs. Let be those messages, which computes from or from . It submits , computes itself, and outputs . If , then and . If , then exactly when , and then returns a wrong message on or on . Hence

which in the first case is at least for a -correct scheme, by correctness for and for and a union bound, and in the second case is — standard. Textbook RSA is a scheme of the second kind (No fixed-construction reduction from RSA to CPA-secure PKE (textbook RSA)).

Semantic security

Semantic security compares predicting a function of the plaintext with and without its ciphertext — GM84. In the following key-dependent, efficiently samplable formulation, the adversary chooses the message distribution after seeing — standard.

In the games below, is efficient; describes an efficient sampler supported on equal-length messages in , an efficiently computable function, and auxiliary state; is drawn from with fresh coins, and is the information available in both experiments.

\begin{algorithm}
\algname{Game}
\caption{$\Game^{\mathrm{ss\text{-}real}}_{\PKE,\calA}(\secpar)$}
\begin{algorithmic}
\State $(\sk, \pk) \gets \KeyGen(1^\secpar)$
\State $(M, f, \st) \gets \calA_1(1^\secpar, \pk)$
\Comment{$M$ efficiently samplable, supported on equal-length messages in $\calM$; $f$ efficiently computable}
\State $m \gets M$; $z := (1^\secpar, \pk, M, f, \st, |m|)$
\State $y \gets \calA_2(z, \Enc(\pk, m))$
\Return $[y = f(m)]$
\end{algorithmic}
\end{algorithm}
\begin{algorithm}
\algname{Game}
\caption{$\Game^{\mathrm{ss\text{-}ideal}}_{\PKE,\calA,\Sim}(\secpar)$}
\begin{algorithmic}
\State $(\sk, \pk) \gets \KeyGen(1^\secpar)$
\State $(M, f, \st) \gets \calA_1(1^\secpar, \pk)$
\Comment{$M$ efficiently samplable, supported on equal-length messages in $\calM$; $f$ efficiently computable}
\State $m \gets M$; $z := (1^\secpar, \pk, M, f, \st, |m|)$
\State $y \gets \Sim(z)$
\Return $[y = f(m)]$
\end{algorithmic}
\end{algorithm}

A PKE scheme is semantically secure in this formulation if for every such there is an efficient such that

is negligible, over key generation, , the fresh draw from , encryption, and the coins of or . The simulator receives the sampler’s description, not the coins used to draw . This formulation is equivalent to IND-CPA security — standard; the equivalence of indistinguishability and semantic security originates in GM84 and MRS88.

CCA Security

In the adaptive chosen-ciphertext attack (CCA, or IND-CCA2) game, the adversary additionally has access to a decryption oracle in two phases: before submitting , and after receiving the challenge . An admissible adversary submits equal-length messages in and, after receiving , may not query on itself. The game is the IND-CCA2 game of BDPR98 (Definition 2.1 of the full version); the adaptive attack is due to RS91, as credited by BDPR98 (Section 1.1).

\begin{algorithm}
\algname{Game}
\caption{$\Game^{\mathrm{cca}}_{\PKE,\calA}(\secpar)$}
\begin{algorithmic}
\State $(\sk, \pk) \gets \KeyGen(1^\secpar)$; $b \getsr \bits$
\State $\calD(c) := \Dec(\sk, c)$
\State $(m_0, m_1, \stA) \gets \calA^{\calD}(1^\secpar, \pk)$
\Comment{Phase 1: $\calD$ unrestricted; $m_0,m_1 \in \calM$, $|m_0|=|m_1|$}
\State $c^* \gets \Enc(\pk, m_b)$
\State $b' \gets \calA^{\calD}(c^*, \stA)$
\Comment{Phase 2: $\calA$ may not query $\calD$ on $c^*$}
\Return $[b' = b]$
\end{algorithmic}
\end{algorithm}

A PKE scheme is CCA-secure if for all admissible efficient ,

is negligible. The admissibility restriction is necessary: without it, trivially wins by querying to learn .

Variations

Perfectly correct CPA-secure PKE

An IND-CPA-secure scheme that is perfectly correct, (Perfectly correct CPA-secure PKE ⇒ CPA-secure PKE). Constructions of non-malleable and chosen-ciphertext-secure encryption that check a proof of consistency between ciphertext components need decryption to be errorless under all but a negligible fraction of key pairs, which perfect correctness guarantees; DNR04 immunize schemes with decryption errors to meet this weaker condition — DNR04. With negligible decryption error, a scheme may have rare encryption coins whose ciphertexts decrypt to bits of the secret key; a pair of such ciphertexts carries an honest consistency proof, and decryption queries on such pairs leak the key — standard.

A perfectly correct CPA-secure scheme whose message space depends on gives one with message space , the same for every key: appends to and the two distinct equal-length messages that the efficient algorithm of the syntax outputs on , encryption of is , and decryption returns when returns and otherwise; the CPA reduction computes the pair from itself, and encrypting bit by bit extends this to for every polynomial — standard.

CCA1 Security

In the non-adaptive chosen-ciphertext attack (CCA1, or IND-CCA1) game, also called the lunchtime attack, the adversary has the decryption oracle only in Phase 1, before it submits , and none after receiving . An admissible adversary submits with ; otherwise ciphertext length may reveal . The game is the IND-CCA1 game of BDPR98 (Definition 2.1 of the full version); the attack model was formalized by NY90, as credited by BDPR98 (Section 1.1).

\begin{algorithm}
\algname{Game}
\caption{$\Game^{\mathrm{cca1}}_{\PKE,\calA}(\secpar)$}
\begin{algorithmic}
\State $(\sk, \pk) \gets \KeyGen(1^\secpar)$; $b \getsr \bits$
\State $\calD(c) := \Dec(\sk, c)$
\State $(m_0, m_1, \stA) \gets \calA^{\calD}(1^\secpar, \pk)$
\Comment{Phase 1: $\calD$ unrestricted; $m_0,m_1 \in \calM$, $|m_0|=|m_1|$}
\State $c^* \gets \Enc(\pk, m_b)$
\State $b' \gets \calA(c^*, \stA)$
\Comment{Phase 2: no access to $\calD$}
\Return $[b' = b]$
\end{algorithmic}
\end{algorithm}

A PKE scheme is CCA1-secure if for all admissible efficient ,

is negligible. CCA1 is an intermediate notion between CPA and CCA2 (CCA Security ⇒ CCA1 Security; CCA1 Security ⇒ CPA Security). It is strictly weaker than CCA2 if CCA1-secure schemes exist (CCA1 ⇏ CCA2) — BDPR98 (Theorem 3.5 gives an IND-CCA1-secure scheme that is not NM-CPA-secure, which by Theorem 3.3 is not IND-CCA2-secure). It is strictly stronger than CPA if CPA-secure schemes exist, by letting decryption reveal the secret key on strings that encryption never outputs (CPA ⇏ CCA1) — standard; BDPR98 derive this separation from their Theorem 3.6, which assumes an NM-CPA-secure scheme (Section 1.2).

Non-malleability

A scheme is non-malleable if no efficient adversary, given a challenge ciphertext , can produce ciphertexts other than whose plaintexts are related to the challenge plaintext. DDN91 define the notion with a simulator — DDN91. BDPR98 compare the probability that the plaintexts of the adversary’s ciphertexts stand in a relation of its choice to the challenge plaintext with the probability that they stand in it to an independent plaintext from the same distribution — BDPR98. The formulation below is indistinguishability under a parallel chosen-ciphertext attack, in which submits one vector of ciphertexts after receiving , all at once, and receives their decryptions — BS99. The full version of BS99, which corrects some mistakes of the CRYPTO version, proves indistinguishability under a parallel chosen-ciphertext attack equivalent to a simulation-based definition in the style of DDN91 and to a comparison-based one in the style of BDPR98, for each of chosen-plaintext, chosen-ciphertext and adaptive chosen-ciphertext attacks; its definitions are slightly stronger than the original ones — BS06.

\begin{algorithm}
\algname{Game}
\caption{$\Game^{\mathrm{nm\text{-}cpa}}_{\PKE,\calA}(\secpar)$}
\begin{algorithmic}
\State $(\sk, \pk) \gets \KeyGen(1^\secpar)$; $b \getsr \bits$
\State $(m_0, m_1, \stA) \gets \calA(1^\secpar, \pk)$
\Comment{$m_0,m_1 \in \calM$ and $|m_0|=|m_1|$}
\State $c^* \gets \Enc(\pk, m_b)$
\State $((c_1, \ldots, c_\ell), \stA) \gets \calA(c^*, \stA)$
\Comment{$c_i \ne c^*$ for all $i \in [\ell]$}
\State $\tilde m_i \gets \Dec(\sk, c_i)$ for all $i \in [\ell]$
\State $b' \gets \calA(\tilde m_1, \ldots, \tilde m_\ell, \stA)$
\Return $[b' = b]$
\end{algorithmic}
\end{algorithm}

A PKE scheme is NM-CPA-secure if for all admissible efficient ,

is negligible. An admissible adversary submits equal-length messages in and leaves out of its decryption query, whose answer would otherwise contain . With the game is the CPA game, and NM-CPA security implies IND-CPA security (NM-CPA ⇒ IND-CPA) — BDPR98. NM-CPA and IND-CCA1 security are incomparable: if schemes meeting one of them exist, some scheme meets it and not the other (IND-CCA1 ⇏ NM-CPA, NM-CPA ⇏ IND-CCA1) — BDPR98. Every perfectly correct IND-CPA-secure scheme can be transformed into an NM-CPA-secure one (IND-CPA ⇒ NM-CPA) — PSV06.

NM-CCA2

In NM-CCA1 also has the decryption oracle before receiving , and in NM-CCA2 both before and after, with no query on after receiving it; admissibility and the advantage are as for NM-CPA. An NM-CPA adversary is an NM-CCA2 adversary that makes no query to , so NM-CCA2 security implies NM-CPA security (NM-CCA2 ⇒ NM-CPA) — folklore. NM-CCA2 security is equivalent to IND-CCA2 security (NM-CCA2 ⇔ IND-CCA2) — BDPR98.

Key-hiding

A ciphertext hides the public key it was created under: given two public keys, no efficient adversary can tell under which one a ciphertext of a message of its choice was created. IK-CPA is the chosen-plaintext version of this key privacy and IK-CCA the chosen-ciphertext version — BBDP01. When keys are generated relative to common parameters, such as a group shared by all users, both key pairs use the same parameters, which also receives — BBDP01. The IK games and the key-hiding object are defined for schemes whose message space depends only on and the common parameters, so both key pairs share it. When depends on , independent keys can have disjoint message spaces, and a scheme with that appends to each ciphertext would meet IK-CPA vacuously — standard.

\begin{algorithm}
\algname{Game}
\caption{$\Game^{\mathrm{ik\text{-}cpa}}_{\PKE,\calA}(\secpar)$}
\begin{algorithmic}
\State $(\sk_0, \pk_0) \gets \KeyGen(1^\secpar)$; $(\sk_1, \pk_1) \gets \KeyGen(1^\secpar)$; $b \getsr \bits$
\State $(m, \stA) \gets \calA(1^\secpar, \pk_0, \pk_1)$
\Comment{$m \in \calM$, shared by both keys}
\State $c^* \gets \Enc(\pk_b, m)$
\State $b' \gets \calA(c^*, \stA)$
\Return $[b' = b]$
\end{algorithmic}
\end{algorithm}

A PKE scheme is IK-CPA-secure if for all efficient ,

is negligible. Key privacy and CPA security are independent: appending to every ciphertext preserves CPA security and breaks IK-CPA security, and the scheme that outputs unencrypted is IK-CPA-secure — standard. As an object, key-hiding PKE denotes a scheme with such a message space that is both CPA-secure and IK-CPA-secure.

In the IK-CCA game also has decryption oracles under both secret keys in both phases. An admissible adversary submits and, after receiving , queries neither oracle on ; without this restriction wins against every scheme whose decryption under the wrong key does not return , by comparing and with .

\begin{algorithm}
\algname{Game}
\caption{$\Game^{\mathrm{ik\text{-}cca}}_{\PKE,\calA}(\secpar)$}
\begin{algorithmic}
\State $(\sk_0, \pk_0) \gets \KeyGen(1^\secpar)$; $(\sk_1, \pk_1) \gets \KeyGen(1^\secpar)$; $b \getsr \bits$
\State $\calD_0(c) := \Dec(\sk_0, c)$; $\calD_1(c) := \Dec(\sk_1, c)$
\State $(m, \stA) \gets \calA^{\calD_0, \calD_1}(1^\secpar, \pk_0, \pk_1)$
\Comment{Phase 1: $\calD_0, \calD_1$ unrestricted; $m \in \calM$, shared by both keys}
\State $c^* \gets \Enc(\pk_b, m)$
\State $b' \gets \calA^{\calD_0, \calD_1}(c^*, \stA)$
\Comment{Phase 2: $\calA$ may not query $\calD_0$ or $\calD_1$ on $c^*$}
\Return $[b' = b]$
\end{algorithmic}
\end{algorithm}

A PKE scheme is IK-CCA-secure if for all admissible efficient ,

is negligible.

OW-CPA security

One-wayness under chosen-plaintext attack (OW-CPA) asks that no efficient adversary, given and the encryption of a uniform message, recover the message; the game below is that of HHM22 (Definition 2), and differs from the game OW-CPA of HHK17 (Definition 2.1, Figure 3), the oracle-free case of their games OW-ATK, only in its winning condition, compared under OW-PCA security. The notion applies to schemes whose message space depends only on , can be sampled uniformly in time polynomial in , and has negligible. Security forces the last condition, since the adversary that outputs a uniform element of wins with probability ; with , as for bit encryption, no scheme is OW-CPA-secure — standard.

\begin{algorithm}
\algname{Game}
\caption{$\Game^{\mathrm{ow\text{-}cpa}}_{\PKE,\calA}(\secpar)$}
\begin{algorithmic}
\State $(\sk, \pk) \gets \KeyGen(1^\secpar)$; $m^* \getsr \calM_\secpar$
\State $c^* \gets \Enc(\pk, m^*)$
\State $m' \gets \calA(1^\secpar, \pk, c^*)$
\Return $[m' = m^*]$
\end{algorithmic}
\end{algorithm}

A PKE scheme with such a message space is OW-CPA-secure if for all efficient ,

is negligible.

A PKE scheme is -correct if the decryption-failure probability of the worst message for each key pair, averaged over the key pair, is at most ,

with the inner probability over the coins of — HHK17 (Section 2.1); such a scheme is -correct — standard. For a scheme defined relative to a random oracle, bounds the probability that an unbounded adversary, given the key pair, outputs a message that fails to decrypt, where the oracle is evaluated at most times in this experiment, by the adversary and by the encryption and decryption of its output — HHK17 (Section 2.1, Figure 2, with the count of the proof of Theorem 3.1). As an object, OW-CPA-secure PKE denotes a scheme with such a message space that is OW-CPA-secure and -correct for a negligible , which for a scheme defined relative to a random oracle means negligible for every polynomial . Encrypting bit by bit under any CPA-secure scheme gives one (CPA-secure PKE ⇒ OW-CPA-secure PKE) — folklore. The Fujisaki–Okamoto KEM with implicit rejection of HHK17 is IND-CCA-secure in the random oracle model if its base scheme is OW-CPA-secure, by a non-tight reduction — HHK17 (Sections 1.1.2 and 3.3).

OW-PCA security

One-wayness under plaintext-checking attack (OW-PCA) is OW-CPA security against an adversary that also has a plaintext-checking oracle , which on reports whether decrypts to . It applies to schemes with a message space as in OW-CPA security. The notion is due to OP01, as credited by ABD+20 (Definition 5.2); HHK17 (Section 1) name it as the assumption of the REACT transform of OP01, and their game OW-PCA (Definition 2.1, Figure 3) is the one below up to the winning condition.

\begin{algorithm}
\algname{Game}
\caption{$\Game^{\mathrm{ow\text{-}pca}}_{\PKE,\calA}(\secpar)$}
\begin{algorithmic}
\State $(\sk, \pk) \gets \KeyGen(1^\secpar)$; $m^* \getsr \calM_\secpar$
\State $c^* \gets \Enc(\pk, m^*)$
\State $\calO_{\mathrm{pc}}(m, c) := [\Dec(\sk, c) = m]$
\Comment{Every query has $m \in \calM_\secpar$; queries with $c = c^*$ are allowed}
\State $m' \gets \calA^{\calO_{\mathrm{pc}}}(1^\secpar, \pk, c^*)$
\Return $[m' = m^*]$
\end{algorithmic}
\end{algorithm}

An admissible adversary queries only on messages ; a query would report whether is rejected, which is a ciphertext-validity oracle. HHK17 (Section 2.1, Figure 3) restrict the oracle in the same way and for the same reason, answering on , and give the validity oracle separately, in their games OW-VA and OW-PCVA. Queries on are allowed, since each tests one candidate for . A PKE scheme with such a message space is OW-PCA-secure if for all admissible efficient ,

is negligible. HHK17 (Definition 2.1, Figure 3) count as a win every output with , the answer of ; the two winning events coincide when decrypts to , so their probabilities differ by at most for a -correct scheme — HHK17 (Section 2.1). As an object, OW-PCA-secure PKE denotes a scheme with such a message space that is OW-PCA-secure and -correct for a negligible , as defined under OW-CPA security. An OW-CPA adversary is an OW-PCA adversary that makes no query, so OW-PCA security implies OW-CPA security (OW-PCA-secure PKE ⇒ OW-CPA-secure PKE) — folklore. In the random oracle model, the transform T of HHK17, which derandomizes encryption with a random oracle and adds a re-encryption check to decryption, turns every OW-CPA-secure scheme into an OW-PCA-secure one (OW-CPA PKE ⇒ OW-PCA PKE (Fujisaki–Okamoto transform T)) — HHK17 (Theorem 3.1).

Other results

Participates in

Builds on Public key encryption

Produces Public key encryption

Barriers