Lecture 5. PKE with CCA2 Security


签名机制 (Signature Scheme). 3 个 PPT 算法 (SigGen,Sign,Vrfy)(\text{SigGen},\text{Sign},\text{Vrfy})


签名的不可伪造性-选择消息攻击安全 (Unforgeability Chosen Message Attack, UF-CMA). A\forall\mathcal{A}

Pr[(vk,sk)SigGen(1κ);(m,σ)Ab(m,σ)Sign(sk,)(vk):Vrfy(vk,(m,σ))=1mm (mb)]=12±negl(κ)\begin{aligned}\text{Pr}\left[\begin{matrix}(vk,sk)\leftarrow\text{SigGen}(1^\kappa);\\(m^*,\sigma^*)\leftarrow\mathcal{A}^{\color{red}\text{Sign}(sk,\cdot)}_{\color{red}b\leftarrow(m,\sigma)}(vk)\end{matrix}:\begin{matrix}\text{Vrfy}(vk,(m^*,\sigma^*))=1\\ \wedge m^*\ne m\ (\forall m\in b) \end{matrix}\right]=\frac{1}{2}\pm\text{negl}(\kappa)\end{aligned}

其中 bb 表示询问 oracle 的历史 buffer。对应的 UF-CMA Game.

CA(vk,sk)SigGen(1κ)vkmsign queries mσSign(sk,m)σA wins iff Vrfy(vk,(m,σ))=1(m,σ)choose m,σ(mm)\begin{matrix}\mathcal{C} & & \mathcal{A}\\(vk,sk)\leftarrow\text{SigGen}(1^\kappa) &\stackrel{vk}{\longrightarrow}&\\ & \stackrel{m}{\longleftarrow} &\text{sign queries } m \\ \sigma\leftarrow\text{Sign}(sk,m) & \stackrel{\sigma}{\longrightarrow}\\ \mathcal{A} \text{ wins iff } \text{Vrfy}(vk,(m^*,\sigma^*))=1& \stackrel{(m^*,\sigma^*)}{\longleftarrow}& \text{choose }m^*,\sigma^*\quad(m^*\ne m)\end{matrix}

强不可伪造性-选择消息攻击安全 (Strong-UF-CMA). UF-CMA 需要满足 mmm^*\ne m,而 Strong-UF-CMA 需要满足 (m,σ)(m,σ)(m^*,\sigma^*)\ne (m,\sigma),即允许敌手给出 m=m,σσm^*=m,\sigma^*\ne \sigma 的情况。A\forall\mathcal{A}

Pr[(vk,sk)SigGen(1κ);(m,σ)Ab(m,σ)Sign(sk,)(vk):Vrfy(vk,(m,σ))=1(m,σ)(m,σ) ((m,σ)b)]=12±negl(κ)\begin{aligned}\text{Pr}\left[\begin{matrix}(vk,sk)\leftarrow\text{SigGen}(1^\kappa);\\(m^*,\sigma^*)\leftarrow\mathcal{A}^{\text{Sign}(sk,\cdot)}_{b\leftarrow(m,\sigma)}(vk)\end{matrix}:\begin{matrix}\text{Vrfy}(vk,(m^*,\sigma^*))=1\\ \wedge \color{red}(m^*,\sigma^*)\ne (m,\sigma)\ (\forall (m,\sigma)\in b) \end{matrix}\right]=\frac{1}{2}\pm\text{negl}(\kappa)\end{aligned}

对应的 Strong-UF-CMA Game.

CA(vk,sk)SigGen(1κ)vkmsign queries mσSign(sk,m)σA wins iff Vrfy(vk,(m,σ))=1(m,σ)choose m,σ((m,σ)(m,σ))\begin{matrix}\mathcal{C} & & \mathcal{A}\\(vk,sk)\leftarrow\text{SigGen}(1^\kappa) &\stackrel{vk}{\longrightarrow}&\\ & \stackrel{m}{\longleftarrow} &\text{sign queries } m \\ \sigma\leftarrow\text{Sign}(sk,m) & \stackrel{\sigma}{\longrightarrow}\\ \mathcal{A} \text{ wins iff } \text{Vrfy}(vk,(m^*,\sigma^*))=1& \stackrel{(m^*,\sigma^*)}{\longleftarrow}& \text{choose }m^*,\sigma^*\quad({\color{red}(m^*,\sigma^*)\ne (m,\sigma)})\end{matrix}

单次不可伪造性-选择消息攻击安全 (One-Time UF-CMA, OT-UF-CMA). 只允许敌手询问一次。 A=(A1,A2)\forall\mathcal{A}=(\mathcal{A}_1,\mathcal{A}_2)

Pr[(vk,sk)SigGen(1κ);(s,m)A1(vk);σSign(sk,m);(m,σ)A2(s,vk,σ):Vrfy(vk,(m,σ))=1mm]=12±negl(κ)\small\begin{aligned}\text{Pr}\left[\begin{matrix}(vk,sk)\leftarrow\text{SigGen}(1^\kappa);{\color{red}(s,m)\leftarrow\mathcal{A}_1(vk);}\\\color{red}\sigma\leftarrow\text{Sign}(sk,m);(m^*,\sigma^*)\leftarrow\mathcal{A}_2(s,vk,\sigma)\end{matrix}:\begin{matrix}\text{Vrfy}(vk,(m^*,\sigma^*))=1\\ \wedge m^*\ne m\end{matrix}\right]=\frac{1}{2}\pm\text{negl}(\kappa)\end{aligned}

对应的 OT-UF-CMA Game.

CA(vk,sk)SigGen(1κ)vkmsingle sign query mσSign(sk,m)σA wins iff Vrfy(vk,(m,σ))=1(m,σ)choose m,σ(mm)\begin{matrix}\mathcal{C} & & \mathcal{A}\\(vk,sk)\leftarrow\text{SigGen}(1^\kappa) &\stackrel{vk}{\longrightarrow}&\\ & \stackrel{m}{\longleftarrow} &\color{red}\text{single sign query } m\\ \sigma\leftarrow\text{Sign}(sk,m) & \stackrel{\sigma}{\longrightarrow}\\ \mathcal{A} \text{ wins iff } \text{Vrfy}(vk,(m^*,\sigma^*))=1& \stackrel{(m^*,\sigma^*)}{\longleftarrow}& \text{choose }m^*,\sigma^*\quad(m^*\ne m)\end{matrix}

单次强不可伪造性-选择消息攻击安全 (Strong-OT-UF-CMA, SOT-UF-CMA). 结合“单次“和”强“。A=(A1,A2)\forall\mathcal{A}=(\mathcal{A}_1,\mathcal{A}_2)

Pr[(vk,sk)SigGen(1κ);(s,m)A1(vk);σSign(sk,m);(m,σ)A2(s,vk,σ):Vrfy(vk,(m,σ))=1(m,σ)(m,σ)]=12±negl(κ)\small\begin{aligned}\text{Pr}\left[\begin{matrix}(vk,sk)\leftarrow\text{SigGen}(1^\kappa);\color{red}(s,m)\leftarrow\mathcal{A}_1(vk);\\\color{red}\sigma\leftarrow\text{Sign}(sk,m);(m^*,\sigma^*)\leftarrow\mathcal{A}_2(s,vk,\sigma)\end{matrix}:\begin{matrix}\text{Vrfy}(vk,(m^*,\sigma^*))=1\\ \wedge \color{red}(m^*,\sigma^*)\ne (m,\sigma)\end{matrix}\right]=\frac{1}{2}\pm\text{negl}(\kappa)\end{aligned}

对应的 SOT-UF-CMA Game.

CA(vk,sk)SigGen(1κ)vkmsingle sign query mσSign(sk,m)σA wins iff Vrfy(vk,(m,σ))=1(m,σ)choose m,σ((m,σ)(m,σ))\begin{matrix}\mathcal{C} & & \mathcal{A}\\(vk,sk)\leftarrow\text{SigGen}(1^\kappa) &\stackrel{vk}{\longrightarrow}&\\ & \stackrel{m}{\longleftarrow} &\color{red}\text{single sign query } m\\ \sigma\leftarrow\text{Sign}(sk,m) & \stackrel{\sigma}{\longrightarrow}\\ \mathcal{A} \text{ wins iff } \text{Vrfy}(vk,(m^*,\sigma^*))=1& \stackrel{(m^*,\sigma^*)}{\longleftarrow}& \text{choose }m^*,\sigma^*\quad({\color{red}(m^*,\sigma^*)\ne (m,\sigma)})\end{matrix}
💡
单次安全一般在实际中应用很少,但是在这里可以用于具有 CCA2 安全性的 PKE 的构造。

