CTIC Damg ard, Pastro, Smart, Zakarias (-.-) MPC from SHE - - PowerPoint PPT Presentation

ctic
SMART_READER_LITE
LIVE PREVIEW

CTIC Damg ard, Pastro, Smart, Zakarias (-.-) MPC from SHE - - PowerPoint PPT Presentation

Multiparty Computation from Somewhat Homomorphic Encryption ard 1 Valerio Pastro 1 Nigel Smart 2 Sarah Zakarias 1 Ivan Damg 1 Aarhus University 2 Bristol University November 9, 2011 CTIC Damg ard, Pastro, Smart, Zakarias


slide-1
SLIDE 1

Multiparty Computation from Somewhat Homomorphic Encryption

Ivan Damg˚ ard1 Valerio Pastro1 Nigel Smart2 Sarah Zakarias1

1Aarhus University 2Bristol University

November 9, 2011

交互计算

CTIC

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 1 / 36

slide-2
SLIDE 2

1

Introduction

2

Online Phase

3

Preprocessing

4

An Improved Online Phase

5

Concrete Scheme

6

Benchmarks

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 2 / 36

slide-3
SLIDE 3

Multiparty Computation

The problem

n parties: P1, . . . , Pn for all i Pi has private input xi a function f : (x1, . . . , xn) → (y1, . . . , yn)

Outcome

for all i yi to be delivered to Pi no more info revealed

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 3 / 36

slide-4
SLIDE 4

Applications – Examples

The millionaire problem [Yao82]: n = 2, xi = Pi’s income, f (x1, x2) = (b, b), where xb = max{x1, x2} Keywords search Set intersection Auctions (e.g. the sugar beet auction, Denmark 2008) Dominik’s dating problem . . .

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 4 / 36

slide-5
SLIDE 5

Multiparty Computation – Ideal

The ideal solution: A trusted party! P1 P2 P3 f Pn

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 5 / 36

slide-6
SLIDE 6

Multiparty Computation – Ideal

Players send their inputs.. P1

x1

P2

x2

P3

x3

✱ f

Pn

xn

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 6 / 36

slide-7
SLIDE 7

Multiparty Computation – Ideal

..and get their result. P1 P2 P3 f

y1

y2

y3

yn

Pn

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 7 / 36

slide-8
SLIDE 8

Multiparty Computation – Real

The trusted party: useful? P1

✮ ☞

P2

✐ q ⑤

P3

▲ ✶ ✕

f Pn

❁ ❯

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 8 / 36

slide-9
SLIDE 9

Multiparty Computation – Dealing with Players

Ideal scenario ⇒ concrete protocol?

The setup – Real world

n parties: P1, . . . , Pn for all i Pi has private input xi f replaced by interaction between players and local computation

Outcome

for all i yi to be delivered to Pi no more info revealed

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 9 / 36

slide-10
SLIDE 10

Multiparty Computation – Those Annoying Players

Some players may cheat (to get more info)! Secure Protocol? Real world indistinguishable from Ideal world. Adversarial entity who controls dishonest players.

Adversarial Behavior

Dishonest players follow the protocol: Passive Adversary Dishonest players deviate from the protocol: Active Adversary

Security Requirements

View(Pi)Ideal ≡Stat/Comp View(Pi)Real in presence of passive/active Adversary

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 10 / 36

slide-11
SLIDE 11

Our Target

Construction of a protocol for: Secure Multiparty Computation Active Adversary Dishonest Majority (Pi honest, for all j = i, Pj controlled by the Adversary)

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 11 / 36

slide-12
SLIDE 12

Modern Approaches – High Level

2-phases approach

Preprocessing ⇒ Online Players generate some shared randomness, independently of f (public key crypto required). ⇒ Previous data used to evaluate of f (seen as an arithmetic circuit). Online phase: very fast – no PKE!

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 12 / 36

slide-13
SLIDE 13

Modern Approaches – High Level

Fully Homomorphic Encryption [Gen09]

