between a rock and a hard place: interpolating between mpc and fhe

47
Between a Rock and a Hard Place: Interpolating Between MPC and FHE Joint work with: Ashish Choudhury Jake Loftus Emmanuela Orsini Nigel P. Smart Arpita Patra

Upload: admon

Post on 24-Feb-2016

55 views

Category:

Documents


0 download

DESCRIPTION

Between a Rock and a Hard Place: Interpolating Between MPC and FHE. Arpita Patra. Joint work with: Ashish Choudhury Jake Loftus Emmanuela Orsini Nigel P. Smart. Secure Multiparty Computation (MPC). – . n parties P 1 ,...., P n t corrupted. P i has private input x i. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

Between a Rock and a Hard Place: Interpolating Between MPC

and FHE

Joint work with:Ashish ChoudhuryJake LoftusEmmanuela OrsiniNigel P. Smart

Arpita Patra

Page 2: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

Secure Multiparty Computation (MPC)

• A common n-input function f

• Pi has private input xi

Goal:- compute f(x1,x2,..xn) -- CorrectnessHide input of the

honest parties -- Privacy

• n parties P1,....,Pn t corrupted

Page 3: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

MPC Before and After FHE Arrived

• Small Computational Overhead• High Communication Overhead• Communication per mult gate

• Huge Computational Overhead• Low (circuit independent) Communication Overhead

Protocols in pre-FHE era

Protocols in post-FHE era

Page 4: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

MPC Before and After FHE ArrivedProtocols in pre-FHE era

Protocols in post-FHE era

parameter L

L = 2 L = infinity

We trade communication for computation in a simple way

Interpolate between these two

worlds

Page 5: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

The Main Contribution

“Distributed Bootstrapping” of SHE:

Reduced communication for MPC for relatively small values of L

Based on L-levelled somewhat homomorphic encryption (SHE) with the ability of distributed decryption

• Interactive (distributed decryption) • Communication efficient • Simple

• NOT the blueprint of Gentry

Page 6: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

x1 x2

x3 x4

REAL world

The Goal of MPC

y = f(x1,x2,x3,x4)

Page 7: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

x1 x2

x3 x4

REAL world

The Goal of MPC

y y

yy

y = f(x1,x2,x3,x4)

Page 8: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

x1 x2

x3 x4

REAL world

The Goal of MPCx1 x2

x3 x4

Any task

IDEAL world

Invisible

y = f(x1,x2,x3,x4)

y y

yy

Page 9: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

x1 x2

x3 x4

REAL world

The Goal of MPCx1 x2

x3 x4

Any task

IDEAL world

Invisible

y = f(x1,x2,x3,x4)

y y

yyyyyy

Page 10: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

• Represent f by Circuit C of say over a finite field F x1 x2 x3 x4

f(x1,x2,x3,x4)

addition gates multiplication gates

• Any computable f can be represented like this

GOAL: SECURE CIRCUIT EVALUATION

The first step of General MPC

Page 11: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

L-levelled SHE

Allows to evaluate any arithmetic circuit of multiplicative depth L in the encrypted form

With the guarantee that the encrypted outputs can be decrypted correctly at the end

L- leve

lled

x1

x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12

y1 y2 y3 y4 y5 y6

w1 w2 w3

z1

z2

Page 12: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

Threshold L-levelled SHE

Allows Distributed decryption For a threshold t, t+1 decryption keys are required to decrypt a ciphertext

L- leve

lled

x1

x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12

y1 y2 y3 y4 y5 y6

w1 w2 w3

z1

z2

Page 13: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

KeyGen: pk, sk

Enc (c, L) pk, m :

Dec m * l = [0,,,,L]

L = Label of freshness

ml

mL

: sk ,

L-levelled SHE

Page 14: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

L-levelled SHEKeyGen: pk, sk

Encpk

Decsk

Evalek

Evaluation Key: ek

x1

Lx2

Lx3

Lx4

L

x1x2

L x3 x4

L-1

Add

Mult l1,l2=[0,..,L]

m1 l1

m2 l2

m1 l1

m2 l2

m1m2

min(l1,l2)

m1 m2 min(l1,l2)-1

C(x1,x2,x3,x4) l

Page 15: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

Threshold L-levelled SHEKeyGen: pk, sk

Encpk

Decsk

Evalek

Evaluation Key: ek

Decryption Keys:

dk1,…….…dkn

Any t+1 sk

t is threshold

ShareDec dki, μi