具有 CCA2 安全的 PKE’:Dolev-Dwork-Naor 构造 (DDN scheme). 通过一个 CPA 安全的 PKE,一个 aNIZK (P,V)(P,V) 和一个 SOT-UF-CMA 安全的签名机制,构造一个具有 CCA2 安全的 PKE’ (DDN-PKE)。

正确性. 由 aNIZK 的完备性、CPA 安全的 PKE、 SOT-UF-CMA 安全的数字签名本身保证。

💡
Theorem. 使用 Dolev-Dwork-Naor 构造的 PKE’ 具有 CCA2 安全。

【证明】

Game 0. 即 ExpPKE,ACCA2-0(κ)\textbf{Exp}_{\text{PKE}',\mathcal{A}}^\text{CCA2-0}(\kappa).

CA(pk,sk)Gen(1κ)pkr{0,1}poly(κ);(pki0,ski0)Gen(1κ),i[k];(pki1,ski1)Gen(1κ),i[k];pk:=(pk1:k,0/1,r);sk:=(sk1,0/1)c=(vk,c,π,σ)decryption queriesm/Dec(sk,c)m/if Vrfy(vk,(c,π),σ)=0V(r,c,π)=0,m:=;else,mDec(sk1,vk1,c1)(m0,m1)choose m0,m1cEnc(pk,m0;w)c(vk,ssk)SigGen(1κ);wi{0,1}poly(κ),i[k];ciEnc(pki,vki,m0;wi),i[k];πP(r,c,(m0,w));σSign(ssk,(c,π))c:=(vk,c,π,σ)c=(vk,c,π,σ)decryption queriesm/Dec(sk,c)m/if Vrfy(vk,(c,π),σ)=0V(r,c,π)=0,m:=;else,mDec(sk1,vk1,c1)return bbcompute b\color{darkblue}\begin{matrix}\mathcal{C}& &\mathcal{A}\\ (pk,sk)\leftarrow\text{Gen}'(1^\kappa) & \stackrel{pk}{\longrightarrow}\\ \scriptsize r \leftarrow \{0,1\}^{\text{poly}(\kappa)};\\ \scriptsize (pk_{i0},sk_{i0})\leftarrow\text{Gen}(1^\kappa),i\in[k];\\ \scriptsize(pk_{i1},sk_{i1})\leftarrow\text{Gen}(1^\kappa),i\in[k];\\ \scriptsize pk:=(pk_{1:k,0/1},r);sk:=(sk_{1,0/1}) \\ & \stackrel{c=(vk,\vec{c},\pi,\sigma)}{\longleftarrow}& \text{decryption queries}\\ m/\perp\leftarrow\text{Dec}'(sk,c) & \stackrel{m/\perp}{\longrightarrow}\\ \scriptsize \text{if } \text{Vrfy}(vk,(\vec{c},\pi),\sigma)=0\vee V(r,\vec{c},\pi)=0, \\\scriptsize m:=\perp;\quad\text{else,}\quad m\leftarrow \text{Dec}(sk_{1,vk_1},c_1) \\ & \stackrel{(m_0,m_1)}{\longleftarrow}& \text{choose }m_0,m_1\\ c^*\leftarrow \text{Enc}'(pk,m_0;\vec{w}^*)& \stackrel{c^*}{\longrightarrow}& \\ \scriptsize (vk^*,ssk^*)\leftarrow\text{SigGen}(1^\kappa);\\ \scriptsize w_i^*\leftarrow\{0,1\}^{\text{poly}(\kappa)},i\in[k];\\ \scriptsize c_i^*\leftarrow\text{Enc}(pk_{i,vk^*_i},m_0;w_i^*),i\in[k];\\ \scriptsize \pi^*\leftarrow P(r,\vec{c}^*,(m_0,\vec{w}^*));\\ \scriptsize \sigma^*\leftarrow\text{Sign}(ssk^*,(\vec{c}^*,\pi^*))\\ \scriptsize c^*:=(vk^*,\vec{c}^*,\pi^*,\sigma^*)\\& \stackrel{c=(vk,\vec{c},\pi,\sigma)}{\longleftarrow}& \text{decryption queries}\\ m/\perp\leftarrow\text{Dec}'(sk,c) & \stackrel{m/\perp}{\longrightarrow}\\ \scriptsize \text{if } \text{Vrfy}(vk,(\vec{c},\pi),\sigma)=0\vee V(r,\vec{c},\pi)=0, \\\scriptsize m:=\perp;\quad\text{else,}\quad m\leftarrow \text{Dec}(sk_{1,vk_1},c_1) \\\text{return }b' & \stackrel{b'}{\longleftarrow} & \text{compute }b'\end{matrix}

Game 1. 修改 Game 0,先生成签名密钥 vkvk^*;同时,若解密时出现了 vk=vkvk=vk^*,则不给解密(返回 \perp)。

  • 对于挑战者来说 SigGen\text{SigGen} 只运行一次,在开头运行还是在加密时运行是一样的,在证明过程中我们想让他在开头就确定下来,这样允许我们在后续的证明中直接使用 vkvk^*
CA(vk,ssk)SigGen(1κ);(pk,sk)Gen(1κ)pkr{0,1}poly(κ);(pki0,ski0)Gen(1κ),i[k];(pki1,ski1)Gen(1κ),i[k];pk:=(pk1:k,0/1,r);sk:=(sk1,0/1)c=(vk,c,π,σ)decryption queriesm/Dec(sk,c)m/if Vrfy(vk,(c,π),σ)=0V(r,c,π)=0vk=vk, m:=; else, mDec(sk1,vk1,c1)(m0,m1)choose m0,m1cEnc(pk,m0;w)cwi{0,1}poly(κ),i[k];ciEnc(pki,vki,m0;wi),i[k];πP(r,c,(m0,w));σSign(ssk,(c,π))c:=(vk,c,π,σ)c=(vk,c,π,σ)decryption queriesm/Dec(sk,c)m/if Vrfy(vk,(c,π),σ)=0V(r,c,π)=0vk=vk, m:=; else, mDec(sk1,vk1,c1)return bbcompute b\color{darkblue}\begin{matrix}\mathcal{C}& &\mathcal{A}\\ \scriptsize\color{red} (vk^*,ssk^*)\leftarrow\text{SigGen}(1^\kappa);\\(pk,sk)\leftarrow\text{Gen}'(1^\kappa) & \stackrel{pk}{\longrightarrow}\\ \scriptsize r \leftarrow \{0,1\}^{\text{poly}(\kappa)};\\ \scriptsize (pk_{i0},sk_{i0})\leftarrow\text{Gen}(1^\kappa),i\in[k];\\ \scriptsize(pk_{i1},sk_{i1})\leftarrow\text{Gen}(1^\kappa),i\in[k];\\ \scriptsize pk:=(pk_{1:k,0/1},r);sk:=(sk_{1,0/1}) \\ & \stackrel{c=(vk,\vec{c},\pi,\sigma)}{\longleftarrow}& \text{decryption queries}\\ m/\perp\leftarrow\text{Dec}'(sk,c) & \stackrel{m/\perp}{\longrightarrow}\\ \scriptsize \text{if } \text{Vrfy}(vk,(\vec{c},\pi),\sigma)=0\vee V(r,\vec{c},\pi)=0 \\\scriptsize {\color{red}\vee vk=vk^*},\ m:=\perp;\ \text{else,}\ m\leftarrow \text{Dec}(sk_{1,vk_1},c_1) \\ & \stackrel{(m_0,m_1)}{\longleftarrow}& \text{choose }m_0,m_1\\ c^*\leftarrow \text{Enc}'(pk,m_0;\vec{w}^*)& \stackrel{c^*}{\longrightarrow}& \\ \scriptsize w_i^*\leftarrow\{0,1\}^{\text{poly}(\kappa)},i\in[k];\\ \scriptsize c_i^*\leftarrow\text{Enc}(pk_{i,vk^*_i},m_0;w_i^*),i\in[k];\\ \scriptsize \pi^*\leftarrow P(r,\vec{c}^*,(m_0,\vec{w}^*));\\ \scriptsize \sigma^*\leftarrow\text{Sign}(ssk^*,(\vec{c}^*,\pi^*))\\\scriptsize c^*:=(vk^*,\vec{c}^*,\pi^*,\sigma^*)\\ & \stackrel{c=(vk,\vec{c},\pi,\sigma)}{\longleftarrow}& \text{decryption queries}\\ m/\perp\leftarrow\text{Dec}'(sk,c) & \stackrel{m/\perp}{\longrightarrow}\\ \scriptsize \text{if } \text{Vrfy}(vk,(\vec{c},\pi),\sigma)=0\vee V(r,\vec{c},\pi)=0 \\\scriptsize {\color{red}\vee vk=vk^*},\ m:=\perp;\ \text{else,}\ m\leftarrow \text{Dec}(sk_{1,vk_1},c_1) \\\text{return }b' & \stackrel{b'}{\longleftarrow} & \text{compute }b'\end{matrix}

