[
[
['145','add','hl'],
['148','add','hl'],
['141','add','hl'],
['33','remove','slide-up'],
['15','add','slide-down']
],
[
['26','add','hl'],
['26','remove','hidden'],
['27','add','hl'],
['27','remove','hidden'],
['28','add','hl'],
['28','remove','hidden'],
['142','add','hl'],
['142','remove','slide-left'],
['3','add','hidden'],
['145','remove','hl'],
['145','add','slide-left'],
['148','remove','hl'],
['148','add','slide-left'],
['141','remove','hl'],
['141','add','slide-right']
],
[
['26','remove','hl'],
['27','remove','hl'],
['28','remove','hl'],
['142','remove','hl'],
['10','add','hl'],
['144','add','hl'],
['50','remove','slide-up'],
['33','add','slide-down']
],
[
['145','add','hl'],
['145','remove','slide-left'],
['10','remove','hl'],
['10','add','hidden'],
['144','remove','hl'],
['144','add','slide-right']
],
[
['145','remove','hl'],
['26','add','hl'],
['147','add','hl'],
['68','remove','slide-up'],
['50','add','slide-down']
],
[
['56','add','hl'],
['56','remove','hidden'],
['144','add','hl'],
['144','remove','slide-right'],
['61','add','hl'],
['61','remove','hidden'],
['148','add','hl'],
['148','remove','slide-left'],
['26','remove','hl'],
['26','add','hidden'],
['147','remove','hl'],
['147','add','slide-right']
],
[
['56','remove','hl'],
['144','remove','hl'],
['61','remove','hl'],
['148','remove','hl'],
['156','add','hl'],
['61','add','hl'],
['86','remove','slide-up'],
['68','add','slide-down']
],
[
['78','add','hl'],
['78','remove','hidden'],
['156','remove','hl'],
['156','add','slide-left'],
['61','remove','hl'],
['61','add','hidden']
],
[
['78','remove','hl'],
['153','add','hl'],
['150','add','hl'],
['104','remove','slide-up'],
['86','add','slide-down']
],
[
['154','add','hl'],
['154','remove','slide-left'],
['153','remove','hl'],
['153','add','slide-right'],
['150','remove','hl'],
['150','add','slide-right']
],
[
['154','remove','hl'],
['8','add','hl'],
['155','add','hl'],
['121','remove','slide-up'],
['104','add','slide-down']
],
[
['156','add','hl'],
['156','remove','slide-left'],
['8','remove','hl'],
['8','add','hidden'],
['155','remove','hl'],
['155','add','slide-right']
],
[
['156','remove','hl'],
['5','add','hl'],
['78','add','hl'],
['138','remove','slide-up'],
['121','add','slide-down']
],
[
['125','remove','hidden'],
['155','add','hl'],
['155','remove','slide-right'],
['150','add','hl'],
['150','remove','slide-right'],
['130','add','hl'],
['130','remove','hidden'],
['5','remove','hl'],
['5','add','hidden'],
['78','remove','hl'],
['78','add','hidden']
],
[
['155','remove','hl'],
['150','remove','hl'],
['130','remove','hl']
]
]
\FORMATTINGHACK{\needspace{3\baselineskip}} The starting point is $\L_{h-1}$.
Unroll the first iteration of the for-loop ($i=h$). Since $h \in \{1, \ldots, n\}$, the loop indeed has a first iteration. The change has no effect on the calling program.
Replace a redundant variable to clean things up.
We can rename $S_0$ and $S_1$ to $\prftable[P\|\bit0]$ and $\prftable[P\|\bit1]$. Then we can select the correct one using the entire $h$-bit prefix $P'$ of $X$, not just the $h$-th individual bit.
The library samples $\prftable[P]$ and then later (perhaps many times) computes $G(\prftable[P])$. We could instead compute $G(\prftable[P])$ immediately when $\prftable[P]$ is sampled and store the results for later.
The library assigns $\prftable[P]$ and $\prftable[P']$ at the same time, for all possible pairs $P$ and $P'$, so it doesn't matter which of $\prftable[P]$ or $\prftable[P']$ we use in the if-condition.
Now $\prftable[P]$ is used \emph{only} as the seed to the PRG, so we can apply the security of the PRG $G$. The standard three-hop maneuver is not shown.
The library simultaneously samples both $\prftable[P']$ and its ``sibling'': the same string as $P'$ with last bit flipped. But only one of these values is needed in a single call to $\prfquery$. \FORMATTINGHACK{\pagebreak} Since these values are sampled independently, we can sample only the needed one and defer the sibling value until later (if needed). The result is $\L_{h}$, which completes the proof.
$\L_{h-1}$
$\L_{h}$
$P := \text{first } h-1 \text{ bits of } X$
$P' := \text{first } h \text{ bits of } X$
if
$\prftable[P]$ undefined:
$\prftable[P']$ undefined:
$\prftable[P] \gets \bits^\secpar$
$\prftable[P\|\bit{0}] \,\big\|\, \prftable[P\|\bit{1}] $
${}\gets \bits^{2\secpar}$
$\prftable[P'] \gets \bits^\secpar$
$R := \prftable[P]$
$\prftable[P\|\bit{0}] \,\big\|\, \prftable[P\|\bit{1}] := G(\prftable[P])$
$R := {}$
$S_{X[h]}$
$\prftable[ P' ]$
for $i = {}$
$h$ to $n$:
$h+1$ to $n$:
$S_0 \| S_1 := G(R)$
$R := S_{X[i]}$
return $R$