Garbled Circuits are one fundamental technique for secure two-party computation. The presentation by David Heath at Eurocrypt 2022 introduces an improvement of previous work for garbling functions with branches. While in the classic garbled circuit setting branching on secret values cannot be supported as efficiently as branches in cleartext computation, the work of Stacked Garbling and this follow-up work, supports function evaluation with a large number of branches more efficiently. They also sketch an application for garbled private information retrieval (PIR).
Concretely, Stacked Garbling achieves sublinear communication cost w.r.t the circuit size, i.e. not all garbled values for the branches have to be sent. However, the evaluation work is still linear in the circuit size. The work “Garbled Circuits With Sublinear Evaluator” introduces a mechanism to support both sublinear communication and sublinear evaluation cost.
High Level Idea
Assume that the function consists of \(n\) different branches with individual circuits \(C_1, \dots, C_n\). The garbler creates \(\tilde{O}(\sqrt{n})\) buckets each holding \(\tilde{O}(\sqrt{n})\) elements. Next, the garbler samples the branch index \(i\) with replacement for each element and bucket, resulting in a mapping from branch index to bucket and position within the bucket.

The garbler encodes this mapping as a regular garbled circuit in such a way that the evaluator, given the wire label(s) denoting the branching condition, can obtain the bucket and position within the bucket in the clear. For each element in the bucket, the garbler creates an universal circuit that computes the same function as the sampled branch \(C_i\).
Sublinear communication for each bucket (Stacked Garbling)
For each bucket, the garbler uses techniques introduced in Stacked Garbling such that only garbling information related to a single branch (here: universal circuit) is transmitted.
When garbling, the garbler uses an individual random seed for each branch. Then, the encrypted wire labels at equivalent positions in different branches are XORed together resulting in a merged representation with the size of one garbled branch.

The evaluator needs to know which branch to evaluate. In this scenario, that information is included in the mapping. Further, the evaluator obtains the seeds of the inactive branches the same way. With those seeds, the evaluator re-creates the garbled inactive branches, and by XORing the respective wire labels with the merged representation obtains the garbled active branch which can now be evaluated as usual.
Therefore, applying this technique to every bucket separately, sends \(\tilde{O}(\sqrt{n})\) merged garbled branch representations.
Sublinear evaluation work
Now, achieving sublinear evaluation work is straight-forward. Through the mapping, the evaluator learns which bucket to evaluate and which branch in the bucket is the active one. While the evaluation work within the bucket is still linear in the bucket size, the overall evaluation work is sublinear since the bucket only contains \(\tilde{O}(\sqrt{n})\) elements.

Intuitive Security
The presented technique properly achieves secure two-party computation, i.e. doesn’t leak any (intermediary) private values to garbler or evaluator.
The main point of leakage in this method is that the evaluator needs to know which bucket to evaluate and which element in the bucket the active branch is. First, representing the branches as universal circuits hides their identity from the evaluator while finally evaluating the active branch. Second, the buckets need to be filled with replacement since the evaluator, when re-constructing the garbled inactive branches, is able to learn which branch was garbled (since they know the input to the universal circuit in the clear). However, since elements in the bucket are sampled with replacement, the existence of one branch doesn’t reveal new information about the other branches in the same bucket.
Garbled PIR
As an application, the authors show PIR. Each lookup of an element in PIR is represented as one branch in the circuit, therefore a PIR of \(n\) elements results in a circuit with \(n\) branches. Furthermore, since all branches have the same topological structure, constructing a universal circuit for this particular set of functions only costs constant overhead.
Unfortunately, no performance (estimates) for PIR are reported nor a comparison with other garbled PIR techniques.
The paper shows a nice improvement to reduce the linear cost of evaluation in Stacked Garbling. However, bucket sampling in its current form may hide impractically large constants since more than the \(n\) branches have to fit in the grid to have each branch present with high probability.
All images have been taken from the presentation slides: Abida Haque, David Heath, Vladimir Kolesnikov, Steve Lu, Rafail Ostrovsky, Akash Shah “Garbled Circuits With Sublinear Evaluator”