Use an encryption scheme (KeyGen, Enc, Dec) such that for any arithmetic circuit C: Decsk(C ′(Encpk(m1), . . . , Encpk(mn))) = C(m1, . . . , mn), where C ′ acts as C on encrypted data. If so, Encpki(yi) = Encpki(fi(x1, . . . , xn)) = fi(Encpki(x1), . . . , Encpki(xn)). Drawback: FHE is impractical (nowadays)!

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 13 / 36

slide-14
SLIDE 14

Our Approach

Take the best of the two previous methods! 2-phases approach with Somewhat Homomorphic Encryption.

Somewhat Homomorphic Encryption Scheme

An encryption scheme (KeyGen, Enc, Dec) such that: Decsk(C ′(Encpk(m1), . . . , Encpk(mn))) = C(m1, . . . , mn), where C is an arithmetic circuit in a specific set S. In our case: S = circuits of mult depth one. Further requirement: a distributed decryption.

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 14 / 36

slide-15
SLIDE 15

Our Approach – Showing off

1 (much) More practical than the FHE-approach. 2 Preprocessing phase: similar to [BDOZ11], but less protocols needed. 3 Online phase: Better scalability (O(n) vs O(n2) mults to compute a

secure mult) Note: msgs in (Fpk)s: a vector space of dim s over a field of size pk.. ..but for simplicity we set s = 1 (more details later!)

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 15 / 36

slide-16
SLIDE 16

1

Introduction

2

Online Phase

3

Preprocessing

4

An Improved Online Phase

5

Concrete Scheme

6

Benchmarks

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 16 / 36

slide-17
SLIDE 17

Online Phase – Digression

Suppose x, y ∈ Fpk. We write [x], [y] if x, y are additively secret shared among the players: x =

n

  • i=1

xi, y =

n

  • i=1

yi, Pi has xi, yi. Easy to compute [x + y]: Pi locally computes ai = xi + yi.

n

  • i=1

ai =

n

  • i=1

(xi + yi) = x + y. Addition: easy.

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 17 / 36

slide-18
SLIDE 18

Online Phase

Multiplication? Not as easy as addition! Want to compute [x · y] from [x], [y]. Using [Bea91]: easy if players have a “multiplicative triple” [a], [b], [a · b]:

1 Compute [x + a], [y + b] (easy). 2 Reconstruct ε = x + a, δ = y + b 3 Compute

[z] = [a · b] − ε · [b] − δ · [a] + ε · δ. [z] is a secret sharing of x · y: z = a · b − ε · b − δ · a + ε · δ = a · b − (x + a) · b − (y + b) · a + (x + a) · (y + b) = xy

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 18 / 36

slide-19
SLIDE 19

Online Phase

Security? MACs!

