MPC-Friendly Symmetric Key Primitives Lorenzo Grassi 1 Christian - - PowerPoint PPT Presentation

mpc friendly symmetric key primitives
SMART_READER_LITE
LIVE PREVIEW

MPC-Friendly Symmetric Key Primitives Lorenzo Grassi 1 Christian - - PowerPoint PPT Presentation

MPC-Friendly Symmetric Key Primitives Lorenzo Grassi 1 Christian Rechberger 1 s Rotaru 2 Drago Peter Scholl 2 Nigel P. Smart 2 1 Graz University of Technology 2 University of Bristol October 25, 2016 What is Multiparty Computation? What is


slide-1
SLIDE 1

MPC-Friendly Symmetric Key Primitives

Lorenzo Grassi 1 Christian Rechberger 1 Drago¸ s Rotaru 2 Peter Scholl 2 Nigel P. Smart 2

1Graz University of Technology 2University of Bristol

October 25, 2016

slide-2
SLIDE 2

What is Multiparty Computation?

slide-3
SLIDE 3

What is Multiparty Computation?

slide-4
SLIDE 4

Interesting problems

Linear Programming

slide-5
SLIDE 5

Interesting problems

Linear Programming Integer Comparison

slide-6
SLIDE 6

Interesting problems

Linear Programming Integer Comparison Fixed Point Arithmetic

slide-7
SLIDE 7

Interesting problems

Linear Programming Integer Comparison Fixed Point Arithmetic

slide-8
SLIDE 8

Interesting problems

Easy to implement via arithmetic circuits mod p

slide-9
SLIDE 9

There is a problem.

slide-10
SLIDE 10

There is a problem.

slide-11
SLIDE 11

There is a problem.

slide-12
SLIDE 12

There is a problem.

slide-13
SLIDE 13

There is a problem.

slide-14
SLIDE 14

There is a problem.

slide-15
SLIDE 15

There is a problem.

slide-16
SLIDE 16

There is a problem.

slide-17
SLIDE 17

There is a problem.

slide-18
SLIDE 18

Take home message

Move data securely between clients and MPC engines.

slide-19
SLIDE 19

Need a PRF mod p

◮ Enc / Dec in CTR mode use only PRF calls. ◮ Avoid the n fold database/key blowup by secret share the key

and use a PRF mod p in MPC!

◮ Why mod p? Conversion between binary and arithmetic

shares is expensive.

slide-20
SLIDE 20

Other use cases for PRF’s in MPC

◮ Secure database joins [LTW13]. ◮ Oblivious RAM [LO13]. ◮ Searchable symmetric encryption, order-revealing encryption

[BCO’N11, BLRSZZ15, CLWW16, BBO’N07, CJJKRS13].

slide-21
SLIDE 21

What we have done

Benchmark and create new protocols using PRF’s within SPDZ protocol.

slide-22
SLIDE 22

Why SPDZ?

◮ MPC protocol with active security. ◮ 200 times faster pre-processing phase [KOS16]. ◮ It is open source!

https://github.com/bristolcrypto/SPDZ-2.

slide-23
SLIDE 23

MPC with secret sharing 101

◮ Each party Pi has [a] ← ai

s.t. a = n

i=1 ai. ◮ Triples generation:

[a] = [b] · [c]

◮ Random bits and squares:

[b], [s2].

Preprocessing Phase

slide-24
SLIDE 24

MPC with secret sharing 101

◮ Use 1 triple for each

multiplication gate.

◮ Number of communcation

rounds is given by the multiplicative depth.

Online Phase

slide-25
SLIDE 25

Circuit Evaluation in SPDZ

slide-26
SLIDE 26

Circuit Evaluation in SPDZ

slide-27
SLIDE 27

Circuit Evaluation in SPDZ

slide-28
SLIDE 28

Circuit Evaluation in SPDZ

slide-29
SLIDE 29

Circuit Evaluation in SPDZ

3 triples; 2 rounds.

slide-30
SLIDE 30

What PRF’s have we looked at?

