[
[
['4','add','hl'],
['5','add','hl'],
['7','add','hl'],
['93','add','hl'],
['27','remove','slide-up'],
['12','add','slide-down']
],
[
['94','add','hl'],
['94','remove','slide-left'],
['95-slide','remove','slide-left'],
['3','add','hidden'],
['4','remove','hl'],
['4','add','hidden'],
['5','remove','hl'],
['5','add','hidden'],
['7','remove','hl'],
['7','add','hidden'],
['93','remove','hl'],
['93','add','slide-right']
],
[
['94','remove','hl']
],
[
['95-flip','add','flipped'],
['27','add','slide-down']
],
[
['9','add','hl'],
['97','add','hl']
],
[
['93','add','hl'],
['93','remove','slide-right'],
['47','add','hl'],
['47','remove','hidden'],
['48','remove','indent-1'],
['48','add','hl'],
['48','remove','hidden'],
['98','add','hl'],
['98','remove','slide-right'],
['9','remove','hl'],
['9','add','hidden'],
['48','add','indent-2'],
['97','remove','hl'],
['97','add','slide-left'],
['95-slide','add','slide-left']
],
[
['93','remove','hl'],
['47','remove','hl'],
['48','remove','hl'],
['98','remove','hl'],
['100','add','hl'],
['104','add','hl'],
['53','remove','slide-up']
],
[
['101','add','hl'],
['101','remove','slide-left'],
['57','add','hl'],
['57','remove','hidden'],
['100','remove','hl'],
['100','add','slide-right'],
['104','remove','hl'],
['104','add','slide-right']
],
[
['101','remove','hl'],
['57','remove','hl'],
['47','add','hl'],
['64','remove','slide-up'],
['53','add','slide-down']
],
[
['48','remove','indent-2'],
['47','remove','hl'],
['47','add','hidden'],
['48','add','indent-1']
],
[
['48','add','hl'],
['102','add','hl'],
['74','remove','slide-up'],
['64','add','slide-down']
],
[
['103','add','hl'],
['103','remove','slide-left'],
['48','remove','hl'],
['48','add','hidden'],
['102','remove','hl'],
['102','add','slide-right']
],
[
['103','remove','hl'],
['101','add','hl'],
['57','add','hl'],
['83','remove','slide-up'],
['74','add','slide-down']
],
[
['85','remove','hidden'],
['100','add','hl'],
['100','remove','slide-right'],
['104','add','hl'],
['104','remove','slide-right'],
['89','add','hl'],
['89','remove','hidden'],
['101','remove','hl'],
['101','add','slide-right'],
['57','remove','hl'],
['57','add','hidden']
],
[
['100','remove','hl'],
['104','remove','hl'],
['89','remove','hl']
]
]
The starting point is $\lib{cpa-real}$.
We can apply the security of the PRF in a standard three-hop maneuver:
\FORMATTINGHACK{\needspace{2\baselineskip}\noindent}Sampling $R$ uniformly is indistinguishable from sampling without replacement. The standard three-hop maneuver involving \lemmaref{comp.lem.birthday-lib} is not shown.\FORMATTINGHACK{\pagebreak}
In this hybrid, the $R$ values can never repeat, so the if-statement is always taken. Thus, we can make its body unconditional.
Each value of $\prftable[R]$ is sampled uniformly and used only in a single \xor expression. As a result, $S$ is a OTP encryption of $\ptxt$, with $\prftable[R]$ playing the role of the key. In other words, $S$ is distributed uniformly. The three-hop maneuver involving \claimref{provsec.clm.otp} is not shown.
Finally, we can revert a previous change, so that $R$ is again sampled uniformly with replacement. The result is $\lib{cpa-rand}$, which completes the proof.
$\lib{cpa-real}$
$\key \gets \bits^\secpar$
$\lib{cpa-rand}$
$R \gets \bits^\secpar$
$$
${} \setminus \mathcal{R}$
$$
$Y := {}$
$F(\key,R)$
$\prfquery(R)$
$\mathcal{R} := \mathcal{R} \cup \{R\}$
if $\prftable[R]$ undefined:
$\prftable[R] \gets \bits^n$
$S $
${}:= {}$
$Y \oplus \ptxt$
$\prftable[R] \oplus \ptxt$
${}\gets \bits^n$
return $R\|S$
$\link$
$\lib{prf-real}$
$\key \gets \bits^\secpar$
return $F(\key,X)$
$\lib{prf-rand}$
if $\prftable[X]$ undefined:
$\prftable[X] \gets \bits^n$
return $\prftable[X]$