接下来,我们定义 Forgei\text{Forge}_i 表示在 Game ii 中敌手 A\mathcal{A} 询问密文 (vk,c,π,σ)(vk,\vec{c},\pi,\sigma),使得 vk=vkvk=vk^* 但是 Vrfy(vk,(c,π),σ)=1V(r,c,π)=1\text{Vrfy}(vk,(\vec{c},\pi),\sigma)=1\wedge V(r,\vec{c},\pi)=1(验证的两关都通过了),即该事件发生等价于 vk=vkVrfy(vk,(c,π),σ)=1V(r,c,π)=1vk=vk^*\wedge \text{Vrfy}(vk,(\vec{c},\pi),\sigma)=1\wedge V(r,\vec{c},\pi)=1

  • 如果 Forge 事件发生:
    • Game 0 Game 1 就不一样了,因为 Game 1 的时候如果 vk=vkvk=vk^* 就直接拒绝了;而 Game 0 会继续走流程。
    • 对于 Game 0 Game 1 来说,反正 vkvk^* 只生成一次,在哪生成都是一样的,从敌手的层面完全看不出来区别,所以 Forge0\text{Forge}_0Forge1\text{Forge}_1 发生的概率是一样的,即 Pr[Forge0]=Pr[Forge1]\text{Pr}[\text{Forge}_0]=\text{Pr}[\text{Forge}_1]
  • 如果 Forge 事件不发生:
    • 要么 vkvkvk\ne vk^*,要么验证的两关有没通过的。
    • Game 0 Game 1 完全相同,即 Game 0¬Forge0=Game 1¬Forge1\textbf{Game 0}|\neg\text{Forge}_0= \textbf{Game 1}|\neg\text{Forge}_1,从而 Game 0=1¬Forge0=Game 1=1¬Forge1\textbf{Game 0}=1|\neg\text{Forge}_0= \textbf{Game 1}=1|\neg\text{Forge}_1

于是,根据 Lecture 4 中 lemma 的推论,有

Pr[Game 1=1]Pr[Game 0=1] Pr[Forge0/1]= Pr[vk=vkVrfy(vk,(c,π),σ)=1V(r,c,π)=1] Pr[vk=vkVrfy(vk,(c,π),σ)=1]\begin{aligned}&\left|\text{Pr}[\textbf{Game 1}=1]-\text{Pr}[\textbf{Game 0}=1]\right|\\\leq\ &\text{Pr}[\text{Forge}_{0/1}]\\=\ &\text{Pr}[vk=vk^*\wedge \text{Vrfy}(vk,(\vec{c},\pi),\sigma)=1\wedge V(r,\vec{c},\pi)=1]\\ \leq \ &\text{Pr}[vk=vk^*\wedge\text{Vrfy}(vk,(\vec{c},\pi),\sigma)=1]\end{aligned}

如果敌手能够在 Game 0 中以不可忽略的概率产生 vk=vkVrfy(vk,(c,π),σ)=1vk=vk^*\wedge\text{Vrfy}(vk,(\vec{c},\pi),\sigma)=1 的密文,我们就可以利用其能力打破数字签名的 SOT-UF-CMA 安全(这相当于,我们已经伪造了一个签名)。因此规约如下,

CA/CA(vk,ssk)SigGen(1κ)vk(pk,sk)Gen(1κ)pkr{0,1}poly(κ);(pki0,ski0)i[k]Gen(1κ);(pki1,ski1)i[k]Gen(1κ);xpk:=(pk1:k,0/1,r);sk:=(sk1,0/1)c=(vk,c,π,σ)cm/Dec(sk,c)m/(c,π,σ)if vk=vkVrfy(vk,(c,π),σ)=1, abortif Vrfy(vk,(c,π),σ)=0V(r,c,π)=0,m:=; else, mDec(sk1,vk1,c1)m0,m1m0,m1cEnc(pk,m0;w)c(wi)i[k]{0,1}poly(κ);(ci)i[k]Enc(pki,vki,m0;wi);(c,π)πP(r,c,(m0,w));σ=Sign(ssk,(c,π))σc=(vk,c,π,σ)c=(vk,c,π,σ)cm/Dec(sk,c)m/(c,π,σ)if vk=vkVrfy(vk,(c,π),σ)=1, abortif Vrfy(vk,(c,π),σ)=0V(r,c,π)=0,m:=; else, mDec(sk1,vk1,c1)bb\color{darkblue}\small\begin{matrix}\mathcal{C'}& &\mathcal{A'/C} & &\mathcal{A}\\\scriptsize (vk^*,ssk^*)\leftarrow\text{SigGen}(1^\kappa) & \stackrel{vk^*}{\longrightarrow} & (pk,sk)\leftarrow\text{Gen}'(1^\kappa)&\stackrel{pk}{\longrightarrow}\\ & &\scriptsize r \leftarrow \{0,1\}^{\text{poly}(\kappa)};\\ & &\scriptsize (pk_{i0},sk_{i0})_{i\in[k]}\leftarrow\text{Gen}(1^\kappa);\\ & &\scriptsize(pk_{i1},sk_{i1})_{i\in[k]}\leftarrow\text{Gen}(1^\kappa);\\ x'& &\scriptsize pk:=(pk_{1:k,0/1},r);sk:=(sk_{1,0/1}) \\ & & & \stackrel{c=(vk,\vec{c},\pi,\sigma)}{\longleftarrow}& c\\ & & m/\perp\leftarrow\text{Dec}'(sk,c) &\stackrel{m/\perp}{\longrightarrow}\\&\color{red} \stackrel{(\vec{c},\pi,\sigma)}\longleftarrow&\scriptsize \color{red}\text{if }vk=vk^*\wedge \text{Vrfy}(vk,(\vec{c},\pi),\sigma)=1,\ \text{abort}\\ & &\scriptsize\text{if } \text{Vrfy}(vk,(\vec{c},\pi),\sigma)=0\vee V(r,\vec{c},\pi)=0, \\& &\scriptsize m:=\perp;\ \text{else,}\ m\leftarrow \text{Dec}(sk_{1,vk_1},c_1) \\ & & & \stackrel{m_0,m_1}{\longleftarrow}& m_0,m_1\\& & c^*\leftarrow\text{Enc}'(pk,m_0;\vec{w}^*) &\stackrel{c^*}{\longrightarrow}\\ & &\scriptsize (w_i^*)_{i\in[k]}\leftarrow\{0,1\}^{\text{poly}(\kappa)};\\ & & \scriptsize (c_i^*)_{i\in[k]}\leftarrow\text{Enc}(pk_{i,vk^*_i},m_0;w_i^*);\\ & \stackrel{(\vec{c}^*,\pi^*)}{\longleftarrow}&\scriptsize \pi^*\leftarrow P(r,\vec{c}^*,(m_0,\vec{w}^*));\\\scriptsize\sigma^*=\text{Sign}(ssk^*,(\vec{c}^*,\pi^*)) & \stackrel{\sigma^*}{\longrightarrow} & \scriptsize c^*=(vk^*,\vec{c}^*,\pi^*,\sigma^*)\\& & & \stackrel{c=(vk,\vec{c},\pi,\sigma)}{\longleftarrow}& c\\ & & m/\perp\leftarrow\text{Dec}'(sk,c) &\stackrel{m/\perp}{\longrightarrow}\\&\color{red} \stackrel{(\vec{c},\pi,\sigma)}\longleftarrow&\scriptsize \color{red}\text{if }vk=vk^*\wedge \text{Vrfy}(vk,(\vec{c},\pi),\sigma)=1,\ \text{abort}\\ & &\scriptsize\text{if } \text{Vrfy}(vk,(\vec{c},\pi),\sigma)=0\vee V(r,\vec{c},\pi)=0, \\& &\scriptsize m:=\perp;\ \text{else,}\ m\leftarrow \text{Dec}(sk_{1,vk_1},c_1) \\ & & & \stackrel{b'}{\longleftarrow}&b' \end{matrix}