◮ AES [DR01]. ◮ LowMC (Low Multiplicative Complexity) [ARS+15]. ◮ Naor-Reingold PRF [NR04]. ◮ MiMC (Minimum Multiplicative Complexity) [AGR+16]. ◮ Legendre PRF [Dam88].

slide-31
SLIDE 31

What PRF’s have we looked at?

◮ AES [DR01]. ◮ LowMC (Low Multiplicative Complexity) [ARS+15]. ◮ Naor-Reingold PRF [NR04]. ◮ MiMC (Minimum Multiplicative Complexity) [AGR+16]. ◮ Legendre PRF [Dam88].

slide-32
SLIDE 32

Let’s play a game

slide-33
SLIDE 33

Let’s play a game

slide-34
SLIDE 34

AES - de-facto benchmark

◮ 960 multiplications ◮ 50 rounds ◮ Operations done in F240.

PRF on blocks

slide-35
SLIDE 35

AES - de-facto benchmark

◮ 960 multiplications ◮ 50 rounds ◮ Operations done in F240.

PRF on blocks 5 blocks/s

slide-36
SLIDE 36

AES - de-facto benchmark

◮ 960 multiplications ◮ 50 rounds ◮ Operations done in F240.

PRF on blocks 8ms latency

slide-37
SLIDE 37

AES - de-facto benchmark

◮ 960 multiplications ◮ 50 rounds ◮ Operations done in F240.

PRF on blocks 530 blocks/s throughput

slide-38
SLIDE 38

AES - de-facto benchmark

◮ Compare the PRF’s mod p with AES only for benchmarking

purposes.

◮ In real world we want to keep all data in Fp.

slide-39
SLIDE 39

Naor-Reingold PRF

FNR(n)(k, x) = gk0·n

i=1 kxi i

where k = (k0, . . . , kn) ∈ Fn+1

p

is the key.

slide-40
SLIDE 40

Naor-Reingold PRF

FNR(n)(k, x) = gk0·n

i=1 k xi i

where k = (k0, . . . , kn) ∈ Fn+1

p

is the key. Fortunately, in some applications the output must be public!

slide-41
SLIDE 41

Naor-Reingold PRF

◮ Active security version for

public output.

◮ Why EC? Smaller modulus. ◮ 2 · n multiplications. ◮ 3 + log n + 1 rounds.

EC based PRF

slide-42
SLIDE 42

Naor-Reingold PRF

◮ Active security version for

public output.

◮ Why EC? Smaller modulus. ◮ 4n + 2 multiplications. ◮ 7 rounds [BB89, CH10].

EC based PRF in constant round

slide-43
SLIDE 43

Naor-Reingold PRF

◮ Active security version for

public output.

◮ Why EC? Smaller modulus. ◮ 4n + 2 multiplications. ◮ 7 rounds [BB89, CH10].

EC based PRF in constant round 5 evals/s

slide-44
SLIDE 44

Naor-Reingold PRF

◮ Active security version for

public output.

◮ Why EC? Smaller modulus. ◮ 4n + 2 multiplications. ◮ 7 rounds [BB89, CH10].

EC based PRF in constant round 4.3ms latency

slide-45
SLIDE 45

Naor-Reingold PRF

◮ Active security version for

public output.

◮ Why EC? Smaller modulus. ◮ 4n + 2 multiplications. ◮ 7 rounds [BB89, CH10].

EC based PRF in constant round 370 blocks/s throughput

slide-46
SLIDE 46

Naor-Reingold PRF

◮ Active security version for

public output.

◮ Why EC? Smaller modulus. ◮ 4n + 2 multiplications. ◮ 7 rounds [BB89, CH10].

EC based PRF in constant round

Results have shown that over 70% of the time was spent on EC computations. Computation is the bottleneck, not communication!

slide-47
SLIDE 47

MiMC - How does it work?

[AGR+16]

slide-48
SLIDE 48

MiMC PRF

◮ 146 multiplications ◮ 73 rounds ◮ 1 variant optimized for

latency, other for throughput.

MiMC PRF - works in both worlds

slide-49
SLIDE 49

MiMC PRF

