Top Banner
Garbled RAM, Revisited Daniel Wichs (Northeastern University) Joint work with: Craig Gentry, Shai Halevi, Seteve Lu, Rafail Ostrovsky, Mariana Raykova
29

Garbled RAM, Revisited

Dec 30, 2015

Download

Documents

winter-decker

Garbled RAM, Revisited. Daniel Wichs (Northeastern University) Joint work with: Craig Gentry, Shai Halevi , Seteve Lu, Rafail Ostrovsky , Mariana Raykova. Goals of Garbled RAM. An analogue of Yao garbled circuits [Yao82] that directly garbles Random Access Machines (RAM). - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Garbled RAM, Revisited

Garbled RAM, Revisited

Daniel Wichs(Northeastern University)

Joint work with: Craig Gentry, Shai Halevi, Seteve Lu, Rafail Ostrovsky, Mariana Raykova

Page 2: Garbled RAM, Revisited

Goals of Garbled RAM

• An analogue of Yao garbled circuits [Yao82] that directly garbles Random Access Machines (RAM).

• Avoid efficiency loss of converting a RAM to a circuit.– Google search vs. reading the Internet.

• First proposed/constructed by [Lu-Ostrovsky 13].– Proof of security contains subtle flaw (circularity problem).

• This works: new constructions with provable security.

Page 3: Garbled RAM, Revisited

Garbled RAM Definition

Client Serversecret: k

GData

GProgGInput, )

Eva, )

Page 4: Garbled RAM, Revisited

Garbled RAM Definition

Client Serversecret: k

GData

GProgGInput, )

Eva, )

O(run-time)

O(run-time)• Security: server only learns ,,… (even data access pattern is hidden!)

Page 5: Garbled RAM, Revisited

Weak vs. Full Security

• Weak security: May reveal data , and data-access pattern of computations.– Locations of memory accessed in each step.– Values read and written to memory.

• Compiler: weak full security:– Use oblivious RAM [GO96,…] to encode/access memory.

Page 6: Garbled RAM, Revisited

read-only computation.For now,

Overview of [Lu-Ostrovsky 13]

Page 7: Garbled RAM, Revisited

read bit

MemoryData D=

CPUStep 1

Read location: i

CPUStep 2

𝐷 [1] …

state

…state

𝐷 [2 ] 𝐷 [3 ]

Page 8: Garbled RAM, Revisited

read bit

MemoryData D=

CPUStep 1

Read location: i

CPUStep 2

𝐷 [1] …

state

…state

𝐷 [2 ] 𝐷 [3 ]

garbled circuit

garbled

garbled circuit

garbled

GProg:

GInp

Page 9: Garbled RAM, Revisited

read bitCPUStep 1

Read location: i

CPUStep 2state

…stategarbled circuit

garbled

garbled circuit

garbled

GProg:

GInp

GData: 𝐹 𝑘 (1 ,𝐷[1]) …𝐹 𝑘 (2 ,𝐷 [2 ])𝐹 𝑘 (3 ,𝐷 [3])

is a PRF

Page 10: Garbled RAM, Revisited

read bitCPUStep 1

CPUStep 2state

…stategarbled circuit

garbled

garbled circuit

garbled

GProg:

GInp

GData: 𝐹 𝑘 (1 ,𝐷[1]) …𝐹 𝑘 (2 ,𝐷 [2 ])𝐹 𝑘 (3 ,𝐷 [3])

is a PRF

PRF Key: kPRF Key: k

Read location: i,

Page 11: Garbled RAM, Revisited

Let’s try to prove security…

read bit CPUStep 2

PRF Key: k …state

garbled

garbled circuit

CPUStep 1

state

garbledPRF Key: k

Read location: i,

garbled circuit

Page 12: Garbled RAM, Revisited

Use security of 1st garbled circuit only learn output

read bit

state

CPUStep 2

PRF Key: k …garbled circuitlabelsgarbled state

Page 13: Garbled RAM, Revisited

Use security of 1st garbled circuit only learn output

read bit

state

CPUStep 2

PRF Key: k …garbled circuit

(assume D[i]=1)

labelsgarbled state

𝑙𝑎𝑏𝑒𝑙1

Page 14: Garbled RAM, Revisited

read bit

state

CPUStep 2

PRF Key: k …garbled circuitlabelsgarbled state

Use security of 2nd garbled circuit

Use security of Encryption/PRF

don’t learn for read bit

don’t learnPRF key k

𝑙𝑎𝑏𝑒𝑙1

Page 15: Garbled RAM, Revisited

Circularity* Problem!

* May appear rectangular

Page 16: Garbled RAM, Revisited

So is it secure?

• Perhaps, but… – No proof. – No “simple” circularity assumption on one primitive.

Page 17: Garbled RAM, Revisited

