Download presentation

Presentation is loading. Please wait.

Published byDeanna Spring Modified over 4 years ago

1
Secure Computation Slides stolen from Joe Kilian & Vitali Shmatikov Boaz Barak

2
Goal of cryptology – protect messages from prying eyes. Lockboxes for data: data safe as long as it is locked up. Curses! I cannot read the message! 0100101010101000111010100 Well Done! Thank you, Sir Cryptographer! Cryptology – The First Few Millennia

3
Then: data protected, but not used. Now: Use data, but still protect it as much as possible. Secure Computation: Can we combine information while protecting it as much as possible? The Last Twenty Years

4
Want to know if both parties are interested in each other. But… Do not want to reveal unrequited love. He loves me, he loves me not… She loves me, she loves me not… Input = 1 : I love you Input = 0: I love you Must compute F(X,Y)=XÆY, giving F(X,Y) to both players. Can we reveal the answer without revealing the inputs? … as a friend The Love Game (AKA the AND game)

5
Pearl wants to know whether she has more toys than Gersh, Doesnt want to tell Gersh anything. Gersh is willing for Pearl to find out who has more toys, Doesnt want Pearl to know how many toys he has. Who has more toys? Who Cares? Pearl wants to know whether she has more toys than Gersh, Doesnt want to tell Gersh anything. Gersh is willing for Pearl to find out who has more toys, Doesnt want Pearl to know how many toys he has. Can we give Pearl the information she wants, and nothing else, without giving Gersh any information at all? The Spoiled Children Problem (AKA The Millionaires Problem [Yao])

6
Secret Key: S Public Key: P Trusted public servant cheerfully encrypts, decrypts, signs messages, when appropriate. S1S1 S2S2 S3S3 Blakley,Shamir,Desmedt-Frankel…: Can break secret key up among several entities, Can still encrypt, decrypt, sign, Remains secure even if a few parties are corrupted. Distributed Cryptographic Entities

7
Auction with private bids: Bids are made to the system, but kept private Only the winning bid, bidders are revealed. Can we have private bids where no one, not even the auctioneer, knows the losing bids? Normal auction: Players reveal bids – high bid is identified along with high bidders. Drawback: Revealing the losing bids gives away strategic information that bidders and auctioneers might exploit in later auctions. $2 $7 $3 $5 $4 Auctions with Private Bids

8
Final Tally: War: 2 Peace: 2 Nader: 1 The winner is: War War Peace War Peace Nader Electronic Voting

9
12345 X1X1 X2X2 X3X3 X4X4 X5X5 F 2 (X 1,…,X 5 )F 3 (X 1,…,X 5 )F 4 (X 1,…,X 5 )F 5 (X 1,…,X 5 ) F 1 (X 1,…,X 5 ) Players: 1,…,N Inputs: X 1,…,X N Outputs: F 1 (X 1,…,X N ),…,F N (X 1,…,X N ) Players should learn correct outputs and nothing else. Secure Computation (Yao, Goldreich-Micali-Wigderson)

10
A snuff Protocol Dont worry, Ill carry your secrets to the grave! The answer is… Ill Help! (for a rea- sonable con- sulting fee…) An Ideal Protocol 16 Tons X1X1 X2X2 F 1 (X 1,X 2 )F 2 (X 1,X 2 ) Goal: Implement something that looks like ideal protocol.

11
The Nature of the Enemy 1 5 24 5 71 1 00 109 7 0 1 4 0 1 Corrupting a player lets adversary: Learn its input/output See everything it knew, saw, later sees. Control its behavior (e.g., messages sent) That 80s CIA training sure came in handy… = input = output = changed

12
The winner still is: War Final Tally: Red-Blooded-American Patriots: Terrorist-Sympathizing Liberals: War Peace Privacy: Inputs should not be revealed. Correctness: Answer should correspond to inputs. Guantanamo The winner is: War 4 1 1 4 What can go wrong?