于是,

Pr[Game 1=1]Pr[Game 0=1] Pr[vk=vkVrfy(vk,(c,π),σ)=1]= Pr[A wins] AdvSIG,ASOT-UF-CMA(κ) AdvSIGSOT-UF-CMA(κ)\begin{aligned}&\left|\text{Pr}[\textbf{Game 1}=1]-\text{Pr}[\textbf{Game 0}=1]\right|\\\leq\ &\text{Pr}[vk=vk^*\wedge\text{Vrfy}(vk,(\vec{c},\pi),\sigma)=1] \\ =\ &\text{Pr}[\mathcal{A'}\text{ wins}]\\ \leq\ &\textbf{Adv}_{\text{SIG},\mathcal{A'}}^\text{SOT-UF-CMA}(\kappa)\\ \leq\ &\textbf{Adv}_{\text{SIG}}^\text{SOT-UF-CMA}(\kappa)\end{aligned}

Game 2. 如果 vkvkvk\ne vk^*,那么我们选择其中不同的那一比特(假设第 jj 比特),使用那一比特代表的钥匙 skj,vkjsk_{j,vk_j} 进行解密。于是修改 Game 1 如下:

CA(vk,ssk)SigGen(1κ);(pk,sk)Gen(1κ)pkr{0,1}poly(κ);(pki0,ski0)Gen(1κ),i[k];(pki1,ski1)Gen(1κ),i[k];pk:=(pk1:k,0/1,r);sk:=(sk1:k,0/1)c=(vk,c,π,σ)decryption queriesm/Dec(sk,c)m/if Vrfy(vk,(c,π),σ)=0V(r,c,π)=0vk=vk, m:=; else, find j s.t. vkjvkj,mDec(skj,vkj,cj)(m0,m1)choose m0,m1cEnc(pk,m0;w)cwi{0,1}poly(κ),i[k];ciEnc(pki,vki,m0;wi),i[k];πP(r,c,(m0,w));σSign(ssk,(c,π))c:=(vk,c,π,σ)c=(vk,c,π,σ)decryption queriesm/Dec(sk,c)m/if Vrfy(vk,(c,π),σ)=0V(r,c,π)=0vk=vk, m:=; else, find j s.t. vkjvkj,mDec(skj,vkj,cj)return bbcompute b\color{darkblue}\begin{matrix}\mathcal{C}& &\mathcal{A}\\ \scriptsize(vk^*,ssk^*)\leftarrow\text{SigGen}(1^\kappa);\\(pk,sk)\leftarrow\text{Gen}'(1^\kappa) & \stackrel{pk}{\longrightarrow}\\ \scriptsize r \leftarrow \{0,1\}^{\text{poly}(\kappa)};\\ \scriptsize (pk_{i0},sk_{i0})\leftarrow\text{Gen}(1^\kappa),i\in[k];\\ \scriptsize(pk_{i1},sk_{i1})\leftarrow\text{Gen}(1^\kappa),i\in[k];\\ \scriptsize pk:=(pk_{1:k,0/1},r);\color{red}sk:=(sk_{1:k,0/1}) \\ & \stackrel{c=(vk,\vec{c},\pi,\sigma)}{\longleftarrow}& \text{decryption queries}\\ m/\perp\leftarrow\text{Dec}'(sk,c) & \stackrel{m/\perp}{\longrightarrow}\\ \scriptsize \text{if } \text{Vrfy}(vk,(\vec{c},\pi),\sigma)=0\vee V(r,\vec{c},\pi)=0 \\\scriptsize \vee vk=vk^*,\ m:=\perp;\ \\\scriptsize\text{else, }{\color{red}\text{find } j \text{ s.t. }vk_j\ne vk^*_j},\\\scriptsize m\leftarrow \text{Dec}({\color{red}sk_{j,vk_j}},c_j) \\ & \stackrel{(m_0,m_1)}{\longleftarrow}& \text{choose }m_0,m_1\\ c^*\leftarrow \text{Enc}'(pk,m_0;\vec{w}^*)& \stackrel{c^*}{\longrightarrow}& \\ \scriptsize w_i^*\leftarrow\{0,1\}^{\text{poly}(\kappa)},i\in[k];\\ \scriptsize c_i^*\leftarrow\text{Enc}(pk_{i,vk^*_i},m_0;w_i^*),i\in[k];\\ \scriptsize \pi^*\leftarrow P(r,\vec{c}^*,(m_0,\vec{w}^*));\\ \scriptsize \sigma^*\leftarrow\text{Sign}(ssk^*,(\vec{c}^*,\pi^*))\\\scriptsize c^*:=(vk^*,\vec{c}^*,\pi^*,\sigma^*)\\ & \stackrel{c=(vk,\vec{c},\pi,\sigma)}{\longleftarrow}& \text{decryption queries}\\ m/\perp\leftarrow\text{Dec}'(sk,c) & \stackrel{m/\perp}{\longrightarrow}\\ \scriptsize \text{if } \text{Vrfy}(vk,(\vec{c},\pi),\sigma)=0\vee V(r,\vec{c},\pi)=0 \\\scriptsize \vee vk=vk^*,\ m:=\perp;\ \\\scriptsize\text{else, }{\color{red}\text{find } j \text{ s.t. }vk_j\ne vk^*_j},\\\scriptsize m\leftarrow \text{Dec}({\color{red}sk_{j,vk_j}},c_j) \\\text{return }b' & \stackrel{b'}{\longleftarrow} & \text{compute }b'\end{matrix}

下面我们定义 Fakei\text{Fake}_i 事件:在 Game ii 中敌手 A\mathcal{A} 询问的密文 (vk,c,π,σ)(vk,\vec{c},\pi,\sigma) 通过了检测(即Vrfy(vk,(c,π),σ)=1V(r,c,π)=1\text{Vrfy}(vk,(\vec{c},\pi),\sigma)=1 \wedge V(r,\vec{c},\pi)=1),但是 i,j[k],Dec(ski,vki,ci)Dec(skj,vkj,cj)\exist i,j\in[k], \text{Dec}(sk_{i,vk_i},c_i)\ne\text{Dec}(sk_{j,vk_j},c_j)

  • 如果 Fake 事件发生,
    • 有两个比特 i,ji, j 解密出来的明文不一样。于是,这个 c\vec{c} 就一定不在 aNIZK 语言 L\mathcal{L} 中,但是其能通过 V(r,c,π)V(r,\vec{c},\pi) 验证,这就违背了 aNIZK 的 adaptive soundness。
    • 对于 Game 1 Game 2 来说,从敌手的层面完全看不出来 Fake 事件在 Game 1 中发生和在 Game 2 中发生的区别,因此 Pr[Fake1]=Pr[Fake2]\text{Pr}[\text{Fake}_1]=\text{Pr}[\text{Fake}_2]
  • 如果 Fake 事件不发生,
    • 对于任意合法的密文 cL\vec{c}\in L,每个比特解密出来的都是相同的明文。
    • 如果 Fake 事件不发生,即对于所有通过检测的密文,都能保证 i,j[k],Dec(ski,vki,ci)=Dec(skj,vkj,cj)\forall i,j\in[k],\text{Dec}(sk_{i,vk_i},c_i)=\text{Dec}(sk_{j,vk_j},c_j),令 i=1i=1,即 Dec(sk1,vk1,c1)=Dec(skj,vkj,cj)\text{Dec}(sk_{1,vk_1},c_1)=\text{Dec}(sk_{j,vk_j},c_j),于是 Game 1 Game 2 完全一样。故 Game 1¬Fake1=Game 2¬Fake2\textbf{Game 1}|\neg\text{Fake}_1= \textbf{Game 2}|\neg\text{Fake}_2,即 Game 1=1¬Fake1=Game 2=1¬Fake2\textbf{Game 1}=1|\neg\text{Fake}_1= \textbf{Game 2}=1|\neg\text{Fake}_2