Can we fix it? Yes!

• Fix 1 : – Using identity-based encryption (IBE).

• Fix 2 : – Only use one-way functions.– Bigger overhead.

Page 18: Garbled RAM, Revisited

The Fix

• Public-key instead of symmetric-key encryption.

– Garbled circuits have hard-coded public key.– Break circularity: security of ciphertexts holds even

given public-key hard-coded in all garbled circuits.

• Caveat: need identity-based encryption (IBE)– Original solution used “Sym-key IBE”.

Page 19: Garbled RAM, Revisited

Garbled Memory

𝐹 𝑘 (1 ,𝐷[1]) …

Read location: i,

𝐹 𝑘 (2 ,𝐷 [2 ])𝐹 𝑘 (3 ,𝐷 [3])

read bit CPUStep 2

PRF Key: k

state

CPUStep 1

PRF Key: k

state

Secret keys for identities

Encrypt to identities (i,0) and (i,1)

Master SK

Page 20: Garbled RAM, Revisited

Garbled Memory

𝑠𝑘(1 ,𝐷 [1 ]) …

Read location: i

read bit CPUStep 2state

CPUStep 1

MPK

state

𝑠𝑘(2 ,𝐷 [2 ])𝑠𝑘(3 ,𝐷 [ 3])

MPK

Secret keys for identities

Encrypt to identities (i,0) and (i,1)

Master PK

Page 21: Garbled RAM, Revisited

How to allow writes?

read bitCPUStep 1

Read location i

CPUStep 2state

…state

Write location j, bit b

Predictably-Timed Writes:Whenever read location i, “know” its last-write-time u.

Any ProgramCompiler

Page 22: Garbled RAM, Revisited

How to allow writes?

• Garbled memory = { : }– i = location.– j = last-write time of location i.– b = bit in location i written in step j.

• To read location i, need to know last-write time j.– Encrypt labels to identities and

• To write location i, at time j– Create secret key for – Need master secret key. Reintroduces circulairty!

Page 23: Garbled RAM, Revisited

How to allow writes?

• Idea: CPU step j can create secret key for any ID = (j, *,*) but cannot decrypt for identities j’ j.

• Prevents circularity: Ciphertext created by CPU step j maintain semantic security even given secrets contained in all future CPU steps.

• Need “restricted MSK” for time-period j.• Use hierarchical IBE. • By being more careful, can use any IBE.

Page 24: Garbled RAM, Revisited

• Timed IBE (TIBE): restricted notion of HIBE.

Page 25: Garbled RAM, Revisited

• Timed IBE (TIBE): restricted notion of HIBE. – Time-period key can be used to create a single identity

secret key for any identity ID = (j, *). – Semantic security holds for all other j.

• Can construct TIBE from any IBE. (see paper)

𝑀𝑆𝐾

𝑇 𝑆𝐾 𝑗=1 𝑇 𝑆𝐾 𝑗=2 𝑇 𝑆𝐾 𝑗=3 …

𝑠𝑘(1 ,?? ?? ) 𝑠𝑘(2 ,? ??? ) 𝑠𝑘(3 , ???? )

……

Page 26: Garbled RAM, Revisited

read bit CPUStep 2state

CPUStep 1

𝑀𝑃𝐾 ,𝑇𝑆 𝐾 1

state

Garbled Memory

𝑠𝑘(0,1 ,𝐷 [ 1]) …𝑠𝑘(0,2 ,𝐷 [ 2])𝑠𝑘(0,3 ,𝐷 [ 3 ])

initially all keys have time j=0 Invariant: always have where j=last-write-time(i), and b is latest bit.

𝑀𝑃𝐾 ,𝑇𝑆 𝐾 2Step jhas

Page 27: Garbled RAM, Revisited

Read: i, (last-write time: u)

read bit CPUStep 2state

CPUStep 1

𝑀𝑃𝐾 ,𝑇𝑆 𝐾 1

state

Garbled Memory

𝑠𝑘(0,1 ,𝐷 [ 1]) …𝑠𝑘(0,2 ,𝐷 [ 2])𝑠𝑘(0,3 ,𝐷 [ 3 ])

𝑀𝑃𝐾 ,𝑇𝑆 𝐾 2

Write: i’, bit b

𝑠𝑘( 𝑗=1 ,𝑖′ ,𝑏)

• u < cur step: semantic security for holds given future

Page 28: Garbled RAM, Revisited

• Theorem: Assuming Identity Based Encryption (IBE), For any RAM program w. run-time T , data of size N– Garbled memory-data is of size: .– Garbled program size, creation/evaluation-time: .

• Theorem: Assuming one-way functions, For any constant :– Garbled memory-data is of size: .– Garbled program size, creation/evaluation-time: .

Page 29: Garbled RAM, Revisited

Thank You!