Dragoș Rotaru and Tim Woodu.cs.biu.ac.il/~lindell/TPMPC2019/Dragos_Rotaru_TPMPC2019.pdf · 2...

55
Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering 1 TPMPC 2019 MArBled Circuits: Mixing Arithmetic and Boolean Circuits with Active Security* Dragoș Rotaru and Tim Wood University of Bristol, KU Leuven * https://ia.cr/2019/207

Transcript of Dragoș Rotaru and Tim Woodu.cs.biu.ac.il/~lindell/TPMPC2019/Dragos_Rotaru_TPMPC2019.pdf · 2...

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering1

TPMPC 2019

MArBled Circuits: Mixing Arithmetic and Boolean Circuits with Active Security*

Dragoș Rotaru and Tim Wood

University of Bristol, KU Leuven

* https://ia.cr/2019/207

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering2

What is multiparty computation?

Dragos Rotaru 2

Goal: Compute F(a, b, c)

a c

b

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering3

How can we achieve MPC?

Secret Sharing Garbled Circuits

Fast networks (LAN) Slow Networks (WAN)

Arithmetic/Boolean circuits Boolean circuits

Low depth, many AND gates Large depth, few AND gates

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering4

Can we switch between?

ABY [DSZ’15]

Yao GC – mod 2

A (GMW mod 2𝑘 )

B (GMW mod 2)

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering5

Can we switch between?

ABY [DSZ’15]

Yao GC – mod 2

ABY3 [MR’18]

A (GMW mod 2𝑘 )

B (GMW mod 2)

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering6

Can we switch between?

ABY [DSZ’15]

A (GMW mod 2𝑘 )

B (GMW mod 2)

Yao GC – mod 2

ABY3 [MR’18]

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering7

What about dishonest majority?

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering8

What about dishonest majority?

SPDZ WRK’17

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering9

What about dishonest majority?

SPDZ WRK’17

Naive

>110K ANDs

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering10

What about dishonest majority?

SPDZ WRK’17

>110K ANDs

>110K ANDs

Naive

Dragoș Rotaru

Naive

imec-Cosic, Dept. Electrical Engineering11

What about dishonest majority?

SPDZ WRK’17

<1K ANDs

0 ANDs

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering12

How general is this?

SPDZ SPDZ-BMR

WRK’17

HSS’17

𝐅𝑝

SPDZ 𝐙2𝑘

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering13

How general is this?

SPDZ SPDZ-BMR

WRK’17

HSS’17

𝐅𝑝

SPDZ 𝐙2𝑘

Very fast using DEFKSV’19 tricks

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering14

How general is this?

SPDZ SPDZ-BMR

WRK’17

HSS’17

𝐅𝑝

SPDZ 𝐙2𝑘

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering15

How general is this?

SPDZ SPDZ-BMR

WRK’17

HSS’17

𝐅𝑝

SPDZ 𝐙2𝑘

Any honest majority

protocol

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering16

Our focus

SPDZ SPDZ-BMR

WRK’17

HSS’17

𝐅𝑝

SPDZ 𝐙2𝑘

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering17

Malicious MPC protocols

Preprocessing phase

Online phase

InputsPKC

SPDZ, TinyOT, BDOZa, MASCOT, WRK’17, HSS’17, …

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering18

Let’s talk about

SPDZ 𝐅𝑝

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering19

SPDZ online phase

𝑥1 𝑥2 𝑥3 𝑥

α𝑥γ(𝑥)2γ(𝑥)1 γ(𝑥)3

++

+ +

=

=

α1 α2 α3 α++ =

SPDZ 𝐅𝑝

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering20

SPDZ online phase

𝑥1 + 𝑦1 𝑥2 + 𝑦2 𝑥3 + 𝑦3 𝑥 + 𝑦

α(𝑥 + 𝑦)γ x 2 + γ y 2γ x 1 + γ y 1

++

+

=

=

α1 α2 α3 α++ =

+

SPDZ 𝐅𝑝

γ x 3 + γ y 3

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering21

SPDZ online phaseSPDZ 𝐅𝑝

X𝐴←Input X𝐴Retrieve a random mask

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering22

SPDZ online phaseSPDZ 𝐅𝑝

X𝐴←Input X𝐴

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering23

SPDZ online phaseSPDZ 𝐅𝑝

x←x

X𝐴←

Open

Input X𝐴

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering24

SPDZ online phaseSPDZ 𝐅𝑝

x←x

X𝐴←

Open

Input X𝐴

MAC Check

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering25

SPDZ online phaseSPDZ 𝐅𝑝

z x y←

x←x

X𝐴←

Open

Input

XOR

X𝐴

Retrieve a Beaver triple

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering26

SPDZ online phaseSPDZ 𝐅𝑝

z x y←

x←x

X𝐴←

Open

Input

XOR

X𝐴

MAC Check

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering27

Let’s talk about

WRK’17 𝐅2

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering28

SPDZ online phaseWRK’17 𝐅2