Message Authentication Codes (` a la [BDOZ11])

MACj(xi)

= αj

i

· xi

+ βj

x,i

Pi Pj We require Pi to have: xi,

  • MACj(xi)

n

j=1,j=i ,

  • αi

j, βi x,j

n

j=1,j=i

Above situation: [x] (“bracket notation”). Notice: each player has O(n) MACs, O(n) keys for each secret value. Result: for each secret value O(n2) keys and MACs to insure security.

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 19 / 36

slide-20
SLIDE 20

Summary

Multiplicative Triples Additive Secret Sharing MACs    = ⇒ Secure MPC. How to obtain multiplicative triples? Preprocessing!

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 20 / 36

slide-21
SLIDE 21

1

Introduction

2

Online Phase

3

Preprocessing

4

An Improved Online Phase

5

Concrete Scheme

6

Benchmarks

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 21 / 36

slide-22
SLIDE 22

Preprocessing Phase

Target: generate [a], [b], [c] with c = ab.

Setup

1 Generate keys for the SHE scheme 2 Generate the αi

j’s (first half of the MACs’ keys)

3 Broadcast Encpk(αi

j)

4 Invoke a Zero-Knowledge Proof of Knowledge (ΠZKPoPK) on

(Encpk(αi

j), αi j)

Setup: independent from values to generate.

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 22 / 36

slide-23
SLIDE 23

Preprocessing Phase

Triples

Getting a · b + r:

1 Pi generates uniform values ai, bi, ri ∈ Fpk 2 Pi generates uniform values βi

a,j, βi b,j, βi r,j ∈ Fpk

3 Pi computes and broadcasts encryptions of all the above values 4 Pi Invokes ΠZKPoPK on the above ciphertexts 5 local comp.: get Encpk(a), Encpk(b), Encpk(r)

E.g.: Encpk(a) = Encpk  

n

  • j=1

aj   ←

n

  • j=1

Encpk(aj)

6 local comp.: get Encpk(r + a · b) ← Encpk(r) + Encpk(a) · Encpk(b) 7 agreement on decrypting: everyone gets a · b + r Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 23 / 36

slide-24
SLIDE 24

Preprocessing Phase

Triples

from a · b + r to [c] = [a · b] & MACs on it:

8 P1 sets c1 ← (r + c) − r1, Pi sets ci ← −ri, for (i = 1) 9 All players compute Encpk(c1) ← Encpk(r + c, 0) − Encpk(r1) 10 All players set Encpk(ci) ← −Encpk(ri), for (i = j) 11 Pi computes encryptions on MACs for aj (sim. bj, cj):

Encpk(MACi(aj)) ← Encpk(αi

j) · Encpk(aj) + Encpk(βi a,j)

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 24 / 36

slide-25
SLIDE 25

1

Introduction

2

Online Phase

3

Preprocessing

4

An Improved Online Phase

5

Concrete Scheme

6

Benchmarks

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 25 / 36

slide-26
SLIDE 26

Not Happy with the Current Online Phase?

As said, [x] means O(n2) keys and MACs to compute securely. [x] =

  • (xi)n

i=1 ,

  • MACj(xi)

n

i,j=1 ,

  • αi

j, βi x,j

n

i,j=1

  • Additive secret sharing of x

MACs on shared values Keys for the MACs MACs on shares ⇒ Authentication on secret values. Why not MACs on secret values?

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 26 / 36

slide-27
SLIDE 27

There you go

Assuming α obtained by the players in bracket notation [α], x := (δ, (xi)n

i=1 , (γ(x)i)n i=1)

δ: a public value (dependent of x) additive secret sharing of x additive secret sharing of γ(x) = α · (x + δ) (MAC on x) Note: “partial openings” during computation (value reconstructed, MAC not reconstructed), in order to keep α secret! Note: MACs not reconstructed during computation ⇒ values may be incorrect.

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 27 / 36

slide-28
SLIDE 28

Usage – Sketch

Preproc.: Generate [α] Generate [x]’s Compute [α · x]’s – killing one bracket-triple Set x ← (0, (xi)n

i=1 , ((α · x)i)n i=1) for all x’s

Add.: As in bracket notation! (local addition) Mult.: Using [Bea91], but partially opening x − a, y − b Output: Generate comb. of MACs of opened values, Commit, reconstruct the key,

  • Comb. was valid? ⇒ output.

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 28 / 36

slide-29
SLIDE 29

Usage – Output

Setting: y = (δ, (yi)n

i=1 , (γ(y)i)n i=1) to be output to Ph,

aj =

  • δj, (aj,l)n

l=1 , (γ(aj)l)n l=1

  • , 1 ≤ j ≤ T opened.

Output

1 Public values e1, . . . , eT ∈ Fpk are generated 2 Players compute a ←

j ej · aj

3 Pi commits to γi ←

j ejγ(aj)i, yi, γ(y)i

4 [α] is reconstructed 5 Pi opens γi 6 Players check α

  • a +

j ej · δj

  • =

i γi

7 Commitments to yi, γ(y)i are opened to Ph 8 Ph computes y ←

i yi and checks α(y + δ) = i γ(y)i

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 29 / 36

slide-30
SLIDE 30

1

Introduction

2

Online Phase

3

Preprocessing

4

An Improved Online Phase

5

Concrete Scheme

6

Benchmarks

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 30 / 36

slide-31
SLIDE 31

Packing Stuff

In this talk: how to squeeze messages into one value. More details on the cryptoscheme? Check the paper!

Our SHE scheme

A variant of [BV11], with distributed decryption, specialized for parallel operations on multiple data. Plaintexts live in (Fpk)s, while ciphertexts in (Aq)3 (for a convenient algebra Aq).

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 31 / 36

slide-32
SLIDE 32

Packing Stuff – Choose your Angle

First task: thinking of m ∈ (Fpk)s as an element in Aq. F = Φm ∈ Z[X]: cyclotomic polynomial of degree N = φ(m).

Choice of m?

Such that F mod p factors into at least s irreducible factors, each with degree divisible by k. Concretely: F mod p = f1 · · · fs′ ∈ Fp[X], deg(fi) = ki · k.

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 32 / 36

slide-33
SLIDE 33

Packing Stuff – The Final Deal

Facts

Fp[X]/(fi) is an extension field of Fpk Fp[X]/(fi) is a direct summand of Fp[X]/(F) ZN projects onto Fp[X]/(F) for large q: computation on elements in ZN with small infinity norm can be thought as in Aq := (Z/qZ)[X]/(F) Encoding Messages? m ∈ (Fpk)s ✤ ⑧

✴ s′

i=1 Fp[X]/(fi) ∼ ✴ Fp[X]/(F)✤ ⑧

✴ ZN ✴ ✴ Aq

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 33 / 36

slide-34
SLIDE 34

1

Introduction

2

Online Phase

3

Preprocessing

4

An Improved Online Phase

5

Concrete Scheme

6

Benchmarks

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 34 / 36

slide-35
SLIDE 35

Preprocessing – the Numbers

Comparison to previous work: u: security parameter κ: size of encryption [BDOZ11] Our work Encryption Type Semi-Homomorphic SHE, mult. depth 1 ZKPoPK amortized complexity O(κ + u) bits O(κ + u) bits Correct Mult. amortized complexity O(κ · u) bits

  • ffline benchmark

(2-party case) 2-4sec (Paillier 1024-bit) 8msec (sec.: RSA 1024-bit∗)

∗: using a SHE scheme based on [BV11].

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 35 / 36

slide-36
SLIDE 36

Online – the Numbers

Comparison to previous work: n: #players mf : #multiplications in the circuit to compute [BDOZ11] Our work Complexity for one secure mult O(n2) Fp-mults O(n) Fp-mults Preprocessed data needed Θ(mf · n2) O(mf · n) http://eprint.iacr.org/2011/535.pdf

Thanks

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 36 / 36

slide-37
SLIDE 37

Rikke Bendlin, Ivan Damg˚ ard, Claudio Orlandi, and Sarah Zakarias. Semi-homomorphic encryption and multiparty computation. In Kenneth G. Paterson, editor, EUROCRYPT, volume 6632 of Lecture Notes in Computer Science, pages 169–188. Springer, 2011. Donald Beaver. Efficient multiparty protocols using circuit randomization. In Joan Feigenbaum, editor, CRYPTO, volume 576 of Lecture Notes in Computer Science, pages 420–432. Springer, 1991. Zvika Brakerski and Vinod Vaikuntanathan. Fully homomorphic encryption from ring-lwe and security for key dependent messages. In Phillip Rogaway, editor, CRYPTO, volume 6841 of Lecture Notes in Computer Science, pages 505–524. Springer, 2011. Craig Gentry. Fully homomorphic encryption using ideal lattices. In Michael Mitzenmacher, editor, STOC, pages 169–178. ACM, 2009.

Damg˚ ard, Pastro, Smart, Zakarias (-.-) MPC from SHE November 9, 2011 36 / 36