36
Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C., Ren, L., Yu, X., & Devadas, S. (2013, November). Path ORAM: an extremely simple oblivious RAM protocol. In Proceedings of the 2013 ACM SIGSAC conference on Computer & communications security (pp. 299-310). ACM.

Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

  • Upload
    others

  • View
    7

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Oblivious RAM (ORAM)

more precisely: Path ORAM

Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C., Ren, L., Yu, X., & Devadas, S. (2013, November). Path ORAM: an extremely simple oblivious RAM protocol. In Proceedings of the 2013 ACM SIGSAC conference on Computer & communications security (pp. 299-310). ACM.

Page 2: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Cloud storage

SkyDriveSkyDrive

Windows Azure Storage

Windows Azure Storage

Amazon S3, EBSAmazon S3, EBSDropboxDropbox

EMC Atmos

EMC Atmos

MozyMozy

iCloudiCloudGoogle StorageGoogle Storage

Page 3: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Cloud storageSensitive

documentsshould be encrypted

User Server

Files Encrypted Files

Page 4: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

But: the metadata is leaked

The access pattern leaks:• Which data is being accessed• When the data was last accessed• Whether the same data is being accessed• Access randomly or sequentially• Whether the access is a read or write

Page 5: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Path ORAM

• Server storage Blocks of data

• Client storage position map, stash

Page 6: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Path ORAM

nodes can contain multiple blocks

some nodes are empty

Server: data blocks stored in nodes of a tree

bucket

block

Block #

data

Page 7: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Path ORAM1 2 3 4 5 6 7 8

“Position” of a block is the leaf sequence number.

Page 8: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Path ORAM1 2 3 4 5 6 7 8

A block must be placed on the path leading to its “position”

If a BLOCK’s position is 5, it can only be in the this path

Page 9: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Path ORAM1 2 3 4 5 6 7 8

A block must be placed on the path to its “position”

If a BLOCK’s position is 1, it can only be in the this path

Page 10: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Path ORAM1 2 3 4 5 6 7 8

A block’s position is chosen randomly from 1 to 2^L(number of leaves).

Some nodes(buckets) have multiple blocks while some are empty.

Page 11: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Path ORAM

Client storage: position map & stash

position map: to store each block’s “position” (assume there are N blocks in the tree)

Block #

Block’s “position”

1 2 … … …. …. N-1 N

5 4 … … …. …. 1 7

Page 12: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Path ORAM

position map: to store each block’s “position” (assume there are N blocks in the tree)

Block #

Block’s “position”

1 2 … … …. …. 13 14

2 4 1 1

10 6

2 58

714 9 1

13

3 12 4 11

1 2 3 4

Client storage: position map & stash

Page 13: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Path ORAM

Stash: 1. block cache 2. stores blocks “overflowed” from the server

Client storage: position map & stash

one block

Page 14: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Path ORAM

16 linesof

pseudocode

Page 15: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Path ORAM

An example for access (op, a, data)

Example: A user wants to modify block “7”

Page 16: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Path ORAM

10 6

2 5

714 1

13

3 12 4 11

1 2 3 4

Server

Client

stash

position map1 2 3 4 5 6 7 8 9 10 11 12 13 14

2 4 3 4 3 1 2 2 1 1 4 3 2 1

Example: A user wants to modify block “7”

8 9

9

Page 17: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Path ORAM

10 6

2 5

714 9 1

13

3 12 4 11

1 2 3 4

Server

Client

stash

position map1 2 3 4 5 6 7 8 9 10 11 12 13 14

2 4 3 4 3 1 2 2 1 1 4 3 2 1

Example: A user wants to modify block “7”

1. Lookup block’s position

8 9

Page 18: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Path ORAM

10 6

2 5

714 1

13

3 12 4 11

1 2 3 4

Server

Client

stash

position map1 2 3 4 5 6 7 8 9 10 11 12 13 14

2 4 3 4 3 1 2 2 1 1 4 3 2 1

Example: A user wants to modify block “7”

2. Read the entire path

8 9

71 13 10 6

71 13 10 6

decrypt

Page 19: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Path ORAM

10 6

2 5

714 1

13

3 12 4 11

1 2 3 4

Server

Client

stash

position map1 2 3 4 5 6 7 8 9 10 11 12 13 14

2 4 3 4 3 1 2 2 1 1 4 3 2 1

Example: A user wants to modify block “7”

8 9

71 13 10 6

1 13 10 6

decrypt

7

3. Client can now read/modify data in block

Page 20: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Path ORAM

10 6

2 58

714 9 1

13

3 12 4 11

1 2 3 4

Server

Clientposition map

1 2 3 4 5 6 7 8 9 10 11 12 13 14

2 4 3 4 3 1 2 2 1 1 4 3 2 1

Example: A user wants to modify block “7”

Note: the blocks on the tree are encrypted

4. Assign a new random position.

Position[block 7] = UniformRandom(1, 2, 3, 4)

here = 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14

2 4 3 4 3 1 1 2 1 1 4 3 2 1

Page 21: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Path ORAM

10 6

2 5

14 1

13

3 12 4 11

1 2 3 4

Server

Client

Note: the blocks on the tree are encrypted

5. Write path back

7

Principles:A. Blocks should be pushed down as deep as possibleB. Blocks should always be on the path to its position

Page 22: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Path ORAM

10 6

2 5

14 1

13

3 12 4 11

1 2 3 4

Server

Clientposition map

1 2 3 4 5 6 7 8 9 10 11 12 13 14

2 4 3 4 3 1 1 2 1 1 4 3 2 1

Note: the blocks on the tree are encrypted

5. Write path back.

Principle A:Push blocks as deep as

possible

stash 8 9 1 13 10 67

Try the deepest possible node first