ShareCombine ,{μ1 ... μn}

m

ml

ml

Page 16: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

Circuit Evaluation Using SHEx1

x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12

y1 y2 y3 y4 y5 y6

w1 w2 w3

z1

z2

D

• Parameter L : L-level SHE

L

L

Page 17: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

Circuit Evaluation Using SHEx1

x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12

y1 y2 y3 y4 y5 y6

z1

z2

D

• Parameter L : L-level SHE

L

L

Refresh

w1 w2 w3w1 w2 w3

• Fresh ciphertexts without perturbing the plaintext

w1 w2 w3

Page 18: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

How to Refresh?• Gentry’s Bootstrapping

No! Computationally Expensive

• “Distributed Bootstrapping” of SHE

• Interactive (distributed decryption) • Communication efficient • Simple

• Computationally inexpensive

Page 19: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

Distributed Refresh/BootstrappingRefresh

r is random

rL

ml

Mask: ml

rL

mrl

using distributed decryption of SHEDecrypt: m r

mrl

Re-encrypt: (m r) using Enc of SHE

mrL

Unmask: mrL

rL

mL

Page 20: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

Distributed Refresh/BootstrappingOffline Phase

r is random

rL

Page 21: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

Distributed Refresh/Bootstrapping

• r is random

rL

Mask: ml

rL

mrl

using distributed decryption of SHEDecrypt: m r

mrl

Re-encrypt: (m r) using Enc of SHE

mrL

Unmask: mrL

rL

mL

Decrypt: The only step involving communication in

Online Phase

Page 22: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

Improving Communication of Refresh

Tool: Packed SHE with message space FpN

m1 …… mN

Any ciphertext contains N message slots

m1

But, MPC is done over Fp

Parallelism: N ciphertexts are refreshed together

Page 23: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

…….

Refreshing N ciphertexts Together

m1

l1

mN

lN

m2

l2Pack

Ml

M=m1…..mN

l = min(l1,….lN)

• R=r1….. rN is random

RL

MaskDecrypt

Re-encryptUnmask

MLUnpack

…….

m1

L m2

L

mN

L

One dist. Decrypt for every N Ciphertexts

Gain by factor of NDistribute

d Decryptio

n

Page 24: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

Distributed Decryption of ml

dk1 dk2 dkn

ShareDecμ1

ShareDec ShareDec

μ2μn

Exchange μi’s with each other

ShareCombinem

ShareCombine ShareCombinem m

μ1,….., μn μ1,….., μn μ1,….., μn

Page 25: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

Actively Secure Distributed Decryption when n ≥ 3t+1

dk1 dk2 dkn

ShareDecμ1

ShareDec ShareDec

μ2 μn

Exchange μi’s with each other

ShareCombinem

ShareCombine ShareCombinem m

μ1,….., μn μ1,….., μn μ1,….., μn

Shamir Secret Sharing

Wrong Shares by corrupted

parties

Error Correctio

n

Error Correctio

n

Error Correctio

n

Page 26: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

Actively Secure Distributed Decryption when n ≥ 2t+1

dk1 dk2 dkn

ShareDecμ1

ShareDec ShareDec

μ2 μn

Exchange μi’s with each other

ShareCombinem

ShareCombine ShareCombinem m

μ1,….., μn μ1,….., μn μ1,….., μn

Use ZK Proofs !!Error Correctio

n

Error Correctio

n

Error Correctio

n

Only t instances !!

Heavy Machinery

Page 27: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

Actively Secure Distributed Decryption when n ≥ 2t+1

dk1 dk2 dkn

ShareDecμ1

ShareDec ShareDec

μ2 μn

Exchange μi’s with each other

ShareCombinem

ShareCombine ShareCombinem m

μ1,….., μn μ1,….., μn μ1,….., μn

Use ZK Proofs !!Error Detection

Error Detection

Error Detection

Only t instances !!

Heavy Machinery

Page 28: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

• O(n/L) field elements per multiplication gate

Communication Complexity of our MPC

• For small L; i.e. L=5, we already get better exact complexity compared to the traditional practical protocols

SHE is efficient for small values of L

• Hope: FHE is a fast growing area. We can increase L and can get even better communication complexity

Page 29: Between a Rock and a Hard Place: Interpolating Between MPC and FHE
Page 30: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

-1

• Inductively associate an integer label with each wire x1 x2 x3 x4

Input wires: label 1

Output wire of Add gate: min(label of input wires)

