The simulator of point-and-permute garbling #
The privacy simulator of CslibFrontier.Crypto.Primitives.Garbling.Privacy written on words, for
the point-and-permute scheme PointPermute.scheme family with topology side information
(phiTopo). The simulator simWord family k y t sees the parameter k, the output y and the
topology t = (n, m, q, A, B). It samples one (k + 2)-bit label for each of the n + q wires
and four filler labels for each gate, and writes the view (F, X, d) (simViewWord): in each
gate's table, the row named by the colours of its argument wires' labels holds the gate's label
masked under their keys, and every other row holds a filler label; X lists the input wires'
labels, and d makes the output wires' colours decode to y when y has m bits.
The words written are those of the typed simulator simulateWith on toCircuit f, for every
valid circuit f of topology t, with the labels read from the coins (simViewWord_eq), and the
coins give uniform wire labels and filler rows (uniformList_map_simCoins). So the simulator's
output law is the typed simulator's (eval_simWord). Every view it writes for an output of m
bits, m the topology's output count, decodes to that output (decodeWord_evalWord_simViewWord).
Main definitions #
Cslib.Crypto.Garbling.PointPermute.viewWord: the words(F, X, d)of a typed view.Cslib.Crypto.Garbling.PointPermute.simViewWord,Cslib.Crypto.Garbling.PointPermute.simWord: the simulated view on given coins, and the simulator.
Main results #
Cslib.Crypto.Garbling.PointPermute.eval_simWord: the simulator samples the words of the typed simulator's view.Cslib.Crypto.Garbling.PointPermute.decodeWord_evalWord_simViewWord: every view the simulator writes for an output ofmbits,mthe topology's output count, decodes to that output.Cslib.Crypto.Garbling.PointPermute.isPPTOn_simWord: the simulator is PPT.
References #
The simulator's coins #
The number of coins of the simulator at parameter k for n inputs and q gates: one label
for each of the n + q wires, then four filler labels for each gate.
Row numbers determine the colours of a binary gate.
Distinct slots have distinct tweaks while 8 q ≤ 2 ^ k: slot a of row ρ of gate g
has the tweak 8 g + 2 rowIndex ρ + a, which is below 2 ^ k.
The simulator's coins are uniform labels. For a topology of binary gates, the wire labels and filler rows read from uniform coins are uniform and independent.
The simulated view #
Row i of gate g of the simulated garbled function at parameter k for the topology t:
the row named by the colours of the labels of the gate's argument wires holds the gate's label
masked by the keyed function at their keys; every other row holds its filler label.
The simulated view (F, X, d) at parameter k for the output y and the topology t, on the
simulator's coins: the garbled function with the header and wire numbers of t and the rows
simRow, the labels of the input wires, and the decoding bits that make the colours of the output
wires' labels decode to y when y has t.m bits.
The words (F, X, d) of a typed view at parameter k: the garbled function of its table, the
words of its input labels in order, and its decoding bits.
The simulated view is the typed simulator's #
The simulated view is the typed simulator's. For every valid circuit f, the simulated
view for the topology of f and the output y is the words of the typed simulated view of
toCircuit f, with the wire labels and filler rows read from the coins.
The simulator samples the typed simulator's view. For every valid circuit f and output
y, the simulator on the topology of f samples the words of the typed simulator's view of
toCircuit f.
Simulated views decode to the output. For every valid topology t, every output y of
t.m bits and all coins, decoding the evaluation of the simulated garbled input gives y.
Efficiency #
Labels of the simulator's coins are read in polynomial time.
The simulator is PPT. For every family computed in polynomial time, the simulator runs in uniform strict probabilistic polynomial time on the parameter in unary, the output and the encoded topology.