于是,根据 Lecture 4 中 lemma 的推论,有

Pr[Game 2=1]Pr[Game 1=1] Pr[Fake0/1]= Pr[Vrfy(vk,(c,π),σ)=1V(r,c,π)=1cL] Pr[V(r,c,π)=1cL] AdvaNIZKsound(κ)\begin{aligned}&\left|\text{Pr}[\textbf{Game 2}=1]-\text{Pr}[\textbf{Game 1}=1]\right|\\\leq\ &\text{Pr}[\text{Fake}_{0/1}]\\=\ &\text{Pr}[\text{Vrfy}(vk,(\vec{c},\pi),\sigma)=1\wedge V(r,\vec{c},\pi)=1\wedge c\notin L]\\ \leq \ &\text{Pr}[V(r,\vec{c},\pi)=1\wedge c\notin L]\\ \leq\ &\textbf{Adv}_\text{aNIZK}^\text{sound}(\kappa)\end{aligned}

Game 3. 将 Game 2 中的 aNIZK 换成仿真器 Sim\text{Sim}

CA(vk,ssk)SigGen(1κ);(pk,sk)Gen(1κ)pkrSim1(1κ);(pki0,ski0)Gen(1κ),i[k];(pki1,ski1)Gen(1κ),i[k];pk:=(pk1:k,0/1,r);sk:=(sk1:k,0/1)c=(vk,c,π,σ)decryption queriesm/Dec(sk,c)m/if Vrfy(vk,(c,π),σ)=0V(r,c,π)=0vk=vk, m:=; else, find j s.t. vkjvkj,mDec(skj,vkj,cj)(m0,m1)choose m0,m1cEnc(pk,m0;w)cwi{0,1}poly(κ),i[k];ciEnc(pki,vki,m0;wi),i[k];πSim2(r,c);σSign(ssk,(c,π))c:=(vk,c,π,σ)c=(vk,c,π,σ)decryption queriesm/Dec(sk,c)m/if Vrfy(vk,(c,π),σ)=0V(r,c,π)=0vk=vk, m:=; else, find j s.t. vkjvkj,mDec(skj,vkj,cj)return bbcompute b\color{darkblue}\begin{matrix}\mathcal{C}& &\mathcal{A}\\ \scriptsize(vk^*,ssk^*)\leftarrow\text{SigGen}(1^\kappa);\\(pk,sk)\leftarrow\text{Gen}'(1^\kappa) & \stackrel{pk}{\longrightarrow}\\ \color{red}\scriptsize r \leftarrow \text{Sim}_1(1^\kappa);\\ \scriptsize (pk_{i0},sk_{i0})\leftarrow\text{Gen}(1^\kappa),i\in[k];\\ \scriptsize(pk_{i1},sk_{i1})\leftarrow\text{Gen}(1^\kappa),i\in[k];\\ \scriptsize pk:=(pk_{1:k,0/1},r);sk:=(sk_{1:k,0/1}) \\ & \stackrel{c=(vk,\vec{c},\pi,\sigma)}{\longleftarrow}& \text{decryption queries}\\ m/\perp\leftarrow\text{Dec}'(sk,c) & \stackrel{m/\perp}{\longrightarrow}\\ \scriptsize \text{if } \text{Vrfy}(vk,(\vec{c},\pi),\sigma)=0\vee V(r,\vec{c},\pi)=0 \\\scriptsize \vee vk=vk^*,\ m:=\perp;\ \\\scriptsize\text{else, }\text{find } j \text{ s.t. }vk_j\ne vk^*_j,\\\scriptsize m\leftarrow \text{Dec}(sk_{j,vk_j},c_j) \\ & \stackrel{(m_0,m_1)}{\longleftarrow}& \text{choose }m_0,m_1\\ c^*\leftarrow \text{Enc}'(pk,m_0;\vec{w}^*)& \stackrel{c^*}{\longrightarrow}& \\ \scriptsize w_i^*\leftarrow\{0,1\}^{\text{poly}(\kappa)},i\in[k];\\ \scriptsize c_i^*\leftarrow\text{Enc}(pk_{i,vk^*_i},m_0;w_i^*),i\in[k];\\ \scriptsize \color{red}\pi^*\leftarrow \text{Sim}_2(r,\vec{c}^*);\\ \scriptsize \sigma^*\leftarrow\text{Sign}(ssk^*,(\vec{c}^*,\pi^*))\\\scriptsize c^*:=(vk^*,\vec{c}^*,\pi^*,\sigma^*)\\ & \stackrel{c=(vk,\vec{c},\pi,\sigma)}{\longleftarrow}& \text{decryption queries}\\ m/\perp\leftarrow\text{Dec}'(sk,c) & \stackrel{m/\perp}{\longrightarrow}\\ \scriptsize \text{if } \text{Vrfy}(vk,(\vec{c},\pi),\sigma)=0\vee V(r,\vec{c},\pi)=0 \\\scriptsize \vee vk=vk^*,\ m:=\perp;\ \\\scriptsize\text{else, }\text{find } j \text{ s.t. }vk_j\ne vk^*_j,\\\scriptsize m\leftarrow \text{Dec}(sk_{j,vk_j},c_j) \\\text{return }b' & \stackrel{b'}{\longleftarrow} & \text{compute }b'\end{matrix}

用 Lecture 4 中 NY-PKE 的 CCA1 安全性证明的 Game 0 Game 1 一步完全相同的方法,我们可以得到:

Pr[Game 3=1]Pr[Game 2=1]AdvaNIZKZK(κ)\left|\text{Pr}[\textbf{Game 3}=1]-\text{Pr}[\textbf{Game 2}=1]\right|\leq\textbf{Adv}_\text{aNIZK}^\text{ZK}(\kappa)

Game 4. 将 m0m_0 替换成 m1m_1

