Faster Secure Two-Party Computation Using Garbled Circuits

Faster Secure Two-Party Computation Using Garbled Circuits

Faster Secure Two-Party Computation Using Garbled Circuits Yan Huang David Evans Jonathan Katz Lior Malka University of Virginia University of Maryland Intel∗ http://MightBeEvil.org Abstract The second approach relies on completeness theorems for secure computation [7, 8, 34] which give protocols Secure two-party computation enables two parties to for computing any function f starting from a Boolean- evaluate a function cooperatively without revealing to ei- circuit representation of f . This generic approach to se- ther party anything beyond the function’s output. The cure computation has traditionally been viewed as being garbled-circuit technique, a generic approach to secure of theoretical interest only since the protocols that result two-party computation for semi-honest participants, was require several symmetric-key operations per gate of the developed by Yao in the 1980s, but has been viewed circuit being executed and the circuit corresponding to as being of limited practical significance due to its in- even a very simple function can be quite large. efficiency. We demonstrate several techniques for im- Beginning with Fairplay [22], several implementa- proving the running time and memory requirements of tions of generic secure two-party computation have been the garbled-circuit technique, resulting in an implemen- developed in the past few years [11, 21, 27] and used tation of generic secure two-party computation that is to build privacy-preserving protocols for various func- significantly faster than any previously reported while tions (e.g., [4,13,16,26,29]). Fairplay and its successors also scaling to arbitrarily large circuits. We validate our demonstrated that Yao’s technique could be implemented approach by demonstrating secure computation of cir- to run in a reasonable amount of time for small circuits, cuits with over 109 gates at a rate of roughly 10 ms per but left the impression that generic protocols for secure garbled gate, and showing order-of-magnitude improve- computation could not scale to handle large circuits or in- ments over the best previous privacy-preserving proto- put sizes or compete with special-purpose protocols for cols for computing Hamming distance, Levenshtein dis- functions of practical interest. Indeed, some previous tance, Smith-Waterman genome alignment, and AES. works have explicitly rejected garbled-circuit solutions due to memory exhaustion [16, 26]. 1 Introduction The thesis of our work is that design decisions made by Fairplay, and followed in subsequent work, led re- Secure two-party computation enables two parties to searchers to severely underestimate the applicability of evaluate an arbitrary function of both of their inputs with- generic secure computation. We show that protocols con- out revealing anything to either party beyond the output structed using Yao’s garbled-circuit technique can out- of the function. We focus here on the semi-honest set- perform special-purpose protocols for several functions. ting, where parties are assumed to follow the protocol but may then attempt to learn information from the pro- tocol transcript (see further discussion in Section 1.2). 1.1 Contributions There are two main approaches to constructing proto- We show a general method for implementing privacy- cols for secure computation. The first approach exploits preserving applications using garbled circuits that is both specific properties of f to design special-purpose proto- faster and more scalable than previous approaches. Our cols that are, presumably, more efficient than those that improvements are of two types: we improve the effi- would result from generic techniques. A disadvantage of ciency and scalability of garbled circuit execution itself, this approach is that each function-specific protocol must and we provide a flexible framework that allows pro- be designed, implemented, and proved secure. grammers to optimize various aspects of the circuit for ∗Work done while at the University of Maryland. computing a given function. Hamming Distance (900 bits) Levenshtein Distance AES Online Time Overall Time Overall Time† Overall Time‡ Online Time Overall Time Best Previous 0.310 s [26] 213 s [26] 92.4 s 534 s 0.4 s [11] 3.3 s [11] Our Results 0.019 s 0.051 s 4.1 s 18.4 s 0.008 s 0.2 s Speedup 16.3 4176 22.5 29 50 16.5 Table 1: Performance comparisons for several privacy-preserving applications. † Inputs are 100-character strings over an 8-bit alphabet. The best previous protocol is the circuit-based protocol of [16]. ‡ Inputs are 200-character strings over an 8-bit alphabet. The best previous protocol is the main protocol of [16]. Garbled-circuit execution. In previous garbled-circuit to decide when to use depth-2 arithmetic circuits (which implementations including Fairplay, the garbled circuit can be computed using homomorphic encryption) rather (whose length is several hundreds bits per binary gate) than Boolean circuits. However, this is not enough to is fully generated and loaded in memory before circuit support many important circuit optimizations and there evaluation starts. This impacts both the efficiency of the are limited places where using homomorphic encryption resulting implementation and severely limits its scalabil- improves performance over an efficient garbled-circuit ity. We observe that it is unnecessary to generate and implementation. store the entire garbled circuit at once. By topologically We present a new method and supporting framework sorting the gates of the circuit and pipelining the process for generating efficient protocols for secure two-party of circuit generation and evaluation we can significantly computation. Our method enables programmers to gen- improve overall efficiency and scalability. Our imple- erate a secure protocol computing some function f from mentation never stores the entire garbled circuit, thereby an existing (insecure) implementation of f , while pro- allowing it to scale to effectively an unlimited number of viding enough control over the circuit design to enable gates using a nearly constant amount of memory. key optimizations to be employed. Our approach al- We also employ all known optimizations, includ- lows users to write their programs using a combination ing the “free XOR” technique [18], garbled-row reduc- of high-level and circuit-level Java code. Programmers tion [27], and oblivious-transfer extension [14]. Sec- need to be able to design Boolean circuits, but do not tion 2 provides cryptographic background and explains need to be cryptographic experts. Our framework en- the protocol and optimizations we use. ables circuits to be built and evaluated modularly. Hence, even very complex circuits can be generated, evaluated, Programming framework. Developing and debugging and debugged. This also provides the programmer with privacy-preserving applications using existing compil- opportunities to introduce important circuit-level opti- ers is tedious, cumbersome, and slow. For example, it mizations. Although we hope that such optimizations takes several hours for Fairplay to compile an AES pro- can eventually be done automatically by sophisticated gram written in SFDL, even on a computer with 40 GB compilers, our emphasis here is on providing a frame- of memory. Moreover, the high-level programming ab- work that makes it easy to implement privacy-preserving straction provided by Fairplay and other tools for secure applications. Section 3 provides details about our imple- computation obscures important opportunities for gener- mentation and efficiency improvements. ating more compact circuits. Although this design de- Results. We explore applications of our framework cision stems from the worthy goal of providing a high- to several problems considered in prior work including level programming interface for secure computation, it is secure computation of Hamming distance (Section 4) severely detrimental to performance. In particular, exist- and Levenshtein (edit) distance (Section 5), privacy- ing compilers (1) automatically garble the entire circuit, preserving genome alignment using the Smith-Waterman even when portions of the circuit can be computed lo- algorithm (Section 6), and secure evaluation of the AES cally without compromising privacy; (2) use more gates block cipher (Section 7). As summarized in Table 1, our than necessary, since they always use the maximum num- implementation yields privacy-preserving protocols that ber of bits needed for a particular variable, even when the are an order of magnitude more efficient than prior work, number of bits needed at some intermediate stage might in some cases beating even special-purpose protocols de- be significantly lower; (3) miss important opportunities signed (and claimed) to be more efficient than what could to replace general gates with XOR gates (which can be be obtained using a generic approach.1 garbled “for free” [18]); and (4) miss opportunities to use special-purpose (e.g., multiple input/output) gates that 1Results for the Smith-Waterman algorithm are not included in the may be more efficient than binary gates. TASTY [11] table since there is no prior work for meaningful comparison, as we provides a bit more control, by allowing the programmer discuss in Section 6. 1.2 Threat Model from lying about their inputs. Many interesting privacy- preserving applications do have the properties needed for In this work we adopt the semi-honest (also known as our approach to be effective. Namely, (1) both parties honest-but-curious) threat model, where parties are as- have a motivation

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    16 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us