13
Outputs may reveal inputs: If candidate received 100% of the votes, we know how you voted. Cannot complain about adversary learning what it can by (independently) selecting its inputs and looking at its outputs. Cannot complain about adversary altering outcome solely by (independently) altering its inputs. Goal is to not allow the adversary to do anything else. Definitions very subtle: Beaver, Micali-Rogaway, Canetti… What We Can/Cant Hope For

14
Def: Let f:{0,1} n £ {0,1} n {0,1} n £ {0,1} n. A 2-party protocol P is an SFE for f if: Formal definition Correctness: Alice, Bob honest with inputs x,y resp. then Alice learns f 1 (x,y) and Bob learns f 2 (x,y) Security for Alice: If Alice honest with input x, then for every cheating Bob*, there is a simulator S* s.t. S* yIdeal f 2 (x,y) » » Security for Bob: symmetric. Alice(x)Bob*

15
Yao (GMW,GV,K,…): Yes! * Cryptographic solutions require reasonable assumptions e.g., hardness of factoring * Slight issues about both players getting answer at same time. As long as functions are computable in polynomial time, solutions require polynomial computation, communication. Goldreich-Micali-Wigderson (BGW,CCD,RB,Bea,…): Yes, if number of parties corrupted is less than some constant fraction of the total number of players (e.g., <n/2, <n/3). No hardness assumptions necessary. Can We Do It?

16
1 00 0 Yaos Protocol Compute any function securely First, convert the function into a boolean circuit AND xy z Truth table: xyz 0 10 1 00 11 1 00 0 OR xy z Truth table: xyz 0 11 1 01 11 ANDORAND NOT ORAND Alices inputs Bobs inputs

17
Overview: 1.Alice prepares garbled version C of C 2.Sends encrypted form x of her input x 3.Allows bob to obtain encrypted form y of his input y 4.Bob can compute from C,x,y the encryption z of z=C(x,y) 5.Bob sends z to Alice and she decrypts and reveals to him z ANDORAND NOT ORAND Alices inputs Bobs inputs Crucial properties: 1.Bob never sees Alices input x in unencrypted form. 2.Bob can obtain encryption of y without Alice learning y. 3.Neither party learns intermediate values. 4.Remains secure even if parties try to cheat.

18
Intuition ab c AND

19
Intuition ab c AND a a b b a b b a ab

20
1: Pick Random Keys For Each Wire Next, evaluate one gate securely –Later, generalize to the entire circuit Alice picks two random keys for each wire –One key corresponds to 0, the other to 1 –6 keys in total for a gate with 2 input wires AND x y z k 0z, k 1z Alice Bob k 0x, k 1x k 0y, k 1y

21
2: Encrypt Truth Table Alice encrypts each row of the truth table by encrypting the output-wire key with the corresponding pair of input-wire keys AND x y z k 0z, k 1z Alice Bob k 0x, k 1x k 0y, k 1y 1 00 0 Original truth table: xyz 0 10 1 00 11 Encrypted truth table: E k 0x (E k 0y (k 0z )) E k 0x (E k 1y (k 0z )) E k 1x (E k 0y (k 0z )) E k 1x (E k 1y (k 1z ))

22
3: Send Garbled Truth Table Alice randomly permutes (garbles) encrypted truth table and sends it to Bob AND x y z k 0z, k 1z Alice Bob k 0x, k 1x k 0y, k 1y Garbled truth table: E k 0x (E k 0y (k 0z )) E k 0x (E k 1y (k 0z )) E k 1x (E k 0y (k 0z )) E k 1x (E k 1y (k 1z )) E k 0x (E k 0y (k 0z )) E k 0x (E k 1y (k 0z )) E k 1x (E k 0y (k 0z )) E k 1x (E k 1y (k 1z )) Does not know which row of garbled table corresponds to which row of original table