CA(vk,ssk)SigGen(1κ);(pk,sk)Gen(1κ)pkrSim1(1κ);(pki0,ski0)Gen(1κ),i[k];(pki1,ski1)Gen(1κ),i[k];pk:=(pk1:k,0/1,r);sk:=(sk1:k,0/1)c=(vk,c,π,σ)decryption queriesm/Dec(sk,c)m/if Vrfy(vk,(c,π),σ)=0V(r,c,π)=0vk=vk, m:=; else, find j s.t. vkjvkj,mDec(skj,vkj,cj)(m0,m1)choose m0,m1cEnc(pk,m1;w)cwi{0,1}poly(κ),i[k];ciEnc(pki,vki,m1;wi),i[k];πSim2(r,c);σSign(ssk,(c,π))c:=(vk,c,π,σ)c=(vk,c,π,σ)decryption queriesm/Dec(sk,c)m/if Vrfy(vk,(c,π),σ)=0V(r,c,π)=0vk=vk, m:=; else, find j s.t. vkjvkj,mDec(skj,vkj,cj)return bbcompute b\color{darkblue}\begin{matrix}\mathcal{C}& &\mathcal{A}\\ \scriptsize(vk^*,ssk^*)\leftarrow\text{SigGen}(1^\kappa);\\(pk,sk)\leftarrow\text{Gen}'(1^\kappa) & \stackrel{pk}{\longrightarrow}\\ \scriptsize r \leftarrow \text{Sim}_1(1^\kappa);\\ \scriptsize (pk_{i0},sk_{i0})\leftarrow\text{Gen}(1^\kappa),i\in[k];\\ \scriptsize(pk_{i1},sk_{i1})\leftarrow\text{Gen}(1^\kappa),i\in[k];\\\scriptsize pk:=(pk_{1:k,0/1},r);sk:=(sk_{1:k,0/1}) \\ & \stackrel{c=(vk,\vec{c},\pi,\sigma)}{\longleftarrow}& \text{decryption queries}\\ m/\perp\leftarrow\text{Dec}'(sk,c) & \stackrel{m/\perp}{\longrightarrow}\\ \scriptsize \text{if } \text{Vrfy}(vk,(\vec{c},\pi),\sigma)=0\vee V(r,\vec{c},\pi)=0 \\\scriptsize \vee vk=vk^*,\ m:=\perp;\ \\\scriptsize\text{else, }\text{find } j \text{ s.t. }vk_j\ne vk^*_j,\\\scriptsize m\leftarrow \text{Dec}(sk_{j,vk_j},c_j) \\ & \stackrel{(m_0,m_1)}{\longleftarrow}& \text{choose }m_0,m_1\\ c^*\leftarrow \text{Enc}'(pk,{\color{red}m_1};\vec{w}^*)& \stackrel{c^*}{\longrightarrow}& \\ \scriptsize w_i^*\leftarrow\{0,1\}^{\text{poly}(\kappa)},i\in[k];\\ \scriptsize c_i^*\leftarrow\text{Enc}(pk_{i,vk^*_i},{\color{red}m_1};w_i^*),i\in[k];\\ \scriptsize \pi^*\leftarrow \text{Sim}_2(r,\vec{c}^*);\\ \scriptsize \sigma^*\leftarrow\text{Sign}(ssk^*,(\vec{c}^*,\pi^*))\\\scriptsize c^*:=(vk^*,\vec{c}^*,\pi^*,\sigma^*)\\ & \stackrel{c=(vk,\vec{c},\pi,\sigma)}{\longleftarrow}& \text{decryption queries}\\ m/\perp\leftarrow\text{Dec}'(sk,c) & \stackrel{m/\perp}{\longrightarrow}\\ \scriptsize \text{if } \text{Vrfy}(vk,(\vec{c},\pi),\sigma)=0\vee V(r,\vec{c},\pi)=0 \\\scriptsize \vee vk=vk^*,\ m:=\perp;\ \\\scriptsize\text{else, }\text{find } j \text{ s.t. }vk_j\ne vk^*_j,\\\scriptsize m\leftarrow \text{Dec}(sk_{j,vk_j},c_j) \\\text{return }b' & \stackrel{b'}{\longleftarrow} & \text{compute }b'\end{matrix}

下面我们证明,如果有敌手 A\mathcal{A}Game 3 Game 4 输出 1 的概率不可忽略的不同,那么我们可以利用其攻破 PKE 的 CPA 安全性(可以类比 LorR-CPA 安全性,即确定一个 bb,用 kk 个不同的密钥对 mbm_b 进行加密,这个安全性的 bound 应该是 kAdvPKECPA(κ)k\textbf{Adv}_\text{PKE}^\text{CPA}(\kappa))。

