TinyGarble2: Smart, Efficient, and Scalable Yao's Garble Circuit

Siam U. Hussain, Baiyu Li, Farinaz Koushanfar, Rosario Cammarota

TL;DR

TinyGarble2 is a C++ framework for privacy-preserving computation using Yao's Garbled Circuit protocol. It offers significant speedups and memory efficiency, particularly for complex tasks like neural network inference, by introducing smart abstractions and optimized components.

What Problem Does This Paper Address?

Multi-Party Computation (MPC) allows multiple parties to jointly compute a function without revealing their private inputs. Yao's Garbled Circuit (GC) is a highly efficient protocol for two-party computation. However, practical GC frameworks often struggle with a trade-off between performance, scalability (especially for large computations like neural networks), and ease of use. Existing frameworks might excel in one area but fall short in others, leading to limitations in applying GC to real-world, large-scale privacy-sensitive applications.

Methods

TinyGarble2 builds upon its predecessor, TinyGarble, by introducing a two-layer architecture:

  1. GC Back-end: This layer handles the core GC protocol execution. It supports both honest-but-curious and malicious security models with identical interfaces, allowing users to switch security levels easily. A key innovation is its memory management, which ensures only a limited number of garbled gates reside in memory at any given time, crucial for scalability. It also supports heterogeneous loops, where different logic can be executed in successive cycles, unlike previous frameworks that were limited to homogeneous loops.
  2. Programming Interface: This layer provides a C++ library with common arithmetic and logical building blocks. It abstracts away the complexities of GC, allowing developers to build applications using familiar programming constructs. This layer supports integers from 1 to 64 bits and offers pre-compiled, optimized netlists for common operations, leveraging HDL synthesis tools without requiring developers to use HDLs themselves.

Datasets

The paper evaluates TinyGarble2 using the MNIST dataset for Convolutional Neural Network (CNN) inference with a pre-trained LeNet-5 model.

Key Insights and Ideas

  • Smart Abstraction is Key: The two-layer design (back-end for protocol, interface for programming) is crucial for balancing performance, scalability, and developer convenience.
  • Memory Management for Scalability: By managing garbled gates in memory dynamically, TinyGarble2 achieves significantly better memory efficiency for large computations, a bottleneck in many prior GC frameworks.
  • Heterogeneous Loops Unlock Real-World Applications: Supporting loops with varying logic per iteration is essential for complex tasks like modern neural networks, and TinyGarble2's inclusion of this feature is a significant step.
  • Pre-compiled Netlists Bridge HDL and C++: Providing optimized netlists for common operations allows developers to benefit from HDL-level optimizations while programming in C++, a major usability improvement.

Key Results

  • Matrix Multiplication: TinyGarble2 is competitive with Obliv-C in speed and memory for matrix multiplication, and significantly outperforms ABY, especially in memory usage for larger matrices.
  • CNN Inference (LeNet-5): TinyGarble2 demonstrates remarkable performance improvements for CNN inference on the MNIST dataset. Compared to Obliv-C, TinyGarble2 is:
  • Up to 33.1x faster.
  • Up to 64% more memory efficient.
  • Specifically, using 32-bit variables and 64-bit MAC outputs, it achieves 9.11E+01 seconds runtime and 45.83 MB peak memory.

Limitations and Future Work

  • Malicious Model Trade-off: While TinyGarble2 supports the malicious security model, there's a trade-off in the malicious setting where increased Oblivious Transfer (OT) extensions can increase runtime. However, the framework offers flexibility by allowing more OT extensions to reduce memory usage.
  • Variable Bit-Widths: While the GC back-end supports arbitrary bit-widths, the programming interface currently requires developers to merge multiple integers for variables exceeding 64 bits.
  • Future Work: The paper implicitly suggests that further optimization of the malicious model's performance and potentially expanding the native bit-width support in the programming interface would be valuable directions.

Summary updated

BibTeX
@article{hussain2020tinygarble,
  author = {Siam U. Hussain and Baiyu Li and Farinaz Koushanfar and Rosario Cammarota},
  title = {{TinyGarble2: Smart, Efficient, and Scalable Yao's Garble Circuit}},
  journal = {IACR Cryptol. ePrint Arch.},
  year = {2020},
  url = {https://openreview.net/forum?id=pcx_Rm9cnO},
}

Loading related content...

Figure