◮ 146 multiplications ◮ 73 rounds ◮ 1 variant optimized for

latency, other for throughput.

MiMC PRF - works in both worlds 34 blocks/s

slide-50
SLIDE 50

MiMC PRF

◮ 146 multiplications ◮ 73 rounds ◮ 1 variant optimized for

latency, other for throughput.

MiMC PRF - works in both worlds 6ms latency

slide-51
SLIDE 51

MiMC PRF

◮ 146 multiplications ◮ 73 rounds ◮ 1 variant optimized for

latency, other for throughput.

MiMC PRF - works in both worlds 9000 blocks/s throughput - 16x AES

slide-52
SLIDE 52

Legendre PRF

In 1988, Damg˚ ard conjectured that this sequence is pseuodarandom starting from a random seed k. k p

  • ,

k + 1 p

  • ,

k + 2 p

  • , . . .
slide-53
SLIDE 53

Legendre PRF - 1 bit output

◮ log p multiplications. ◮ log p rounds.

Legendre PRF - old version

slide-54
SLIDE 54

Legendre PRF - 1 bit output

◮ log p 2 multiplications. ◮ log p 3 rounds.

Legendre PRF - new version

slide-55
SLIDE 55

Legendre PRF - 1 bit output

◮ log p 2 multiplications. ◮ log p 3 rounds.

Legendre PRF - new version 1225 evals/s - 250x AES

slide-56
SLIDE 56

Legendre PRF - 1 bit output

◮ log p 2 multiplications. ◮ log p 3 rounds.

Legendre PRF - new version 0.3ms latency - 25x faster AES

slide-57
SLIDE 57

Legendre PRF - 1 bit output

◮ log p 2 multiplications. ◮ log p 3 rounds.

Legendre PRF - new version 202969 blocks/s throughput - 380x AES

slide-58
SLIDE 58

How does it work?

Protocol ΠLegendre Let α be a fixed, quadratic non-residue modulo p, i.e. α

p

  • = −1.

Eval: To evaluate FLeg(bit) on input [x] with key [k]:

  • 1. Take a random square [s2] and a random bit [b]
  • 2. [t] ← [s2] · ([b] + α · (1 − [b]))
  • 3. u ← Open([t] · ([k] + [x]))
  • 4. Output [y] ←

u

p

  • · (2[b] − 1)

Securely computing the FLeg(bit) PRF with shared output

slide-59
SLIDE 59

How does it work?

Protocol ΠLegendre Let α be a fixed, quadratic non-residue modulo p, i.e. α

p

  • = −1.

Eval: To evaluate FLeg(bit) on input [x] with key [k]:

  • 1. Take a random square [s2] and a random bit [b]
  • 2. [t] ← [s2] · ( [1] + α · (1 − [1] ))
  • 3. u ← Open([s2] · ([k] + [x]))
  • 4. Output [y] ←

u

p

  • · (2 [1] − 1)

Securely computing the FLeg(bit) PRF with shared output

slide-60
SLIDE 60

How does it work?

Protocol ΠLegendre Let α be a fixed, quadratic non-residue modulo p, i.e. α

p

  • = −1.

Eval: To evaluate FLeg(bit) on input [x] with key [k]:

  • 1. Take a random square [s2] and a random bit [b]
  • 2. [t] ← [s2] · ( [0] + α · (1 − [0] ))
  • 3. u ← Open([s2α] · ([k] + [x]))
  • 4. Output [y] ←

u

p

  • · (2 [0] − 1)

Securely computing the FLeg(bit) PRF with shared output

slide-61
SLIDE 61

Security of Legendre PRF

Is it secure?

slide-62
SLIDE 62

Security of Legendre PRF

Is it secure? Yes, we give a reduction to the SLS problem: Given k+x

p

  • ,

find x.

slide-63
SLIDE 63

Summary

◮ We have efficiently solved the problem of sending data

between MPC engines.

◮ PRF’s mod p in MPC are fast! Can you find other

applications built on top of these?

◮ For proofs, WAN timings, other details, check out our paper!

slide-64
SLIDE 64

Thank you!