CA/CAb{0,1}(pki,ski)i[k]Gen(1κ)pk1:k(pk,sk)Gen(1κ)pkrSim1(1κ);(pki,ski)i[k]Gen(1κ);pki,vki:=pki,pki,1vki=pkipk:=(pk1:k,0/1,r);sk:=(sk1:k,0/1)c=(vk,c,π,σ)cm/Dec(sk,c)m/if vk=vkVrfy(vk,(c,π),σ)=0V(r,c,π)=0, m:=; else, find j s.t. vkjvkj,mDec(skj,vkj,cj)m0,m1m0,m1cEnc(pk,m;w)c(wi)i[k]{0,1}poly(κ)m0,m1(ci)i[k]Enc(pki,vki,m0;wi)cπSim2(r,c);σ=Sign(ssk,(c,π))c:=(vk,c,π,σ)c=(vk,c,π,σ)cm/Dec(sk,c)m/if vk=vkVrfy(vk,(c,π),σ)=0V(r,c,π)=0, m:=; else, find j s.t. vkjvkj,mDec(skj,vkj,cj)bbb\color{darkblue}\small\begin{matrix}\mathcal{C'}& &\mathcal{A'/C} & &\mathcal{A}\\b\leftarrow\{0,1\}\\\scriptsize (pk_i,sk_i)_{i\in[k]}\leftarrow\text{Gen}(1^\kappa) & \stackrel{pk_{1:k}}{\longrightarrow} & (pk,sk)\leftarrow\text{Gen}'(1^\kappa)&\stackrel{pk}{\longrightarrow}\\ & &\scriptsize r \leftarrow \text{Sim}_1(1^\kappa);\\ & &\scriptsize (pk_{i}',sk_{i}')_{i\in[k]}\leftarrow\text{Gen}(1^\kappa);\\ & &\scriptsize pk_{i,vk_i^*}:=pk_i,pk_{i,1-vk_i^*}=pk_i'\\& &\scriptsize pk:=(pk_{1:k,0/1},r);sk:=(sk_{1:k,0/1}) \\ & & & \stackrel{c=(vk,\vec{c},\pi,\sigma)}{\longleftarrow}& c\\ & & m/\perp\leftarrow\text{Dec}'(sk,c) &\stackrel{m/\perp}{\longrightarrow}\\& &\scriptsize\text{if } vk=vk^*\vee\text{Vrfy}(vk,(\vec{c},\pi),\sigma)=0 \\& &\scriptsize \vee V(r,\vec{c},\pi)=0,\ m:=\perp;\ \\& &\scriptsize\text{else, }\text{find } j \text{ s.t. }vk_j\ne vk^*_j,\\& &\scriptsize m\leftarrow \text{Dec}(sk_{j,vk_j},c_j) \\ & & & \stackrel{m_0,m_1}{\longleftarrow}& m_0,m_1\\& & c^*\leftarrow\text{Enc}'(pk,m;\vec{w}^*) &\stackrel{c^*}{\longrightarrow}\\\scriptsize(w_i^*)_{i\in[k]}\leftarrow\{0,1\}^\text{poly}(\kappa) & \stackrel{m_0,m_1}{\longleftarrow}&\\ \scriptsize (c_i^*)_{i\in[k]}\leftarrow\text{Enc}(pk_{i,vk^*_i},m_0;w_i^*)& \stackrel{\vec{c}}{\longrightarrow}& \scriptsize \pi^*\leftarrow \text{Sim}_2(r,\vec{c}^*); \\& &\scriptsize\sigma^*=\text{Sign}(ssk^*,(\vec{c}^*,\pi^*)) \\ & & \scriptsize c^*:=(vk^*,\vec{c}^*,\pi^*,\sigma^*)\\ & & & \stackrel{c=(vk,\vec{c},\pi,\sigma)}{\longleftarrow}& c\\ & & m/\perp\leftarrow\text{Dec}'(sk,c) &\stackrel{m/\perp}{\longrightarrow}\\& &\scriptsize\text{if } vk=vk^*\vee\text{Vrfy}(vk,(\vec{c},\pi),\sigma)=0 \\& &\scriptsize \vee V(r,\vec{c},\pi)=0,\ m:=\perp;\ \\& &\scriptsize\text{else, }\text{find } j \text{ s.t. }vk_j\ne vk^*_j,\\& &\scriptsize m\leftarrow \text{Dec}(sk_{j,vk_j},c_j) \\&\stackrel{b'}{\longleftarrow} & &\stackrel{b'}{\longleftarrow} & b' \end{matrix}

b=0b=0 时,相当于模拟 Game 3;当 b=1b=1 时,相当于模拟 Game 4。于是,

Pr[Game 4=1]Pr[Game 3=1]= Pr[b=1b=1]Pr[b=1b=0] kAdvPKE,ACPA(κ) kAdvPKECPA(κ)\begin{aligned}&\left|\text{Pr}[\textbf{Game 4}=1]-\text{Pr}[\textbf{Game 3}=1]\right|\\=\ &\text{Pr}[b'=1|b=1]-\text{Pr}[b'=1|b=0] \\ \leq \ &k\textbf{Adv}_{\text{PKE},\mathcal{A}'}^\text{CPA}(\kappa)\\ \leq \ &k\textbf{Adv}_{\text{PKE}}^\text{CPA}(\kappa)\end{aligned}

Game 5. 类似 Game 3 的逆操作,将仿真器变回原始情况。

CA(vk,ssk)SigGen(1κ);(pk,sk)Gen(1κ)pkr{0,1}poly(κ);(pki0,ski0)Gen(1κ),i[k];(pki1,ski1)Gen(1κ),i[k];pk:=(pk1:k,0/1,r);sk:=(sk1:k,0/1)c=(vk,c,π,σ)decryption queriesm/Dec(sk,c)m/if Vrfy(vk,(c,π),σ)=0V(r,c,π)=0vk=vk, m:=; else, find j s.t. vkjvkj,mDec(skj,vkj,cj)(m0,m1)choose m0,m1cEnc(pk,m1;w)cwi{0,1}poly(κ),i[k];ciEnc(pki,vki,m1;wi),i[k];πP(r,c,(m1,w));σSign(ssk,(c,π))c:=(vk,c,π,σ)c=(vk,c,π,σ)decryption queriesm/Dec(sk,c)m/if Vrfy(vk,(c,π),σ)=0V(r,c,π)=0vk=vk, m:=; else, find j s.t. vkjvkj,mDec(skj,vkj,cj)return bbcompute b\color{darkblue}\begin{matrix}\mathcal{C}& &\mathcal{A}\\ \scriptsize(vk^*,ssk^*)\leftarrow\text{SigGen}(1^\kappa);\\(pk,sk)\leftarrow\text{Gen}'(1^\kappa) & \stackrel{pk}{\longrightarrow}\\ \color{red}\scriptsize r \leftarrow \{0,1\}^{\text{poly}(\kappa)};\\ \scriptsize (pk_{i0},sk_{i0})\leftarrow\text{Gen}(1^\kappa),i\in[k];\\ \scriptsize(pk_{i1},sk_{i1})\leftarrow\text{Gen}(1^\kappa),i\in[k];\\ \scriptsize pk:=(pk_{1:k,0/1},r);sk:=(sk_{1:k,0/1}) \\ & \stackrel{c=(vk,\vec{c},\pi,\sigma)}{\longleftarrow}& \text{decryption queries}\\ m/\perp\leftarrow\text{Dec}'(sk,c) & \stackrel{m/\perp}{\longrightarrow}\\ \scriptsize \text{if } \text{Vrfy}(vk,(\vec{c},\pi),\sigma)=0\vee V(r,\vec{c},\pi)=0 \\\scriptsize \vee vk=vk^*,\ m:=\perp;\ \\\scriptsize\text{else, }\text{find } j \text{ s.t. }vk_j\ne vk^*_j,\\\scriptsize m\leftarrow \text{Dec}(sk_{j,vk_j},c_j) \\ & \stackrel{(m_0,m_1)}{\longleftarrow}& \text{choose }m_0,m_1\\ c^*\leftarrow \text{Enc}'(pk,m_1;\vec{w}^*)& \stackrel{c^*}{\longrightarrow}& \\ \scriptsize w_i^*\leftarrow\{0,1\}^{\text{poly}(\kappa)},i\in[k];\\ \scriptsize c_i^*\leftarrow\text{Enc}(pk_{i,vk^*_i},m_1;w_i^*),i\in[k];\\ \scriptsize \color{red}\pi^*\leftarrow P(r,\vec{c}^*,(m_1,\vec{w}^*));\\ \scriptsize \sigma^*\leftarrow\text{Sign}(ssk^*,(\vec{c}^*,\pi^*))\\\scriptsize c^*:=(vk^*,\vec{c}^*,\pi^*,\sigma^*)\\ & \stackrel{c=(vk,\vec{c},\pi,\sigma)}{\longleftarrow}& \text{decryption queries}\\ m/\perp\leftarrow\text{Dec}'(sk,c) & \stackrel{m/\perp}{\longrightarrow}\\ \scriptsize \text{if } \text{Vrfy}(vk,(\vec{c},\pi),\sigma)=0\vee V(r,\vec{c},\pi)=0 \\\scriptsize \vee vk=vk^*,\ m:=\perp;\ \\\scriptsize\text{else, }\text{find } j \text{ s.t. }vk_j\ne vk^*_j,\\\scriptsize m\leftarrow \text{Dec}(sk_{j,vk_j},c_j) \\\text{return }b' & \stackrel{b'}{\longleftarrow} & \text{compute }b'\end{matrix}

类似从 Game 2 Game 3 的推导,有

Pr[Game 5=1]Pr[Game 4=1]AdvaNIZKZK(κ)\left|\text{Pr}[\textbf{Game 5}=1]-\text{Pr}[\textbf{Game 4}=1]\right|\leq\textbf{Adv}_\text{aNIZK}^\text{ZK}(\kappa)

Game 6. 类似 Game 2 的逆操作。

CA(vk,ssk)SigGen(1κ);(pk,sk)Gen(1κ)pkr{0,1}poly(κ);(pki0,ski0)Gen(1κ),i[k];(pki1,ski1)Gen(1κ),i[k];pk:=(pk1:k,0/1,r);sk:=(sk1,0/1)c=(vk,c,π,σ)decryption queriesm/Dec(sk,c)m/if Vrfy(vk,(c,π),σ)=0V(r,c,π)=0vk=vk, m:=; else, mDec(sk1,vk1,c1)(m0,m1)choose m0,m1cEnc(pk,m1;w)cwi{0,1}poly(κ),i[k];ciEnc(pki,vki,m1;wi),i[k];πP(r,c,(m1,w));σSign(ssk,(c,π))c:=(vk,c,π,σ)c=(vk,c,π,σ)decryption queriesm/Dec(sk,c)m/if Vrfy(vk,(c,π),σ)=0V(r,c,π)=0vk=vk, m:=; mDec(sk1,vk1,c1)return bbcompute b\color{darkblue}\begin{matrix}\mathcal{C}& &\mathcal{A}\\ \scriptsize(vk^*,ssk^*)\leftarrow\text{SigGen}(1^\kappa);\\(pk,sk)\leftarrow\text{Gen}'(1^\kappa) & \stackrel{pk}{\longrightarrow}\\ \scriptsize r \leftarrow \{0,1\}^{\text{poly}(\kappa)};\\ \scriptsize (pk_{i0},sk_{i0})\leftarrow\text{Gen}(1^\kappa),i\in[k];\\ \scriptsize(pk_{i1},sk_{i1})\leftarrow\text{Gen}(1^\kappa),i\in[k];\\ \scriptsize pk:=(pk_{1:k,0/1},r);\color{red}sk:=(sk_{1,0/1}) \\ & \stackrel{c=(vk,\vec{c},\pi,\sigma)}{\longleftarrow}& \text{decryption queries}\\ m/\perp\leftarrow\text{Dec}'(sk,c) & \stackrel{m/\perp}{\longrightarrow}\\ \scriptsize \text{if } \text{Vrfy}(vk,(\vec{c},\pi),\sigma)=0\vee V(r,\vec{c},\pi)=0 \\\scriptsize \vee vk=vk^*,\ m:=\perp;\ \text{else, }m\leftarrow \text{Dec}({\color{red}sk_{1,vk_1}},c_1) \\ & \stackrel{(m_0,m_1)}{\longleftarrow}& \text{choose }m_0,m_1\\ c^*\leftarrow \text{Enc}'(pk,m_1;\vec{w}^*)& \stackrel{c^*}{\longrightarrow}& \\ \scriptsize w_i^*\leftarrow\{0,1\}^{\text{poly}(\kappa)},i\in[k];\\ \scriptsize c_i^*\leftarrow\text{Enc}(pk_{i,vk^*_i},m_1;w_i^*),i\in[k];\\ \scriptsize \pi^*\leftarrow P(r,\vec{c}^*,(m_1,\vec{w}^*));\\ \scriptsize \sigma^*\leftarrow\text{Sign}(ssk^*,(\vec{c}^*,\pi^*))\\\scriptsize c^*:=(vk^*,\vec{c}^*,\pi^*,\sigma^*)\\ & \stackrel{c=(vk,\vec{c},\pi,\sigma)}{\longleftarrow}& \text{decryption queries}\\ m/\perp\leftarrow\text{Dec}'(sk,c) & \stackrel{m/\perp}{\longrightarrow}\\ \scriptsize \text{if } \text{Vrfy}(vk,(\vec{c},\pi),\sigma)=0\vee V(r,\vec{c},\pi)=0 \\\scriptsize \vee vk=vk^*,\ m:=\perp;\ m\leftarrow \text{Dec}({\color{red}sk_{1,vk_1}},c_1) \\\text{return }b' & \stackrel{b'}{\longleftarrow} & \text{compute }b'\end{matrix}

