Half-gates garbling is efficient #
HalfGates.scheme hash of CslibFrontier.Crypto.Primitives.Garbling.HalfGates.Scheme is an
efficient garbling scheme (Scheme.IsEfficient) for XOR–AND circuits encoded by
encXorAndCircuit whenever the hash family hash is computed in polynomial time, as
CircularCorrelationRobust.polyTime provides: HalfGates.scheme_isEfficient.
En and De are those of point-and-permute garbling and ev is the semantics of conventional
circuits, so their certificates are projectiveEncode_polyTime,
PointPermute.decodeWord_polyTime and evalCirc_polyTime. The garbler computes the
zero labels by a fold over the gates of the encoded circuit whose state grows by one label per
gate, writes the body of the garbled function with PointPermute.bodyWith, whose four rows per
gate are here the AND bit, the two ciphertexts of an AND gate and an empty row, and reads the
decoding bits from the zero labels. The evaluator is a fold over the gates whose state is the
labels so far and the position of the next gate's block.
In both folds a new label is cut to k + 2 bits, which changes nothing since no label has more,
and which bounds the growth of the state; and wire numbers read in binary are capped at one past
the number of labels so far, which changes no lookup (List.getD_min_length_succ_sub_one).
A body whose rows read only the gate, its AND bit and the row number, as the bodies written by
the simulator and by the privacy reduction do, is certified once from gate data
(HalfGates.bodyWith_gateData_polyTime).
Main results #
Cslib.Crypto.Garbling.HalfGates.scheme_isEfficient: half-gates garbling is efficient.Cslib.Crypto.Garbling.HalfGates.bodyWith_gateData_polyTime: bodies from gate data whose rows read the gate, its AND bit and the row number are computed in polynomial time.
Lengths of labels #
The zero labels as a fold #
The evaluator as a fold with bounded growth #
The garbled function from gate data #
Certificates #
The hash on words is computed in polynomial time.
Tweaks are computed in polynomial time.
The evaluator's AND gate is computed in polynomial time.
A label read at a wire number written in binary, capped by the number of labels.
The sum of two words, cut to k + 2 bits.
Evaluation #
Bodies from gate data #
A garbled function body from gate data is computed in polynomial time when each row reads only the number of its gate, the gate's AND bit and its own number, and is computed in polynomial time from them.
Garbling #
Encoding information encInfoWord is computed in polynomial time from the security
parameter, the input count f.n, and the coins.
Half-gates garbling is efficient for every hash family computed in polynomial time
(CircularCorrelationRobust.polyTime supplies hf): the length readers n and m, the number of
coins and the garbler on (1^k, f, r), and En, Ev, De and ev on their encoded arguments,
run in polynomial time, for XOR–AND circuits encoded by encXorAndCircuit.