23
4: Send Keys For Alices Inputs Alice sends the key corresponding to her input bit –Keys are random, so Bob does not learn what this bit is AND x y z k 0z, k 1z Alice Bob k 0x, k 1x k 0y, k 1y If Alices bit is 1, she simply sends k 1x to Bob; if 0, she sends k 0x Learns K bx where b is Alices input bit, but not b (why?) Garbled truth table: E k 0x (E k 0y (k 0z )) E k 0x (E k 1y (k 0z )) E k 1x (E k 0y (k 0z )) E k 1x (E k 1y (k 1z ))

24
5: Use OT on Keys for Bobs Input Alice and Bob run oblivious transfer protocol –Alices input is the two keys corresponding to Bobs wire –Bobs input into OT is simply his 1-bit input on that wire AND x y z k 0z, k 1z Alice Bob k 0x, k 1x k 0y, k 1y Run oblivious transfer Alices input: k 0y, k 1y Bobs input: his bit b Bob learns k by What does Alice learn? Knows K bx where b is Alices input bit and K by where b is his own input bit Garbled truth table: E k 0x (E k 0y (k 0z )) E k 0x (E k 1y (k 0z )) E k 1x (E k 0y (k 0z )) E k 1x (E k 1y (k 1z ))

25
6: Evaluate Garbled Gate Using the two keys that he learned, Bob decrypts exactly one of the output-wire keys –Bob does not learn if this key corresponds to 0 or 1 Why is this important? AND x y z k 0z, k 1z Alice Bob k 0x, k 1x k 0y, k 1y Knows K bx where b is Alices input bit and K by where b is his own input bit Garbled truth table: E k 0x (E k 0y (k 0z )) E k 0x (E k 1y (k 0z )) E k 1x (E k 0y (k 0z )) E k 1x (E k 1y (k 1z )) Suppose b=0, b=1 This is the only row Bob can decrypt. He learns K 0z

26
In this way, Bob evaluates entire garbled circuit –For each wire in the circuit, Bob learns only one key –It corresponds to 0 or 1 (Bob does not know which) Therefore, Bob does not learn intermediate values (why?) Bob tells Alice the key for the final output wire and she tells him if it corresponds to 0 or 1 –Bob does not tell her intermediate wire keys (why?) 7: Evaluate Entire Circuit ANDOR AND NOT OR AND Alices inputs Bobs inputs

27
8: Making it robust So far, protocol is only secure for honest-but-curious (aka semi-honest) adversaries: Alice can prepare faulty circuit (e.g. C(x,y)=y). Bob can give Alice wrong output. Solutions: Alice proves in zero knowledge that garbled circuit is correct. (Need also proofs of knowledge for inputs.) cut and choose – Alice prepares several copies of garbled circuit. Bob asks to open up some of them, and then they use an unopened one to compute.

28
Step 1: Break computations to be performed into itsy-bitsy steps. (additions, multiplications, bitwise operations) Is there any hope? Step 3: Despair at how many itsy-bitsy steps your computation takes. General solutions as impractical as they are beautiful. Step 2: For each operation... Can We Really Do It?

29
Naor-Pinkas-Sumner Functions computed when running auctions are simple. Can exploit algebraic structure to minimize work. Rabin: Can compute sums very efficiently Testing if two strings are equal is very practical. Sometimes, dont need too many itsy-bitsy operations. Highly optimize Yao-like constructions. Signs of Hope

30
Protocols are now very practical. Many interesting issues, both human and technical: What should our definitions be? Several commercial efforts Chaum, Neff, NEC,… Most extensively researched subarea of secure computation. 100,000 voters a piece of cake, 1,000,000 voters doable. Electronic Voting

Similar presentations

OK

Computational Security. Overview Goal: Obtain computational security against an active adversary. Hope: under a reasonable cryptographic assumption, obtain.

Computational Security. Overview Goal: Obtain computational security against an active adversary. Hope: under a reasonable cryptographic assumption, obtain.

© 2018 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google