Page 23: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Path ORAM

10 6

2 5

14 1

13

3 12 4 11

1 2 3 4

Server

Clientposition map

1 2 3 4 5 6 7 8 9 10 11 12 13 14

2 4 3 4 3 1 1 2 1 1 4 3 2 1

Note: the blocks on the tree are encrypted

5. Write path back.

Principle A:Push blocks as deep as

possible

stash 8 9 1 13 10 67

If full, try the upper level

Page 24: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Path ORAM

10 6

2 5

14 1

13

3 12 4 11

1 2 3 4

Server

Clientposition map

1 2 3 4 5 6 7 8 9 10 11 12 13 14

2 4 3 4 3 1 1 2 1 1 4 3 2 1

Note: the blocks on the tree are encrypted

5. Write path back.

Principle A:Push blocks as deep as

possible

stash 8 9 1 13 10 67

If full, try the upper level

Page 25: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Path ORAM

10 6

2 5

14 1

13

3 12 4 11

1 2 3 4

Server

Clientposition map

1 2 3 4 5 6 7 8 9 10 11 12 13 14

2 4 3 4 3 1 1 2 1 1 4 3 2 1

Note: the blocks on the tree are encrypted

5. Write path back.

Principle A:Push blocks as deep as

possible

stash 8 9 1 13 10 67

If root is full, store in the stash

Page 26: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Path ORAM

10 6

2 5

14 1

13

3 12 4 11

1 2 3 4

Server

Clientposition map

1 2 3 4 5 6 7 8 9 10 11 12 13 14

2 4 3 4 3 1 1 2 1 1 4 3 2 1

Note: the blocks on the tree are encrypted

5. Write path back

Principle B:The block should always be on

its path to “position”

stash 8 9 1 13 10 67

2 1 2 1 2 1 1“positions”

7

Page 27: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Path ORAM

10 6

2 5

14 1

13

3 12 4 11

1 2 3 4

Server

Clientposition map

1 2 3 4 5 6 7 8 9 10 11 12 13 14

2 4 3 4 3 1 1 2 1 1 4 3 2 1

Note: the blocks on the tree are encrypted

5. Write path back

Block 8, 1, 13 canend up at any buckets on

the entire path

Principle B:The block should always be on

its path to “position”

stash 8 9 1 13 10 67

2 1 2 1 2 1 1

7

Page 28: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Path ORAM

10 6

2 5

14 1

13

3 12 4 11

1 2 3 4

Server

Clientposition map

1 2 3 4 5 6 7 8 9 10 11 12 13 14

2 4 3 4 3 1 1 2 1 1 4 3 2 1

Note: the blocks on the tree are encrypted

5. Write path back

Block 9, 7, 10, 6 can only end up at these buckets

Principle B:The block should always be on

its path to “position”

stash 8 9 1 13 10 67

2 1 2 1 2 1 1

7

Page 29: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Path ORAM

2 5

14 3 12 4 11

1 2 3 4

Server

Clientposition map

1 2 3 4 5 6 7 8 9 10 11 12 13 14

2 4 3 4 3 1 1 2 1 1 4 3 2 1

Note: the blocks on the tree are encrypted

5. Write path back

stash 8 9 1 13 10 67

2 1 2 1 2 1 1

3

2

1

Get back to our example:

Page 30: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Path ORAM

2 5

14 8 3 12 4 11

1 2 3 4

Server

Clientposition map

1 2 3 4 5 6 7 8 9 10 11 12 13 14

2 4 3 4 3 1 1 2 1 1 4 3 2 1

Note: the blocks on the tree are encrypted

5. Write path back

stash 8 9 1 13 10 67

2 1 2 1 2 1 1

3

2

1

13

Page 31: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Path ORAM

2 51

14 8

7

3 12 4 11

1 2 3 4

Server

Clientposition map

1 2 3 4 5 6 7 8 9 10 11 12 13 14

2 4 3 4 3 1 1 2 1 1 4 3 2 1

Note: the blocks on the tree are encrypted

5. Write path back

stash 8 9 1 13 10 67

2 1 2 1 2 1 1

3

2

1

13

Page 32: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Path ORAM

9 6

2 51

14 8

7

3 12 4 11

1 2 3 4

Server

Clientposition map

1 2 3 4 5 6 7 8 9 10 11 12 13 14

2 4 3 4 3 1 1 2 1 1 4 3 2 1

Note: the blocks on the tree are encrypted

5. Write path back

stash 8 9 1 13 10 67

2 1 2 1 2 1 1

3

2

1

13

Page 33: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Path ORAM

9 6

2 51

14 8

7

3 12 4 11

1 2 3 4

Server

Clientposition map

1 2 3 4 5 6 7 8 9 10 11 12 13 14

2 4 3 4 3 1 1 2 1 1 4 3 2 1

Note: the blocks on the tree are encrypted

5. Write path back

stash 10

3

2

1

13

Page 34: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Client storage

Position map:• Log N bits per block• Totally N log N bits

Too much !!!

Page 35: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Recursion

• Store the position map in another ORAM.• Do this recursively.

Server

Client

O-RAM #1 O-RAM #2:Position Map

for O-RAM #1 O-RAM #3:Position Map

for O-RAM #2

Page 36: Oblivious RAM (ORAM) more precisely: Path ORAMmdr/teaching/dss16/07-pathoram.pdf · Oblivious RAM (ORAM) more precisely: Path ORAM Stefanov, E., Van Dijk, M., Shi, E., Fletcher, C.,

Theorems

1. Given two accesses, an adversary that controls the network and the cloud service provider cannot see what blocks were read or written, or if the two accesses referred to the same block or different blocks.

2. The stash is very unlikely to get more than a few blocks in it.