类似从 Game 1 Game 2 的推导,有

Pr[Game 6=1]Pr[Game 5=1]AdvaNIZKsound(κ)\left|\text{Pr}[\textbf{Game 6}=1]-\text{Pr}[\textbf{Game 5}=1]\right|\leq\textbf{Adv}_\text{aNIZK}^\text{sound}(\kappa)

Game 7. 类似 Game 1 的逆操作,即为 ExpPKE,ACCA2-1(κ)\textbf{Exp}_{\text{PKE}',\mathcal{A}}^\text{CCA2-1}(\kappa)

CA(pk,sk)Gen(1κ)pkr{0,1}poly(κ);(pki0,ski0)Gen(1κ),i[k];(pki1,ski1)Gen(1κ),i[k];pk:=(pk1:k,0/1,r);sk:=(sk1,0/1)c=(vk,c,π,σ)decryption queriesm/Dec(sk,c)m/if Vrfy(vk,(c,π),σ)=0V(r,c,π)=0,m:=;else,mDec(sk1,vk1,c1)(m0,m1)choose m0,m1cEnc(pk,m1;w)c(vk,ssk)SigGen(1κ);wi{0,1}poly(κ),i[k];ciEnc(pki,vki,m1;wi),i[k];πP(r,c,(m1,w));σSign(ssk,(c,π))c:=(vk,c,π,σ)c=(vk,c,π,σ)decryption queriesm/Dec(sk,c)m/if Vrfy(vk,(c,π),σ)=0V(r,c,π)=0,m:=;else,mDec(sk1,vk1,c1)return bbcompute b\color{darkblue}\begin{matrix}\mathcal{C}& &\mathcal{A}\\ (pk,sk)\leftarrow\text{Gen}'(1^\kappa) & \stackrel{pk}{\longrightarrow}\\ \scriptsize r \leftarrow \{0,1\}^{\text{poly}(\kappa)};\\ \scriptsize (pk_{i0},sk_{i0})\leftarrow\text{Gen}(1^\kappa),i\in[k];\\ \scriptsize(pk_{i1},sk_{i1})\leftarrow\text{Gen}(1^\kappa),i\in[k];\\ \scriptsize pk:=(pk_{1:k,0/1},r);sk:=(sk_{1,0/1}) \\ & \stackrel{c=(vk,\vec{c},\pi,\sigma)}{\longleftarrow}& \text{decryption queries}\\ m/\perp\leftarrow\text{Dec}'(sk,c) & \stackrel{m/\perp}{\longrightarrow}\\ \scriptsize \text{if } \text{Vrfy}(vk,(\vec{c},\pi),\sigma)=0\vee V(r,\vec{c},\pi)=0, \\\scriptsize m:=\perp;\quad\text{else,}\quad m\leftarrow \text{Dec}(sk_{1,vk_1},c_1) \\ & \stackrel{(m_0,m_1)}{\longleftarrow}& \text{choose }m_0,m_1\\ c^*\leftarrow \text{Enc}'(pk,m_1;\vec{w}^*)& \stackrel{c^*}{\longrightarrow}& \\ \color{red}\scriptsize (vk^*,ssk^*)\leftarrow\text{SigGen}(1^\kappa);\\ \scriptsize w_i^*\leftarrow\{0,1\}^{\text{poly}(\kappa)},i\in[k];\\ \scriptsize c_i^*\leftarrow\text{Enc}(pk_{i,vk^*_i},m_1;w_i^*),i\in[k];\\ \scriptsize \pi^*\leftarrow P(r,\vec{c}^*,(m_1,\vec{w}^*));\\ \scriptsize \sigma^*\leftarrow\text{Sign}(ssk^*,(\vec{c}^*,\pi^*))\\ \scriptsize c^*:=(vk^*,\vec{c}^*,\pi^*,\sigma^*)\\& \stackrel{c=(vk,\vec{c},\pi,\sigma)}{\longleftarrow}& \text{decryption queries}\\ m/\perp\leftarrow\text{Dec}'(sk,c) & \stackrel{m/\perp}{\longrightarrow}\\ \scriptsize \text{if } \text{Vrfy}(vk,(\vec{c},\pi),\sigma)=0\vee V(r,\vec{c},\pi)=0, \\\scriptsize m:=\perp;\quad\text{else,}\quad m\leftarrow \text{Dec}(sk_{1,vk_1},c_1) \\\text{return }b' & \stackrel{b'}{\longleftarrow} & \text{compute }b'\end{matrix}

类似从 Game 0 Game 1 的推导,有

Pr[Game 7=1]Pr[Game 6=1]AdvSIGSOT-UF-CMA(κ)\left|\text{Pr}[\textbf{Game 7}=1]-\text{Pr}[\textbf{Game 6}=1]\right|\leq\textbf{Adv}_{\text{SIG}}^\text{SOT-UF-CMA}(\kappa)

综上,由于 kk 是常数,

AdvPKE,ACCA-2(κ)= Pr[ExpPKE,ACCA2-1(κ)=1]Pr[ExpPKE,ACCA2-0(κ)=1]= Pr[Game 7=1]Pr[Game 0=1] i=06Pr[Game i+1=1]Pr[Game i=1] AdvSIGSOT-UF-CMA(κ)+AdvaNIZKsound(κ)+AdvaNIZKZK(κ)+kAdvPKECPA(κ)+AdvaNIZKZK(κ)+AdvaNIZKsound(κ)+AdvSIGSOT-UF-CMA(κ)= kAdvPKECPA(κ)+2AdvaNIZKsound(κ)+2AdvaNIZKZK(κ)+2AdvSIGSOT-UF-CMA(κ)= (6+k)negl(κ)= negl(κ)\begin{aligned}&\textbf{Adv}_{\text{PKE}',\mathcal{A}}^\text{CCA-2}(\kappa)\\=\ &\left|\text{Pr}[\textbf{Exp}_{\text{PKE}',\mathcal{A}}^{\text{CCA2-1}}(\kappa)=1]-\text{Pr}[\textbf{Exp}_{\text{PKE}',\mathcal{A}}^{\text{CCA2-0}}(\kappa)=1]\right| \\ =\ &\left|\text{Pr}[\textbf{Game 7}=1]-\text{Pr}[\textbf{Game 0}=1]\right|\\ \leq\ &\sum_{i=0}^6 \left|\text{Pr}[\textbf{Game }i+1=1]-\text{Pr}[\textbf{Game }i=1]\right|\\ \leq\ &\textbf{Adv}_{\text{SIG}}^\text{SOT-UF-CMA}(\kappa)+\textbf{Adv}_\text{aNIZK}^\text{sound}(\kappa)+\textbf{Adv}_\text{aNIZK}^\text{ZK}(\kappa) \\&+k\textbf{Adv}_\text{PKE}^\text{CPA}(\kappa)+ \textbf{Adv}_\text{aNIZK}^\text{ZK}(\kappa) + \textbf{Adv}_\text{aNIZK}^\text{sound}(\kappa) + \textbf{Adv}_{\text{SIG}}^\text{SOT-UF-CMA}(\kappa)\\ =\ & k\textbf{Adv}_\text{PKE}^\text{CPA}(\kappa)+2\textbf{Adv}_\text{aNIZK}^\text{sound}(\kappa)+2\textbf{Adv}_\text{aNIZK}^\text{ZK}(\kappa)+2\textbf{Adv}_{\text{SIG}}^\text{SOT-UF-CMA}(\kappa)\\=\ & (6+k)\text{negl}(\kappa)\\ =\ &\text{negl}(\kappa)\end{aligned}

于是,使用 Dolev-Dwork-Naor 构造的 PKE’ 具有 CCA2 安全。


一些其他 Theorems.