Optimizing Secure Computation Programs with Private Conditionals

  • Peeter LaudEmail author
  • Alisa Pankova
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9977)


Secure computation platforms are often provided with a programming language that allows a developer to write privacy-preserving applications and hides away the underlying cryptographic details. The control flow of these programs is expensive to hide, hence branching on private values is often disallowed. The application programmers have to specify their programs in terms of allowed constructions, either using ad-hoc methods to avoid such branchings, or the general methodology of executing all branches and obliviously selecting the effects of one at the end. There may be compiler support for the latter.

The execution of all branches introduces significant computational overhead. If the branches perform similar private operations, then it may make sense to compute repeating patterns only once, even though the necessary bookkeeping also has overheads. In this paper, we propose a program optimization doing exactly that, allowing the overhead of private conditionals to be reduced. The optimization is quite general, and can be applied to various privacy-preserving platforms.



Supported by Estonian Research Council, grant IUT27-1.


  1. 1.
    Yao, A.C.: Protocols for secure computations (extended abstract). In: CSF 1982, pp. 160–164. IEEE Computer Society (1982)Google Scholar
  2. 2.
    Goldreich, O., Micali, S., Wigderson, A.: How to play any mental game or a completeness theorem for protocols with honest majority. In: Aho, A.V. (ed.) STOC 1987, pp. 218–229. ACM (1987)Google Scholar
  3. 3.
    Cramer, R., Damgård, I., Maurer, U.: General secure multi-party computation from any linear secret-sharing scheme. In: Preneel, B. (ed.) EUROCRYPT 2000. LNCS, vol. 1807, pp. 316–334. Springer, Heidelberg (2000). doi: 10.1007/3-540-45539-6_22 CrossRefGoogle Scholar
  4. 4.
    Malkhi, D., Nisan, N., Pinkas, B., Sella, Y.: Fairplay - a secure two-party computation system. In: SSYM 2004, USENIX Security Symposium, Berkeley, CA, USA, pp. 287–302. USENIX Association (2004)Google Scholar
  5. 5.
    Bogdanov, D., Laur, S., Willemson, J.: Sharemind: a framework for fast privacy-preserving computations. In: Jajodia, S., Lopez, J. (eds.) ESORICS 2008. LNCS, vol. 5283, pp. 192–206. Springer, Heidelberg (2008). doi: 10.1007/978-3-540-88313-5_13 CrossRefGoogle Scholar
  6. 6.
    Burkhart, M., Strasser, M., Many, D., Dimitropoulos, X.: SEPIA: privacy-preserving aggregation of multi-domain network events and statistics. In: SSYM 2010, USENIX Security Symposium, Washington, DC, USA, pp. 223–239. USENIX Association (2010)Google Scholar
  7. 7.
    Demmler, D., Schneider, T., Zohner, M.: ABY - a framework for efficient mixed-protocol secure two-party computation. In: NDSS 2015. The Internet Society (2015)Google Scholar
  8. 8.
    Bogdanov, D., Laud, P., Randmets, J.: Domain-polymorphic programming of privacy-preserving applications. In: Russo, A., Tripp, O. (eds.) PLAS@ECOOP 2014, p. 53. ACM (2014)Google Scholar
  9. 9.
    Nielsen, J.D., Schwartzbach, M.I.: A domain-specific programming language for secure multiparty computation. In: Hicks, M.W. (ed.) PLAS 2007, pp. 21–30. ACM (2007)Google Scholar
  10. 10.
    Schröpfer, A., Kerschbaum, F., Müller, G.: L1 - an intermediate language for mixed-protocol secure computation. In: COMPSAC 2011, pp. 298–307. IEEE Computer Society (2011)Google Scholar
  11. 11.
    Mitchell, J.C., Sharma, R., Stefan, D., Zimmerman, J.: Information-flow control for programming on encrypted data. In: Chong, S. (ed.) CSF 2012, pp. 45–60. IEEE Computer Society (2012)Google Scholar
  12. 12.
    Franz, M., Holzer, A., Katzenbeisser, S., Schallhart, C., Veith, H.: CBMC-GC: an ANSI C compiler for secure two-party computations. In: Cohen, A. (ed.) CC 2014. LNCS, vol. 8409, pp. 244–249. Springer, Heidelberg (2014). doi: 10.1007/978-3-642-54807-9_15 CrossRefGoogle Scholar
  13. 13.
    Zhang, Y., Steele, A., Blanton, M.: PICCO: a general-purpose compiler for private distributed computation. In: Sadeghi, A.-R., Gligor, V.D., Yung, M. (eds.) CCS 2013, pp. 813–826. ACM (2013)Google Scholar
  14. 14.
    Bogdanov, D., Niitsoo, M., Toft, T., Willemson, J.: High-performance secure multi-party computation for data mining applications. Int. J. Inf. Secur. 11, 403–418 (2012). doi: 10.1007/s10207-012-0177-2 CrossRefGoogle Scholar
  15. 15.
    Damgård, I., Pastro, V., Smart, N., Zakarias, S.: Multiparty computation from somewhat homomorphic encryption. In: Safavi-Naini, R., Canetti, R. (eds.) CRYPTO 2012. LNCS, vol. 7417, pp. 643–662. Springer, Heidelberg (2012). doi: 10.1007/978-3-642-32009-5_38 CrossRefGoogle Scholar
  16. 16.
    Pruulmann-Vengerfeldt, P., Kamm, L., Talviste, R., Laud, P., Bogdanov, D.: Capability Model, UaESMC Deliverable 1.1, March 2012Google Scholar
  17. 17.
    Planul, J., Mitchell, J.C.: Oblivious program execution and path-sensitive non-interference. In: CSF 2013, pp. 66–80. IEEE (2013)Google Scholar
  18. 18.
    Kennedy, W.S., Kolesnikov, V., Wilfong, G.: Overlaying circuit clauses for secure computation. Cryptology ePrint Archive, Report 2016/685 (2016).
  19. 19.
    Damgård, I., Geisler, M., Krøigaard, M., Nielsen, J.B.: Asynchronous multiparty computation: theory and implementation. In: Jarecki, S., Tsudik, G. (eds.) PKC 2009. LNCS, vol. 5443, pp. 160–179. Springer, Heidelberg (2009). doi: 10.1007/978-3-642-00468-1_10 CrossRefGoogle Scholar
  20. 20.
    Schrijver, A.: Theory of Linear and Integer Programming. Wiley Series in Discrete Mathematics & Optimization. Wiley, Chichester (1998)zbMATHGoogle Scholar
  21. 21.
    Zahur, S., Evans, D.: Obliv-C: a language for extensible data-oblivious computation. Cryptology ePrint Archive, Report 2015/1153 (2015).
  22. 22.
    Rastogi, A., Hammer, M.A., Hicks, M.W.: Wysteria: a programming language for generic, mixed-mode multiparty computations. In: SP 2014, pp. 655–670, IEEE Computer Society (2014)Google Scholar
  23. 23.
    Liu, C., Huang, Y., Shi, E., Katz, J., Hicks, M.W.: Automating efficient RAM-model secure computation. In: SP 2014, pp. 623–638, IEEE Computer Society (2014)Google Scholar
  24. 24.
    GLPK: GNU Linear Programming Kit.
  25. 25.
    Wielemaker, J., Schrijvers, T., Triska, M., Lager, T.: SWI-Prolog. Theory Pract. Log. Program. 12, 67–96 (2012)MathSciNetCrossRefzbMATHGoogle Scholar
  26. 26.
    Kamm, L., Willemson, J.: Secure floating point arithmetic and private satellite collision analysis. Int. J. Inf. Secur. 14, 531–548 (2015). doi: 10.1007/s10207-014-0271-8 CrossRefGoogle Scholar
  27. 27.
    Liu, N.-H., Chiang, C.-Y., Hsu, H.-M.: Improving driver alertness through music selection using a mobile EEG to detect brainwaves. Sensors 13, 8199–8221 (2013)CrossRefGoogle Scholar
  28. 28.
    Bogdanov, D., Kamm, L., Laur, S., Sokk, V.: Rmind: a tool for cryptographically secure statistical analysis. Cryptology ePrint Archive, Report 2014/512 (2014).
  29. 29.
    Krips, T., Willemson, J.: Hybrid model of fixed and floating point numbers in secure multiparty computations. In: Chow, S.S.M., Camenisch, J., Hui, L.C.K., Yiu, S.M. (eds.) ISC 2014. LNCS, vol. 8783, pp. 179–197. Springer, Heidelberg (2014). doi: 10.1007/978-3-319-13257-0_11 Google Scholar
  30. 30.
    Laud, P., Pankova, A.: Optimizing secure computation programs with private conditionals (full version). Cryptology ePrint Archive, Report 2016/942 (2016).

Copyright information

© Springer International Publishing AG 2016

Authors and Affiliations

  1. 1.Cybernetica ASTartuEstonia
  2. 2.Software Technologies and Applications Competence Centre (STACC)TartuEstonia
  3. 3.University of TartuTartuEstonia

Personalised recommendations