Let’s first consider the case where the receiver \({\mathcal R} ^*\) is malicious. Let the environment be denoted by \({\mathcal Z} \). Initially, the environment chooses an input \(\{\mathsf {x}\} \in \{0,1\}^{\lambda }\) and sends it to the honest sender \({\mathcal S} \) as his input.
6.1 Simulator Description
The strategy for the simulator \(\mathsf {Sim}\) against a malicious receiver \({\mathcal R} ^*\) is described below:
Token Exchange Phase:
Receive token \({\mathbf T} \) from \({\mathcal R} ^*\).
Token Interaction:
-
1.
Query the token with input “\(\mathsf {Start}\)” to receive \((\mathsf {c}_\mathsf {y}, \mathsf {c}_\mathsf {ek}, \mathsf {c}_\mathsf {sk}, \mathsf {c}_\mathsf {k}, \mathsf {vk})\).
-
2.
Pick random strings \((\mathsf {toss}, \mathsf {r}_\mathsf {ske.enc}, \mathsf {r}_{(\mathsf {c}_{\mathcal {GC}},\mathsf {ct})})\). Compute \(\mathsf {c}_{\mathcal {GC}} = \mathsf {Commit}(0^\lambda ;\mathsf {r}_{\mathcal {GC}})\).
-
3.
Using the simulator \(\mathsf {Sim}_\mathsf {RSZK}\), engage in an execution of an RSZK argument with \({\mathbf T} \) (who acts as the verifier) for the statement \(\mathsf {st}= (\mathsf {toss}, \mathsf {c}_{\mathcal {GC}},f) \in L\). That is, as part of the RSZK, if the next message of \(\mathsf {Sim}_\mathsf {RSZK}\) is \(\mathsf {msg}\), query \({\mathbf T} \) with input (“\(\mathsf {RSZK}\)”, \(\mathsf {toss}, \mathsf {c}_{\mathcal {GC}}, \mathsf {r}_\mathsf {ske.enc}, \mathsf {r}_{(\mathsf {c}_{\mathcal {GC}},\mathsf {ct})},\) \(\mathsf {msg})\). Note that \(\mathsf {Sim}\) forwards the code \({\mathsf M} \) of the token \({\mathbf T} \) that it received from \(\mathcal {F}_{\mathsf {WRAP}} \) to \(\mathsf {Sim}_{\mathsf {RSZK}}\).
-
4.
At the end of the above argument, receive \((\mathsf {ct}, \sigma _{(\mathsf {c}_{\mathsf {Sim}.\mathcal {GC}},\mathsf {ct})})\) from \({\mathbf T} \).
-
5.
Then, using the verifier algorithm \((\mathsf {RZKAOK.Verify})\), engage in an execution of a RZKAOK with \({\mathbf T} \) (who acts as the prover) for the statement \(\mathsf {st}^{\mathbf T} = (\mathsf {c}_{\mathcal {GC}},\mathsf {ct}, \sigma _{(\mathsf {c}_{\mathcal {GC}},\mathsf {ct})}, \mathsf {c}_\mathsf {y}, \mathsf {c}_\mathsf {ek}, \mathsf {c}_\mathsf {sk}, \mathsf {c}_\mathsf {k}, \mathsf {toss}, \mathsf {vk}, \mathsf {r}_\mathsf {ske.enc}, \mathsf {r}_{(\mathsf {c}_{\mathcal {GC}},\mathsf {ct})}) \in L^{{\mathbf T}}\). That is, as part of the RZKAOK, if the next message of the verifier is \(\mathsf {msg}\), query \({\mathbf T} \) with input (“\(\mathsf {RZKAOK}\)”, \(\mathsf {toss}, \mathsf {r}_\mathsf {ske.enc}, \mathsf {r}_{(\mathsf {c}_{\mathcal {GC}},\mathsf {ct})}, \mathsf {msg})\). Output \(\bot \) if the argument does not verify successfully.
Query to Ideal Functionality:
-
1.
Run \(\mathsf {Ext}_{\mathsf {RZKAOK}}\) on the transcript of the above argument to extract a witness \((\mathsf {y}, \mathsf {r}_\mathsf {y}, \mathsf {ek},\mathsf {r}_\mathsf {ek}, \mathsf {sk}, \mathsf {r}_\mathsf {sk}, \mathsf {k}, \mathsf {r}_\mathsf {k}, \ell _\mathsf {y},\mathsf {r}_\mathsf {Sign})\). Note that \(\mathsf {Sim}\) forwards the code \({\mathsf M} \) of the token \({\mathbf T} \) that it received from \(\mathcal {F}_{\mathsf {WRAP}} \) to \(\mathsf {Ext}_{\mathsf {RZKAOK}}\).
-
2.
Query the ideal functionality with input \(\mathsf {y}\) to receive as output \(\mathsf {out}\). The honest sender does not receive any output from the ideal functionality.
Communication Message:
-
1.
Using the output \(\mathsf {out}\), generate a simulated garbled circuit and simulated labels. That is, compute \((\mathsf {Sim}.\mathcal {GC},\mathsf {Sim}.\ell _{\mathsf {y}}) \leftarrow \mathsf {Sim.GC}(\mathsf {out})\).
-
2.
Compute a commitment to the garbled circuit. That is, compute \(\mathsf {c}_{\mathsf {Sim}.\mathcal {GC}} = \mathsf {Commit}(\mathsf {Sim}.\mathcal {GC};\mathsf {r}_{\mathsf {Sim}.\mathcal {GC}})\).
-
3.
Recompute the ciphertext and the signature using the same keys and randomness as done by the token. That is, compute \(\mathsf {ct}= \mathsf {ske.enc}(\mathsf {ek},\) \(\mathsf {Sim}.\ell _{\mathsf {y}};\mathsf {PRF}\) \((\mathsf {k},\mathsf {r}_\mathsf {ske.enc}))\), \(\sigma _{(\mathsf {c}_{\mathsf {Sim}.\mathcal {GC}},\mathsf {ct})} = \mathsf {Sign}(\mathsf {sk}, (\mathsf {c}_{\mathsf {Sim}.\mathcal {GC}},\mathsf {ct}); \mathsf {PRF}\) \((\mathsf {k},\mathsf {r}_{(\mathsf {c}_{\mathcal {GC}},\mathsf {ct})}))\).
-
4.
Send \((\mathsf {c}_{\mathsf {Sim}.\mathcal {GC}}, \mathsf {Sim}.\mathcal {GC}, \mathsf {r}_{\mathsf {Sim}.\mathcal {GC}}, \mathsf {ct}, \sigma _{(\mathsf {c}_{\mathsf {Sim}.\mathcal {GC}},\mathsf {ct})})\) to the receiver \({\mathcal R} ^*\).
6.2 Hybrids
We now show that the real and ideal worlds are computationally indistinguishable via a sequence of hybrid experiments where \(\mathsf {Hyb}_0\) corresponds to the real world and \(\mathsf {Hyb}_{4}\) corresponds to the ideal world.
-
\(\mathsf {Hyb}_0\) - Real World: Consider a simulator \(\mathsf {Sim}_{\mathsf {Hyb}}\) that performs exactly as done by the honest sender \({\mathcal S} \) in the real world.
-
\(\mathsf {Hyb}_1\) - Extraction: In this hybrid, \(\mathsf {Sim}_{\mathsf {Hyb}}\) runs the “Query to Ideal Functionality” phase as in the ideal world. That is, run the algorithm \(\mathsf {Ext}_\mathsf {RZKAOK}\) to extract \((\mathsf {y}, \mathsf {r}_\mathsf {y}, \mathsf {ek},\mathsf {r}_\mathsf {ek}, \mathsf {sk}, \mathsf {r}_\mathsf {sk}, \mathsf {k}, \mathsf {r}_\mathsf {k}, \ell _\mathsf {y},\mathsf {r}_\mathsf {Sign})\), then query the ideal functionality with the value \(\mathsf {y}\) to receive output \(\mathsf {out}\). Note that \(\mathsf {Sim}_{\mathsf {Hyb}}\) continues to use the honest circuit \(\mathcal {GC}\) and its commitment \(\mathsf {c}_{\mathcal {GC}}\) in its interaction with \({\mathbf T} \) and the receiver.
-
\(\mathsf {Hyb}_2\) - Simulate RSZK: In this hybrid, in its interaction with the token \({\mathbf T} \), \(\mathsf {Sim}_{\mathsf {Hyb}}\) computes the RSZK argument by running the simulator \(\mathsf {Sim}_\mathsf {RSZK}\) instead of running the honest prover algorithm \(\mathsf {RSZK.Prove}\). Note that \(\mathsf {Sim}_{\mathsf {Hyb}}\) forwards the code \({\mathsf M} \) of the token \({\mathbf T} \) that it received from \(\mathcal {F}_{\mathsf {WRAP}} \) to \(\mathsf {Sim}_{\mathsf {RSZK}}\).
-
\(\mathsf {Hyb}_3\) - Simulate Garbled Circuit: In this hybrid, \(\mathsf {Sim}_{\mathsf {Hyb}}\) computes the message sent to the receiver as in the ideal world. That is, after interacting with the token, \(\mathsf {Sim}_{\mathsf {Hyb}}\) does the following:
-
Using the output \(\mathsf {out}\), generate a simulated garbled circuit and simulated labels. That is, compute \((\mathsf {Sim}.\mathcal {GC},\mathsf {Sim}.\ell _{\mathsf {y}}) \leftarrow \mathsf {Sim.GC}(\mathsf {out})\).
-
Compute a commitment to the garbled circuit. That is, compute \(\mathsf {c}_{\mathsf {Sim}.\mathcal {GC}} = \mathsf {Commit}(\mathsf {Sim}.\mathcal {GC};\mathsf {r}_{\mathsf {Sim}.\mathcal {GC}})\).
-
Recompute the ciphertext and the signature using the same keys and randomness as done by the token. That is, compute \(\mathsf {ct}= \mathsf {ske.enc}(\mathsf {ek},\) \(\mathsf {Sim}.\ell _{\mathsf {y}};\mathsf {PRF}(\mathsf {k},\mathsf {r}_\mathsf {ske.enc}))\), \(\sigma _{(\mathsf {c}_{\mathsf {Sim}.\mathcal {GC}},\mathsf {ct})} = \mathsf {Sign}(\mathsf {sk}, (\mathsf {c}_{\mathsf {Sim}.\mathcal {GC}},\) \(\mathsf {ct}); \mathsf {PRF}(\mathsf {k},\mathsf {r}_{(\mathsf {c}_{\mathcal {GC}},\mathsf {ct})}))\).
-
Send \((\mathsf {c}_{\mathsf {Sim}.\mathcal {GC}}, \mathsf {Sim}.\mathcal {GC}, \mathsf {r}_{\mathsf {Sim}.\mathcal {GC}}, \mathsf {ct}, \sigma _{(\mathsf {c}_{\mathsf {Sim}.\mathcal {GC}},\mathsf {ct})})\) to the receiver \({\mathcal R} ^*\).
-
\(\mathsf {Hyb}_4\) - Switch Commitment: In this hybrid, \(\mathsf {Sim}_{\mathsf {Hyb}}\) computes \(\mathsf {c}_{\mathcal {GC}} = \mathsf {Commit}(0^\lambda ;\mathsf {r}_{\mathcal {GC}})\) and uses this in its interaction with the token. This hybrid corresponds to the ideal world.
We now prove that every pair of consecutive hybrids is computationally indistinguishable and this completes the proof.
Claim
Assuming the argument of knowledge property of the \(\mathsf {RZKAOK}\) system, \(\mathsf {Hyb}_0\) is computationally indistinguishable from \(\mathsf {Hyb}_1\).
Proof
The only difference between the two hybrids is that in \(\mathsf {Hyb}_1\), \(\mathsf {Sim}_{\mathsf {Hyb}}\) also runs the extractor \(\mathsf {Ext}_\mathsf {RZKAOK}\) to extract the adversary’s input \(\mathsf {y}\). Therefore, by the argument of knowledge property of the \(\mathsf {RZKAOK}\) system, we know that the extractor \(\mathsf {Ext}_\mathsf {RZKAOK}\) is successful except with negligible probability given the transcript of the argument and the code of the prover (that is, the token’s code \({\mathsf M} \)). Hence, the two hybrids are computationally indistinguishable.
Here, note that \(\mathsf {Sim}_{\mathsf {Hyb}}\) forwards the code \({\mathsf M} \) of the token \({\mathbf T} \) that it received from \(\mathcal {F}_{\mathsf {WRAP}} \) to the algorithm \(\mathsf {Ext}_{\mathsf {RZKAOK}}\).
Claim
Assuming the zero knowledge property of the \(\mathsf {RSZK}\) system, \(\mathsf {Hyb}_1\) is computationally indistinguishable from \(\mathsf {Hyb}_2\).
Proof
The only difference between the two hybrids is the way in which the \(\mathsf {RSZK}\) argument is computed. In \(\mathsf {Hyb}_1\), \(\mathsf {Sim}_{\mathsf {Hyb}}\) computes the \(\mathsf {RSZK}\) by running the honest prover algorithm \(\mathsf {RSZK.Prove}\), while in \(\mathsf {Hyb}_2\), \(\mathsf {Sim}_{\mathsf {Hyb}}\) computes the \(\mathsf {RSZK}\) by running the simulator \(\mathsf {Sim}_\mathsf {RSZK}\). Thus, it is easy to see that if there exists an adversary that can distinguish between these two hybrids with non-negligible probability, \(\mathsf {Sim}\) can use that adversary to break the zero knowledge property of the \(\mathsf {RSZK}\) argument system with non-negligible probability which is a contradiction.
Here, note that \(\mathsf {Sim}_{\mathsf {Hyb}}\) forwards the code \({\mathsf M} \) of the token \({\mathbf T} \) that it received from \(\mathcal {F}_{\mathsf {WRAP}} \) to the external challenger which it uses to run the algorithm \(\mathsf {Sim}_{\mathsf {RSZK}}\).
Claim
Assuming the security of the garbling scheme \((\mathsf {Garble},\mathsf {Eval})\) and the argument of knowledge property of the RZKAOK system, \(\mathsf {Hyb}_2\) is computationally indistinguishable from \(\mathsf {Hyb}_3\).
Proof
The only difference between the two hybrids is the way in which the garbled circuit and the labels that are sent to the receiver are computed. We show that if there exists an adversary \({\mathcal A} \) that can distinguish between the two hybrids, then there exists an adversary \({\mathcal A} _\mathsf {GC}\) that can break the security of the garbling scheme. The reduction is described below.
\({\mathcal A} _\mathsf {GC}\) interacts with the adversary \({\mathcal A} \) as done by \(\mathsf {Sim}_{\mathsf {Hyb}}\) in \(\mathsf {Hyb}_2\) except for the changes below. \({\mathcal A} _\mathsf {GC}\) first runs the token interaction phase and the query to ideal functionality phase as done by \(\mathsf {Sim}_{\mathsf {Hyb}}\) in \(\mathsf {Hyb}_2\). In particular, it picks a random string \(\mathsf {toss}\), computes \(\mathsf {c}_{\mathcal {GC}}\) as a commitment to an honest garbled circuit, generates a simulated RSZK argument, extracts the adversary’s input \(\mathsf {y}\) and learns the output \(\mathsf {out}\).
Then, \({\mathcal A} _\mathsf {GC}\) interacts with the challenger \(\mathsf {Chall}_\mathsf {GC}\) of the garbling scheme and sends the tuple \(({\mathcal C} _\mathsf {x},\mathsf {y}, \mathsf {out})\). Here, \({\mathcal C} _\mathsf {x}\) is a circuit that on input any string z outputs f(x, z). \(\mathsf {Chall}_\mathsf {GC}\) sends back a tuple \(({\mathcal C} ^*, \ell ^*_\mathsf {y})\) which is a tuple of garbled circuit and labels that are either honestly generated or simulated. Then, \({\mathcal A} _\mathsf {GC}\) computes \(\mathsf {c}^* = \mathsf {Commit}({\mathcal C} ^*;\mathsf {r}^*)\), \(\mathsf {ct}^* = \mathsf {ske.enc}(\mathsf {ek},\ell ^*_\mathsf {y};\mathsf {PRF}(\mathsf {k},\mathsf {r}_\mathsf {ske.enc}))\), \(\sigma _{(\mathsf {c}^*,\mathsf {ct}^*)} = \mathsf {Sign}(\mathsf {sk}, (\mathsf {c}^*,\mathsf {ct}^*); \mathsf {PRF}(\mathsf {k},\mathsf {r}_{(\mathsf {c}_{\mathcal {GC}},\mathsf {ct}^*)}))\). Finally, \({\mathcal A} _\mathsf {GC}\) sends \((\mathsf {c}^*, {\mathcal C} ^*, \mathsf {r}^*,\) \(\mathsf {ct}^*, \sigma _{(\mathsf {c}^*,\mathsf {ct}^*)})\) to the adversary \({\mathcal A} \) as the message from the sender.
Observe that when \(\mathsf {Chall}_\mathsf {GC}\) computes the garbled circuit and keys honestly, the interaction between \({\mathcal A} _\mathsf {GC}\) and \({\mathcal A} \) corresponds exactly to \(\mathsf {Hyb}_2\). This is true because even though in \(\mathsf {Hyb}_2\), its the token that generates the ciphertext \(\mathsf {ct}\) and the signature \(\sigma _{(\mathsf {c}_{\mathcal {GC}},\mathsf {ct})}\), from the argument of knowledge property of the scheme \(\mathsf {RZKAOK}\), we know that except with negligible probability, they were generated using the message and randomness exactly as computed by \({\mathcal A} _\mathsf {GC}\). Then, when \(\mathsf {Chall}_\mathsf {GC}\) simulates the garbled circuit and keys, the interaction between \({\mathcal A} _\mathsf {GC}\) and \({\mathcal A} \) corresponds exactly to \(\mathsf {Hyb}_3\). Now, note that the adversary \({\mathcal A} \) does not get access to the randomness \(\mathsf {toss}\) or the commitment \(\mathsf {c}_{\mathcal {GC}}\) sent to the token \({\mathbf T} ^*\) by the reduction \({\mathcal A} _\mathsf {GC}\). Also, crucially, the randomness used in either the ciphertext generation or the signature generation is completely independent of the message being encrypted or signed and hence they don’t leak any subliminal information from the token \({\mathbf T} ^*\) to the adversary \({\mathcal A} \). Finally, \({\mathcal A} _\mathsf {GC}\) does not require any of the randomness used by \(\mathsf {Chall}_\mathsf {GC}\) to generate the garbled circuit and labels since \({\mathcal A} _\mathsf {GC}\) simulates the RSZK argument in its interaction with \({\mathbf T} ^*\). Thus, if the adversary \({\mathcal A} \) can distinguish between these two hybrids with non-negligible probability, \({\mathcal A} _\mathsf {GC}\) can use the same guess to break the security of the garbling scheme with non-negligible probability which is a contradiction.
Claim
Assuming the hiding property of the commitment scheme \(\mathsf {Commit}\), \(\mathsf {Hyb}_3\) is computationally indistinguishable from \(\mathsf {Hyb}_4\).
Proof
The only difference between the two hybrids is the way in which the value \(\mathsf {c}_{\mathcal {GC}}\) is computed. In \(\mathsf {Hyb}_3\), it is computed as a commitment to the garbled circuit \(\mathcal {GC}\) while in \(\mathsf {Hyb}_4\), it is computed as a commitment to \(0^\lambda \). Note that the value committed to or the randomness for commitment is not used anywhere else since the \(\mathsf {RSZK}\) argument is now simulated. Thus, it is easy to see that if there exists an adversary that can distinguish between these two hybrids with non-negligible probability, \(\mathsf {Sim}\) can use that adversary to break the hiding property of the commitment scheme \(\mathsf {Commit}\) with non-negligible probability, which is a contradiction.