A Verified DSL for MPC in

Slides:



Advertisements
Similar presentations
Quid-Pro-Quo-tocols Strengthening Semi-Honest Protocols with Dual Execution Yan Huang 1, Jonathan Katz 2, David Evans 1 1. University of Virginia 2. University.
Advertisements

Individual Position Slides: Jonathan Katz (University of Maryland) (Apologies I can’t be here in person)
Henry C. H. Chen and Patrick P. C. Lee
Simplified Gated Assignment Surinder Jain Supervisor : Bernhard Scholz Assignment 3 – INFO5993.
Wysteria: A Programming Language for Generic, Mixed-Mode Multiparty Computations Aseem Rastogi Matthew Hammer, Michael Hicks (University of Maryland, College.
1 Dependent Types for Termination Verification Hongwei Xi University of Cincinnati.
A Dynamic World, what can Grids do for Multi-Core computing? Daniel Goodman, Anne Trefethen and Douglas Creager
Ashish Kundu CS590F Purdue 02/12/07 Language-Based Information Flow Security Andrei Sabelfield, Andrew C. Myers Presentation: Ashish Kundu
The Design and Implementation of a Certifying Compiler [Necula, Lee] A Certifying Compiler for Java [Necula, Lee et al] David W. Hill CSCI
CLF: A Concurrent Logical Framework David Walker Princeton (with I. Cervesato, F. Pfenning, K. Watkins)
On the Correctness of Model Transformations Gabor Karsai ISIS/Vanderbilt University.
Automatic Implementation of provable cryptography for confidentiality and integrity Presented by Tamara Rezk – INDES project - INRIA Joint work with: Cédric.
1 CHAPTER 4 LANGUAGE/SOFTWARE Hardware Hardware is the machine itself and its various individual equipment. It includes all mechanical, electronic.
Information-Theoretic Security and Security under Composition Eyal Kushilevitz (Technion) Yehuda Lindell (Bar-Ilan University) Tal Rabin (IBM T.J. Watson)
CS527: (Advanced) Topics in Software Engineering Overview of Software Quality Assurance Tao Xie ©D. Marinov, T. Xie.
How to play ANY mental game
SPAR-MPC Day 1 Breakout Sessions Emily Shen 29 May 2014.
1. 2 Preface In the time since the 1986 edition of this book, the world of compiler design has changed significantly 3.
Semantics In Text: Chapter 3.
Lecture 5 1 CSP tools for verification of Sec Prot Overview of the lecture The Casper interface Refinement checking and FDR Model checking Theorem proving.
 Programming - the process of creating computer programs.
Java Example Presentation of a Language. Background Conception: Java began as a language for embedded processors in consumer electronics, such as VCR,
Programming Language Descriptions. What drives PL Development? Computers are “in charge” of extremely important issues Execute a program literally. Exercise.
Formal Verification of Quantum Cryptography Dominique Unruh University of Tartu.
Second Price Auctions A Case Study of Secure Distributed Computing Bart De Decker Gregory Neven Frank Piessens Erik Van Hoeymissen.
CS223: Software Engineering Lecture 21: Unit Testing Metric.
Today Threading, Cont. Multi-core processing. Java Never Ends! Winter 2016CMPE212 - Prof. McLeod1.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Sub-fields of computer science. Sub-fields of computer science.
The Post Windows Operating System
Garbling Techniques David Evans
A Fixed-key Blockcipher
COMP 2100 From Python to Java
SDN Network Updates Minimum updates within a single switch
The Exact Round Complexity of Secure Computation
The Exact Round Complexity of Secure Computation
A brief intro to: Parallelism, Threads, and Concurrency
An Operational Approach to Relaxed Memory Models
Verifying Stability of Network Protocols
CS408/533 Computer Networks Text: William Stallings Data and Computer Communications, 6th edition Chapter 1 - Introduction.
Types for Programs and Proofs
Introduction to programming
FIRST REVIEW.
MPC and Verifiable Computation on Committed Data
Foundations of Secure Computation
(One-Path) Reachability Logic
State your reasons or how to keep proofs while optimizing code
The first Few Slides stolen from Boaz Barak
Many-core Software Development Platforms
Course Business I am traveling April 25-May 3rd
Program Verification Using
Gabor Madl Ph.D. Candidate, UC Irvine Advisor: Nikil Dutt
Cryptography Lecture 19.
Is “Higher Level” Better?
Weaving Abstractions into Workflows
MapReduce Algorithm Design Adapted from Jimmy Lin’s slides.
Model Checking for an Executable Subset of UML
IS 2935: Developing Secure Systems
Making Secure Computation Practical
Knowledge Inference for Optimizing Secure Multi-party Computation
Semantics In Text: Chapter 3.
(Computer fundamental Lab)
ECE 352 Digital System Fundamentals
MPC Scenario 1. “Privacy-protected contingency tables”
QWIRE: A Core Language for Quantum Circuits
Protocol Verification by the Inductive Method
Helen: Maliciously Secure Coopetitive Learning for Linear Models
Pointer analysis John Rollinson & Kaiyuan Li
Cryptography Lecture 26.
Question 1 How are you going to provide language and/or library (or other?) support in Fortran, C/C++, or another language for massively parallel programming.
Presentation transcript:

A Verified DSL for MPC in Aseem Rastogi Microsoft Research India (Computer Aided Security Proofs, Aarhus, Denmark)

Secure Multi-party Computation (MPC) General n-party cryptographic protocols Compute f(x1, x2, x3) Without revealing inputs Input: x2 Encrypted msgs Input: x1 Input: x3 Circuit representation of f

Secure Multi-party Computation (MPC) General n-party cryptographic protocols Compute f(x1, x2, x3) Without revealing inputs Input: x2 f(x1, x2, x3) Input: x1 Input: x3 Circuit representation of f

Wide ranging applications of MPC Auctions Online ads Statistical computations over joint data Location privacy, and many more

How should we program MPC What programming interface (API) to use Requirements: Should be high-level Should simplify reasoning about the programs *We consider only honest-but-curious threat model

MPC frameworks Circuit libraries Circuit compilers Too low-level let g1 = Gate (AND, w1, w2) in let g2 = Gate (XOR, w2, w3) in … Too low-level let r = x + y + z in … Only monolithic circuit code What about normal computations around it ?

Unoptimized vs optimized median Joint median computation (x1, x2) (y1, y2) Assume: x1 < x2 y1 < y2 Distinct (x1, x2, y1, y2) let b = compare x1 y1 in let x3 = b ? x2 : x1 in let y3 = b ? y1 : y2 in smaller x3 y3 Instead of median, do PSI ? Do median, then say ad placement is PSI, and this is how PSI looks like. Non trivial about Poker. let b = do_sec (compare, x1) in let x3 = b ? x2 : x1 in do_sec (smaller, x3) let b = do_sec (compare, y1) in let y3 = b ? y1 : y2 in do_sec (smaller, y3)

Writing one program for each party Joint median computation (x1, x2) (y1, y2) Assume: x1 < x2 y1 < y2 Distinct (x1, x2, y1, y2) let b = do_sec (compare, x1) in let x3 = b ? x2 : x1 in do_sec (smaller, x3) let b = do_sec (compare, y1) in let y3 = b ? y1 : y2 in do_sec (smaller, y3) Not scalable Chances of errors, no tool support to catch them Reasoning about some program property as a whole is hard

Key Idea MPC Specific computation pattern Parties compute their programs, and Synchronize at secure computations We use this insight to design a better MPC language

Wysteria: DSL for Programming MPC A new high-level MPC language Supports n-party generic applications Wysteria programs are: written like regular single-threaded programs, and executed in a distributed, multi-party setting SIMD analogy, mention it … Third bullet -> implemented as a DSL embedded in F* > Mechanically verified toolchain, and enables formal verification of MPC programs

Key Idea of Wysteria We could write it in a single program let b = do_sec (compare, x1) in let x3 = a ? x2 : x1 in do_sec (smaller, x3) let b = as_sec {A, B} (compare x1 y1) in let x3 = as_par {A} (b ? x2 : x1) in let y3 = as_par {B} (b ? y1 : y2) in as_sec {A, B} (smaller x3 y3) let b = do_sec (compare, y1) in let y3 = a ? y1 : y2 in do_sec (smaller, y3) as_par and as_sec are two of the API functions exported by Wysteria {A}, {B}, {A, B} are party sets

Wysteria computational model let b = as_sec {A, B} (compare x1 y1) in let x3 = as_par {A} (b ? x2 : x1) in let y3 = as_par {B} (b ? y1 : y2) in as_sec {A, B} (smaller x3 y3) let b = as_sec {A, B} (compare x1 y1) in let x3 = as_par {A} (b ? x2 : x1) in let y3 = as_par {B} (b ? y1 : y2) in as_sec {A, B} (smaller x3 y3) let b = as_sec {A, B} (compare x1 y1) in let x3 = as_par {A} (b ? x2 : x1) in let y3 = as_par {B} (b ? y1 : y2) in as_sec {A, B} (smaller x3 y3) let b = as_sec {A, B} (compare x1 y1) in let x3 = as_par {A} (b ? x2 : x1) in let y3 = as_par {B} (b ? y1 : y2) in as_sec {A, B} (smaller x3 y3) Every party runs the same program as_par ps e – parties in ps perform e “locally, in-parallel” as_sec ps e – parties in ps perform e “jointly, using MPC”

Wysteria computational model let b = as_sec {A, B} (compare x1 y1) in let x3 = as_par {A} (b ? x2 : x1) in let y3 = as_par {B} (b ? y1 : y2) in as_sec {A, B} (smaller x3 y3)  let b = as_sec {A, B} (compare x1 y1) in let x3 = as_par {A} (b ? x2 : x1) in let y3 = as_par {B} (b ? y1 : y2) in as_sec {A, B} (smaller x3 y3) Every party runs the same program as_par ps e – parties in ps perform e “locally, in-parallel” as_sec ps e – parties in ps perform e “jointly, using MPC”

Wysteria computational model let b = as_sec {A, B} (compare x1 y1) in let x3 = as_par {A} (b ? x2 : x1) in let y3 = as_par {B} (b ? y1 : y2) in as_sec {A, B} (smaller x3 y3) let b = as_sec {A, B} (compare x1 y1) in let x3 = as_par {A} (b ? x2 : x1) in let y3 = as_par {B} (b ? y1 : y2) in as_sec {A, B} (smaller x3 y3)  Every party runs the same program as_par ps e – parties in ps perform e “locally, in-parallel” as_sec ps e – parties in ps perform e “jointly, using MPC”

Wysteria computational model let b = as_sec {A, B} (compare x1 y1) in let x3 = as_par {A} (b ? x2 : x1) in let y3 = as_par {B} (b ? y1 : y2) in as_sec {A, B} (smaller x3 y3) let b = as_sec {A, B} (compare x1 y1) in let x3 = as_par {A} (b ? x2 : x1) in let y3 = as_par {B} (b ? y1 : y2) in as_sec {A, B} (smaller x3 y3)  Every party runs the same program as_par ps e – parties in ps perform e “locally, in-parallel” as_sec ps e – parties in ps perform e “jointly, using MPC”

Wysteria computational model let b = as_sec {A, B} (compare x1 y1) in let x3 = as_par {A} (b ? x2 : x1) in let y3 = as_par {B} (b ? y1 : y2) in as_sec {A, B} (smaller x3 y3) let b = as_sec {A, B} (compare x1 y1) in let x3 = as_par {A} (b ? x2 : x1) in let y3 = as_par {B} (b ? y1 : y2) in as_sec {A, B} (smaller x3 y3)  Every party runs the same program as_par ps e – parties in ps perform e “locally, in-parallel” as_sec ps e – parties in ps perform e “jointly, using MPC”

Wysteria advantages over previous work let b = as_sec {A, B} (compare x1 y1) in let x3 = as_par {A} (b ? x2 : x1) in let y3 = as_par {B} (b ? y1 : y2) in as_sec {A, B} (smaller x3 y3) One, single-threaded program, scalable Design precludes a whole class of errors Do examples here. PSI. Poker. It’s written in F*, and it’s all verified. With each example, say what you proved about it. Higher assurance (Formal verification?)

Unoptimized vs optimized median as_sec {A, B} let b = compare x1 y1 in let x3 = b ? x2 : x1 in let y3 = b ? y1 : y2 in smaller x3 y3 Unoptimized median let b = as_sec {A, B} (compare x1 y1) in let x3 = as_par {A} (b ? x2 : x1) in let y3 = as_par {B} (b ? y1 : y2) in as_sec {A, B} (smaller x3 y3) Optimized median (runs faster) Instead of median, do PSI ? Do median, then say ad placement is PSI, and this is how PSI looks like. Non trivial about Poker. Optimized version reveals more, by design Is it secure ? Does it leak more than the unoptimized one ?

Formal verification of Wysteria programs Wysteria is implemented as a DSL in F* Wysteria programs are simply F* programs Programmers can use F* facilities to verify MPC programs

Sample Code for Median (In emacs)

Formally verifying the median properties as_sec {A, B} let b = compare x1 y1 in let x3 = b ? x2 : x1 in let y3 = b ? y1 : y2 in smaller x3 y3 Unoptimized median let b = as_sec {A, B} (compare x1 y1) in let x3 = as_par {A} (b ? x2 : x1) in let y3 = as_par {B} (b ? y1 : y2) in as_sec {A, B} (smaller x3 y3) Optimized median (runs faster) Instead of median, do PSI ? Do median, then say ad placement is PSI, and this is how PSI looks like. Non trivial about Poker. Both versions compute the correct median Optimized one does not leak more than the unoptimized one (Security verified in the idealized crypto model)

Wysteria metatheory Formalize two semantics C C’ π π’ Single-threaded semantics (Wysteria semantics in F*) Distributed semantics (for running the programs) Define a slice relation that relates a single-threaded configuration to its multi-party protocol Soundness theorem single-threaded termination * C C’ slices to * π π’ protocol termination

Wysteria metatheory Formalize two semantics Single-threaded semantics (Wysteria semantics in F*) Distributed semantics (for running the programs) Define a slice relation that relates a single-threaded configuration to its multi-party protocol Soundness theorem Properties verified in the source carry over when the programs are run in the distributed semantics Theorem mechanically verified in F*

Sample Code for Metatheory (In emacs)

Wysteria toolchain GMW is an MPC crypto protocol We use GMW implementation from Choi et. al. Interpreter converts as_sec code to boolean circuits dynamically