B ANDAND

A

C

A BC

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering29

SPDZ online phaseSPDZ-BMR 𝐅2

B ANDAND

A

C

Λ𝑐 ←C + λ𝑐 Λ𝐴 ← A + λ𝑎 Λ𝐵 ← B + λ𝑏

MAC Check

WRK’17 𝐅2

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering30

SPDZ online phaseWRK’17 𝐅2

B ANDAND

A

C

Λ𝑐 ←C + λ𝑐 Λ𝐴 ← A + λ𝑎 Λ𝐵 ← B + λ𝑏

MAC Check

Inputs - cheap

XOR - free

Mod p arithmetic - some AND gates

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering31

Main idea:

SPDZ 𝐅𝑝 WRK’17 𝐅2

x x

x

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering32

Main idea:

SPDZ 𝐅𝑝 WRK’17 𝐅2

x x

rx

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering33

Main idea:

SPDZ 𝐅𝑝 WRK’17 𝐅2

x x

rx - x-r

SPDZ – MAC Check

Open

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering34

Main idea:

SPDZ 𝐅𝑝 WRK’17 𝐅2

x x

rx - x-r + r x

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering35

Introducing daBits

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering36

Introducing daBits

SPDZ 𝐅𝑝 WRK 𝐅2

𝒃𝑨 𝒃𝑩 𝒃𝑪

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering37

Introducing daBits

SPDZ 𝐅𝑝 WRK 𝐅2

𝒃𝑩 𝒃𝑪

SPDZ Input WRK Input

𝒃𝑨

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering38

Introducing daBits

SPDZ 𝐅𝑝 WRK 𝐅2

𝒃𝑨

SPDZ Input WRK Input

𝒃𝑨

𝒃𝑩 𝒃𝑩

𝒃𝑪 𝒃𝑪

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering39

Introducing daBits

SPDZ 𝐅𝑝 WRK 𝐅2

𝒃𝑨

SPDZ Open WRK Open

𝒃𝑨

𝒃𝑩 𝒃𝑩

𝒃𝑪 𝒃𝑪

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering40

Introducing daBits

SPDZ 𝐅𝑝 WRK 𝐅2

𝒃𝑨𝒃𝑩𝒃𝑪

SPDZ XOR WRK XOR

𝒃𝑨𝒃𝑩𝒃𝑪

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering41

Introducing daBits

SPDZ 𝐅𝑝 WRK 𝐅2

𝒃𝑨𝒃𝑩𝒃𝑪

SPDZ Open WRK Open

𝒃𝑨𝒃𝑩𝒃𝑪

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering42

daBit cost

SPDZ

MASCOT

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering43

Total cost per conversion

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering44

SVM Example in MP-SPDZ

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering45

SVM Example in MP-SPDZ

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering46

daBit 2.0

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering47

daBit 2.0

➢ Inspired from DEFKSV’19 𝐙2𝑘𝐅2

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering48

daBit 2.0

➢ Inspired from DEFKSV’19 𝐙2𝑘𝐅2

𝐅𝑝𝐅2

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering49

daBit 2.0

➢ Inspired from DEFKSV’19 𝐙2𝑘𝐅2

𝐅𝑝𝐅2

𝐙2𝑘𝐅2

Local mod 2

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering50

daBit 2.0 𝐅𝑝𝐅2

SPDZ[p].Random()

𝒃1 𝒃𝑛

𝒓1 𝒓𝑠

𝒃1𝑨 𝒃𝑛

𝑨

𝒓1𝑨 𝒓𝑠

𝑨

mod 2

mod 2 mod 2

mod 2 𝒃1𝑩 𝒃𝑛

𝑩

𝒓1𝑩 𝒓𝑠

𝑩

mod 2

mod 2 mod 2

mod 2TinyOT.Input()

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering51

daBit 2.0 𝐅𝑝𝐅2

SPDZ[p].Random()

𝒃1 𝒃𝑛

𝒓1 𝒓𝑠

𝒃1𝑨 𝒃𝑛

𝑨

𝒓1𝑨 𝒓𝑠

𝑨

mod 2

mod 2 mod 2

mod 2 𝒃1𝑩 𝒃𝑛

𝑩

𝒓1𝑩 𝒓𝑠

𝑩

mod 2

mod 2 mod 2

mod 2TinyOT.Input()

𝒃1𝑨

mod 2 𝒃1𝑩

mod 2xor𝒃𝟏 xor 1

Take s linear combinations 𝒃1 𝒃𝑛… 𝒃1 𝒃𝑛…and𝒓𝑖 𝒓𝑖

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering52

Conclusions and future work

➢ Can we generate daBits faster?

➢ More interesting examples where this conversions are good

will come soon…

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering53

Thank you!

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering54

• Questions?

Thank you!

• https://ia.cr/2019/207

Dragoș Rotaru imec-Cosic, Dept. Electrical Engineering55

➢0.82 ms per dabit

➢119 kbit

dabit Cost