Output wire of Mult gate: min(label of input wires) - 1

Augmenting the Circuit

1 1 1 1

f(x1,x2,x3,x4)

1 0

Page 31: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

Augmenting the Circuit

-1

x1 x2 x3 x4

1 1 1 1

f(x1,x2,x3,x4)

1 0

Augment such that allowed labels [1,…,L]Refresh Gate: Re-labelling

Re

[1…L]

L

Page 32: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

Augmenting the Circuit

x1 x2 x3 x4

f(x1,x2,x3,x4)

L

L-1

L-2

1Re

L

1Re

L

1Re

L

1Re

L

-1

x1 x2 x3 x4

1 1 1 1

f(x1,x2,x3,x4)

1 0

Assume L >= 3

Page 33: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

Threshold L-levelled SHEKeyGen pk, sk

Enc (c, L) pk, m

Dec m sk, (c,l)

Decryption Keys:

dk1,…….…dkn

ShareDecdki, (c,l) μi

ShareCombine(c,l),{μ1 ... μn} m

* l = [0,,,,L]

Eval (e1,l1),…(eout,lout); l1 …. lout =[0,..,L] Ckt,ek

(c1,L),…,(cin,L)

Evaluation Key: ek

L = Label of freshness

Add (c,min(l1,,l2)); (c1,l1) (c2,l2) =

Mult (c,min(l1,,l2) – 1; (c1,l1) (c2,l2) =

Any t+1 sk

t is threshold

l1,l2=[0,..,L]

Page 34: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

Representing Encrypted Value

Ciphertext of plaintext m with level l = [0,..,L]m

l

Page 35: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

Distributed Refresh/BootstrappingRefresh

(cr,L)

(cm,l)• r is random

(cm,l)

(cr,L)

(cm+r,l)Mask:

(cm+r,l) using distributed decryption of SHEDecrypt: m+r

Re-encrypt: (cm+r,L) m+r using Enc of SHE

(cr,L)(cm+r,L) (cm,L)

Unmask:

ml

Page 36: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

Distributed Refresh/Bootstrapping

(cm+r,l) using distributed decryption of SHEDecrypt: m+r

• r is random

(cr,L)Refresh

(cr,L)

(cm,l)

(cm,l) (cm+r,l)Mask:

Re-encrypt: (cm+r,L) m+r using Enc of SHE

(cr,L)(cm+r,L) (cm,L)

Unmask:

Decrypt: The only step involving communication in

Online Phase

Page 37: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

…….(c3,l3)

Pack(c,min(l1,….lN))

Parallelizing Refresh for N ciphertexts

• r is random• cr is a packed ciphertext

(cr,L)

MaskDecrypt

Re-encryptUnmask

(c,L

Unpack…….(c1,L) (c2,L) (c3,L) (cN,L)

m1

l1

mN

lN

Page 38: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

Threshold L-levelled SHE(KeyGen, Enc, Dec, ShareDec, ShareCombine

pk, sk (c,L) m = Decsk (c,l); l = [0,,,,L]

dk1,……dkn

Decryption Keys

μi = ShareDecdki (c,l); l = [0,,,,L]

μi = ShareDecdki (c,l); l = [0,,,,L]

pk m

Page 39: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

(n, t) - Secret Sharing [Shamir 1979, Blackley 1979]

Secret s Dealer

v1 v2 v3 vn

Sharing Phase

Page 40: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

(n, t) - Secret Sharing [Shamir 1979, Blackley 1979]

Secret s Dealer

v1 v2 v3 vn

Sharing Phase

Less than t +1 parties have no info’ about the secret

ReconstructionPhase

Page 41: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

(n, t) - Secret Sharing [Shamir 1979, Blackley 1979]

Secret s Dealer

v1 v2 v3 vn

Sharing Phase

t +1 parties can reconstruct the secretSecret s

Reconstruction Phase

Page 42: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

(n,t) - Shamir Secret Sharing Sharing Phase:

Page 43: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

(n,t) - Shamir Secret Sharing Sharing Phase:

Page 44: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

(n,t) - Shamir Secret Sharing Sharing Phase:

Page 45: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

(n,t) - Shamir Secret Sharing Reconstruction Phase:

Page 46: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

(n,t) - Shamir Secret Sharing Reconstruction Phase:

Page 47: Between a Rock and a Hard Place: Interpolating Between MPC and FHE

(n,t) - Shamir Secret Sharing Reconstruction Phase: