MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf ·...

177
MiniCrypt: Reconciling Compression and Encryption in Big Data Stores Wenting Zheng, Frank Li, Raluca Ada Popa, Ion Stoica, Rachit Agarwal

Transcript of MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf ·...

Page 1: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

MiniCrypt: Reconciling Compression and Encryption

in Big Data Stores

Wenting Zheng, Frank Li, Raluca Ada Popa, Ion Stoica, Rachit Agarwal

Page 2: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

client cloud provider

Sensitive data

A lot of sensitive data is collected

Page 3: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

client cloud provider

Sensitive data

A lot of sensitive data is collected

Page 4: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

client cloud provider

Sensitive data

A lot of sensitive data is collected

Page 5: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

client cloud provider

Sensitive data

A lot of sensitive data is collected

Page 6: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Existing systems

Page 7: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Existing systems

Systems Compression Encryption

Page 8: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Existing systems

Systems Compression Encryption

Cassandra [LM10], MongoDB, Succinct [AKS15]

Page 9: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Existing systems

Systems Compression Encryption

Cassandra [LM10], MongoDB, Succinct [AKS15]

Page 10: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Existing systems

Systems Compression Encryption

Cassandra [LM10], MongoDB, Succinct [AKS15]

CryptDB [PRZB11], Plutus [KRSWF03], Sirius [GSMB03],

etc.

Page 11: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Existing systems

Systems Compression Encryption

Cassandra [LM10], MongoDB, Succinct [AKS15]

CryptDB [PRZB11], Plutus [KRSWF03], Sirius [GSMB03],

etc.

Page 12: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP
Page 13: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

How to combine compression and encryption?

Page 14: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

MiniCrypt

Page 15: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Provides both compression and encryption for key-value stores

MiniCrypt

Page 16: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Provides both compression and encryption for key-value stores

MiniCrypt

Works on top of existing key-value stores without modification

Page 17: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

System setup

Page 18: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

System setup

Client 1

client

Client 2

Client 3

Page 19: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

System setup

Client 1

client

Client 2

Client 3

Page 20: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

System setup

Client 1

client cloud provider

Client 2

Client 3

Server 2

Server 1

Page 21: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

System setup

Client 1

MiniCrypt

client cloud provider

Client 2

MiniCrypt

Client 3

MiniCrypt

Server 2

Server 1

Page 22: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

System setup

Client 1

MiniCrypt

client cloud provider

Client 2

MiniCrypt

Client 3

MiniCrypt

Server 2

Server 1

Page 23: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

System setup

Client 1

MiniCrypt

client cloud provider

Client 2

MiniCrypt

Client 3

MiniCrypt

Server 2

Server 1

Page 24: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Server 2

Server 1

Threat model

cloud provider

Client 1

MiniCrypt

Client 2

MiniCrypt

Client 3

MiniCrypt

client

Page 25: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Server 2

Server 1

Threat model

cloud provider

Client 1

MiniCrypt

Client 2

MiniCrypt

Client 3

MiniCrypt

client

Page 26: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Server 2

Server 1

Threat model

cloud provider

Client 1

MiniCrypt

Client 2

MiniCrypt

Client 3

MiniCrypt

client

Page 27: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Server 2

Server 1

Threat model

cloud provider

Client 1

MiniCrypt

Client 2

MiniCrypt

Client 3

MiniCrypt

client

Page 28: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Encryption before compression?

Page 29: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Encryption before compression?

Ticking away the moments that make up a dull day Fritter and waste the hours in an off-hand way Kicking around on a piece of ground in your home town …

Page 30: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Encryption before compression?

Ticking away the moments that make up a dull day Fritter and waste the hours in an off-hand way Kicking around on a piece of ground in your home town …

Page 31: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Encryption before compression?

Ticking away the moments that make up a dull day Fritter and waste the hours in an off-hand way Kicking around on a piece of ground in your home town …

Page 32: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Encryption before compression?

Ticking away the moments that make up a dull day Fritter and waste the hours in an off-hand way Kicking around on a piece of ground in your home town …

01010101101010101111100001010100000011001010101001010101010010101011010101011111000010101000000110010101010010101010100101010110 0000110010101010 …

Page 33: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Encryption before compression?

Ticking away the moments that make up a dull day Fritter and waste the hours in an off-hand way Kicking around on a piece of ground in your home town …

01010101101010101111100001010100000011001010101001010101010010101011010101011111000010101000000110010101010010101010100101010110 0000110010101010 …

Page 34: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Encryption before compression?

Ticking away the moments that make up a dull day Fritter and waste the hours in an off-hand way Kicking around on a piece of ground in your home town …

01010101101010101111100001010100000011001010101001010101010010101011010101011111000010101000000110010101010010101010100101010110 0000110010101010 …

01010101101010101111100001010100000011001010101001010101010010101011010101011111000010101000000110010101010010101010100101010110 0000110010101010 …

Page 35: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Encryption before compression?

Ticking away the moments that make up a dull day Fritter and waste the hours in an off-hand way Kicking around on a piece of ground in your home town …

01010101101010101111100001010100000011001010101001010101010010101011010101011111000010101000000110010101010010101010100101010110 0000110010101010 …

ZIP01010101101010101111100001010100000011001010101001010101010010101011010101011111000010101000000110010101010010101010100101010110 0000110010101010 …

Page 36: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Encryption before compression?

Ticking away the moments that make up a dull day Fritter and waste the hours in an off-hand way Kicking around on a piece of ground in your home town …

01010101101010101111100001010100000011001010101001010101010010101011010101011111000010101000000110010101010010101010100101010110 0000110010101010 …

ZIP01010101101010101111100001010100000011001010101001010101010010101011010101011111000010101000000110010101010010101010100101010110 0000110010101010 …

Page 37: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Encryption before compression?

Ticking away the moments that make up a dull day Fritter and waste the hours in an off-hand way Kicking around on a piece of ground in your home town …

01010101101010101111100001010100000011001010101001010101010010101011010101011111000010101000000110010101010010101010100101010110 0000110010101010 …

ZIP

Pseudorandom data is not compressible

01010101101010101111100001010100000011001010101001010101010010101011010101011111000010101000000110010101010010101010100101010110 0000110010101010 …

Page 38: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Compression before encryption?

Page 39: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Compression before encryption?

Ticking away the moments that make up a dull day Fritter and waste the hours in an off-hand way Kicking around on a piece of ground in your home town …

Page 40: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Compression before encryption?

Ticking away the moments that make up a dull day Fritter and waste the hours in an off-hand way Kicking around on a piece of ground in your home town …

ZIP

Page 41: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Compression before encryption?

Ticking away the moments that make up a dull day Fritter and waste the hours in an off-hand way Kicking around on a piece of ground in your home town …

ZIP

Page 42: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Compression before encryption?

Ticking away the moments that make up a dull day Fritter and waste the hours in an off-hand way Kicking around on a piece of ground in your home town …

010101011010101011111000010101000000110010101010010101010100101010110101010111110000101010000001 …

ZIP

Page 43: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Compression before encryption?

Ticking away the moments that make up a dull day Fritter and waste the hours in an off-hand way Kicking around on a piece of ground in your home town …

010101011010101011111000010101000000110010101010010101010100101010110101010111110000101010000001 …

ZIP

Page 44: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Compression before encryption?

Ticking away the moments that make up a dull day Fritter and waste the hours in an off-hand way Kicking around on a piece of ground in your home town …

010101011010101011111000010101000000110010101010010101010100101010110101010111110000101010000001 …

ZIP

010101011010101011111000010101000000110010101010010101010100101010110101010111110000101010000001 …

Page 45: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Compression before encryption?

Ticking away the moments that make up a dull day Fritter and waste the hours in an off-hand way Kicking around on a piece of ground in your home town …

010101011010101011111000010101000000110010101010010101010100101010110101010111110000101010000001 …

ZIP

010101011010101011111000010101000000110010101010010101010100101010110101010111110000101010000001 …

Page 46: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Compression before encryption?

Ticking away the moments that make up a dull day Fritter and waste the hours in an off-hand way Kicking around on a piece of ground in your home town …

010101011010101011111000010101000000110010101010010101010100101010110101010111110000101010000001 …

ZIP

Compression and encryption

010101011010101011111000010101000000110010101010010101010100101010110101010111110000101010000001 …

Page 47: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP
Page 48: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Strawman #1: compress & encrypt entire database

Page 49: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Strawman #1: compress & encrypt entire database

Client 1

MiniCrypt

Client 2

MiniCrypt

Client 3

MiniCrypt

Page 50: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Strawman #1: compress & encrypt entire database

Client 1

MiniCrypt

Client 2

MiniCrypt

Client 3

MiniCrypt

12809 Amanda D. Edwards 40 Diabetes29489 Robert R. McGowan 56 Diabetes13744 Kimberly R. Seay 51 Cancer18740 Dennis G. Bates 32 Diabetes98329 Ronald S. Ogden 53 Cancer32591 Donna R. Bridges 26 Diabetes

Page 51: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Strawman #1: compress & encrypt entire database

Client 1

MiniCrypt

Client 2

MiniCrypt

Client 3

MiniCrypt

12809 Amanda D. Edwards 40 Diabetes29489 Robert R. McGowan 56 Diabetes13744 Kimberly R. Seay 51 Cancer18740 Dennis G. Bates 32 Diabetes98329 Ronald S. Ogden 53 Cancer32591 Donna R. Bridges 26 Diabetes

ZIP

Page 52: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Strawman #1: compress & encrypt entire database

Client 1

MiniCrypt

Client 2

MiniCrypt

Client 3

MiniCrypt

12809 Amanda D. Edwards 40 Diabetes29489 Robert R. McGowan 56 Diabetes13744 Kimberly R. Seay 51 Cancer18740 Dennis G. Bates 32 Diabetes98329 Ronald S. Ogden 53 Cancer32591 Donna R. Bridges 26 Diabetes

ZIP

Page 53: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Strawman #1: compress & encrypt entire database

Client 1

MiniCrypt

Client 2

MiniCrypt

Client 3

MiniCrypt

12809 Amanda D. Edwards 40 Diabetes29489 Robert R. McGowan 56 Diabetes13744 Kimberly R. Seay 51 Cancer18740 Dennis G. Bates 32 Diabetes98329 Ronald S. Ogden 53 Cancer32591 Donna R. Bridges 26 Diabetes

ZIP

Problem: high network bandwidth

Page 54: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP
Page 55: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Strawman #2: compress & encrypt single row

Page 56: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Strawman #2: compress & encrypt single row

Client 1

MiniCrypt

Client 2

MiniCrypt

Client 3

MiniCrypt

Page 57: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Strawman #2: compress & encrypt single row

29489 Robert R. McGowan 56 Diabetes

13744 Kimberly R. Seay 51 Cancer

18740 Dennis G. Bates 32 Diabetes

98329 Ronald S. Ogden 53 Cancer

32591 Donna R. Bridges 26 Diabetes

Client 1

MiniCrypt

Client 2

MiniCrypt

Client 3

MiniCrypt

12809 Amanda D. Edwards 40 DiabetesZIP

ZIP

ZIP

ZIP

ZIP

ZIP

Page 58: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Strawman #2: compress & encrypt single row

29489 Robert R. McGowan 56 Diabetes

13744 Kimberly R. Seay 51 Cancer

18740 Dennis G. Bates 32 Diabetes

98329 Ronald S. Ogden 53 Cancer

32591 Donna R. Bridges 26 Diabetes

Client 1

MiniCrypt

Client 2

MiniCrypt

Client 3

MiniCrypt

Problem: small compression ratio

12809 Amanda D. Edwards 40 DiabetesZIP

ZIP

ZIP

ZIP

ZIP

ZIP

Page 59: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Observation

Page 60: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Observation

Page 61: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Observation

1.6x

Page 62: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Observation

1.6x4.6x

Page 63: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Observation

1.6x4.6x

5.1x

Page 64: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Observation

Small # of key-value pairs gives high compression

1.6x4.6x

5.1x

Page 65: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Approach

Page 66: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Approach

1. Combine small number of key-value pairs into packs

Page 67: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Approach

1. Combine small number of key-value pairs into packs

2. Compress and encrypt each pack

Page 68: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Challenges

Page 69: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Challenges

1. Server cannot decrypt packs

Page 70: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Challenges

1. Server cannot decrypt packs

2. Multi-key transactions are expensive and not available for some key-value stores

Page 71: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Problem 1 Updates to different keys within a pack can overwrite each other

1013

1521

Client A

MiniCrypt

Client B

MiniCrypt

Page 72: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Problem 1 Updates to different keys within a pack can overwrite each other

1013

1521

Client A

MiniCrypt

Client B

MiniCrypt

Page 73: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Problem 1 Updates to different keys within a pack can overwrite each other

1013

1521

Client A

MiniCrypt

Client B

MiniCrypt

Page 74: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Problem 1 Updates to different keys within a pack can overwrite each other

1013

1521

Client A

MiniCrypt

Client B

MiniCrypt

Page 75: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Problem 1 Updates to different keys within a pack can overwrite each other

1013

1521

Client A

MiniCrypt

Client B

MiniCrypt

Page 76: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

13: ID1

15: ID2

50: ID3

Index

1013

ID1:

Problem 2 Additional index is difficult to keep consistent

ID2: 1521

Client A

MiniCrypt

Page 77: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

13: ID1

15: ID2

50: ID3

Index

1013

ID1:

Problem 2 Additional index is difficult to keep consistent

ID2: 1521

Client A

MiniCrypt

Page 78: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

13: ID1

15: ID2

50: ID3

Index

1013

ID1:

Problem 2 Additional index is difficult to keep consistent

ID2: 1521

Client A

MiniCrypt

Page 79: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

13: ID1

15: ID2

50: ID3

Index

1013

ID1:

Problem 2 Additional index is difficult to keep consistent

ID2: 1521

Client A

MiniCrypt

Page 80: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

MiniCrypt’s techniques

• lookup algorithm

• update algorithm

• splitting algorithm

• epoch-based appends

• merge algorithm

Page 81: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

MiniCrypt’s techniques

• lookup algorithm

• update algorithm

• splitting algorithm

• epoch-based appends

• merge algorithm

using only

Page 82: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

MiniCrypt’s techniques

• lookup algorithm

• update algorithm

• splitting algorithm

• epoch-based appends

• merge algorithm

using only

• single-key atomic compare-and-swap

Page 83: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

MiniCrypt’s techniques

• lookup algorithm

• update algorithm

• splitting algorithm

• epoch-based appends

• merge algorithm

using only

• single-key atomic compare-and-swap

• sorted index on the primary key

Page 84: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

API• get(key)

• put(key, value)

• delete(key)

• range(low_key, high_key)

Page 85: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

API• get(key)

• put(key, value)

• delete(key)

• range(low_key, high_key)

Page 86: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Packingkey value

Sort by primary key

471411343328302627251510

Page 87: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Packingkey value

Sort by primary keysort

471411343328302627251510

Page 88: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Packingkey value

Sort by primary keysort

47

1411

3433

2830

2627

2515

10

Page 89: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Packing

101114

152526

272830

333447

key value

Partition into packs

Page 90: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Packing

101114

152526

272830

333447

key value

Page 91: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Packing

101114

152526

272830

333447

key valueNew key =

smallest key in the pack

Page 92: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Packing

101114

152526

272830

333447

key valueNew key =

smallest key in the pack

New value = a pack of key-value pairs

Page 93: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Packing

101114

152526

272830

333447

key valueNew key =

smallest key in the pack

New value = a pack of key-value pairs

Page 94: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Packing

101114

152526

272830

333447

key value

10:

15:

27:

33:

New key = smallest key in the pack

New value = a pack of key-value pairs

Page 95: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Packing

101114

152526

272830

333447

key value

10:

15:

27:

33:

New key = smallest key in the pack

New value = a pack of key-value pairs

Page 96: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Packing

101114

152526

272830

333447

key value

10:

15:

27:

33:

Compress & encrypt

each pack

Page 97: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Packing

10:

15:

27:

33:

101114

152526

272830

333447

key valueCompress &

encrypt each pack

Page 98: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

10:

15:

27:

33:

Compress & encrypt

each pack

101114

152526

272830

333447

key value

Packing

ZIP

ZIP

ZIP

ZIP

Page 99: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

10:

15:

27:

33:

Compress & encrypt

each pack

101114

152526

272830

333447

key value

Packing

ZIP

ZIP

ZIP

ZIP

Page 100: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

10:

15:

27:

33:

Compress & encrypt

each pack

101114

152526

272830

333447

key value

Packing

ZIP

ZIP

ZIP

ZIP

Page 101: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Pack ID

10:

15:

27:

33:

Compress & encrypt

each pack

101114

152526

272830

333447

key value

Packing

ZIP

ZIP

ZIP

ZIP

Page 102: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Client

MiniCrypt

Single-key get

get(key): select pack with highest pack ID from all pack ID’s that are at most key

10:

15:

27:

33:

ZIP

ZIP

ZIP

ZIP

Page 103: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Client

MiniCrypt

Single-key get

get(key): select pack with highest pack ID from all pack ID’s that are at most key

10:

15:

27:

33:query = get(28)

ZIP

ZIP

ZIP

ZIP

Page 104: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Client

MiniCrypt

Single-key get

get(key): select pack with highest pack ID from all pack ID’s that are at most key

10:

15:

27:

33:query = get(28)

ZIP

ZIP

ZIP

ZIP

Page 105: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Client

MiniCrypt

Single-key get

get(key): select pack with highest pack ID from all pack ID’s that are at most key

10:

15:

27:

33:query = get(28)

28ZIP

ZIP

ZIP

ZIP

Page 106: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Client

MiniCrypt

Single-key get

get(key): select pack with highest pack ID from all pack ID’s that are at most key

10:

15:

27:

33:query = get(28)

28

ZIP

ZIP

ZIP

ZIP

Page 107: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Client

MiniCrypt

Single-key get

get(key): select pack with highest pack ID from all pack ID’s that are at most key

10:

15:

27:

33:query = get(28)

28

ZIP

ZIP

ZIP

ZIP

Page 108: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Client

MiniCrypt

Single-key get

get(key): select pack with highest pack ID from all pack ID’s that are at most key

10:

15:

27:

33:query = get(28)

ZIP

ZIP

ZIP

ZIP

Page 109: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Client

MiniCrypt

Single-key get

get(key): select pack with highest pack ID from all pack ID’s that are at most key

10:

15:

27:

33:query = get(28)

ZIP

ZIP

ZIP

ZIP

Page 110: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Client

MiniCrypt

Single-key get

get(key): select pack with highest pack ID from all pack ID’s that are at most key

10:

15:

27:

33:query = get(28)

ZIP

ZIP

ZIP

Page 111: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Single-key put

10:

15:

27:

33:put(key, value): find pack using get()

Client

MiniCrypt

ZIP

ZIP

ZIP

ZIP

Page 112: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Single-key put

10:

15:

27:

33:put(key, value): find pack using get()

Client

MiniCrypt

ZIP

ZIP

ZIP

ZIP

query = put(28, 5)

Page 113: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Single-key put

10:

15:

27:

33:put(key, value): find pack using get()

Client

MiniCrypt

ZIP

ZIP

ZIP

ZIP

query = put(28, 5)

Page 114: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Single-key put

10:

15:

27:

33:put(key, value): find pack using get()

Client

MiniCrypt

28ZIP

ZIP

ZIP

ZIP

query = put(28, 5)

Page 115: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Single-key put

10:

15:

27:

33:put(key, value): find pack using get()

Client

MiniCrypt28

ZIP

ZIP

ZIP

ZIP

query = put(28, 5)

Page 116: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Single-key put

10:

15:

27:

33:put(key, value): find pack using get()

Client

MiniCrypt28

ZIP

ZIP

ZIP

ZIP

query = put(28, 5)

Page 117: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Single-key put

10:

15:

27:

33:put(key, value): find pack using get()

Client

MiniCrypt

ZIP

ZIP

ZIP

ZIP

query = put(28, 5)

Page 118: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Single-key put

10:

15:

27:

33:put(key, value): find pack using get()

Client

MiniCrypt

ZIP

ZIP

ZIP

ZIP

query = put(28, 5)

Page 119: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Single-key put

10:

15:

27:

33:put(key, value): find pack using get()

Client

MiniCrypt

ZIP

ZIP

ZIP

query = put(28, 5)

Page 120: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Single-key put

10:

15:

27:

33:put(key, value): find pack using get()

Client

MiniCrypt

ZIP

ZIP

ZIP

modify pack

query = put(28, 5)

Page 121: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Single-key put

10:

15:

27:

33:put(key, value): find pack using get()

Client

MiniCrypt

ZIP

ZIP

ZIP

modify pack

query = put(28, 5)

Page 122: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Single-key put

10:

15:

27:

33:put(key, value): find pack using get()

Client

MiniCrypt

ZIP

ZIP

ZIP

modify pack

query = put(28, 5)

Page 123: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Single-key put

10:

15:

27:

33:put(key, value): find pack using get()

Client

MiniCrypt

ZIP

ZIP

ZIP

ZIP

modify pack

query = put(28, 5)

Page 124: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Single-key put

10:

15:

27:

33:put(key, value): find pack using get()

Client

MiniCrypt

ZIP

ZIP

ZIP

ZIP

modify packwrite back using compare-and-swap

query = put(28, 5)

Page 125: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Single-key put

10:

15:

27:

33:put(key, value): find pack using get()

Client

MiniCrypt

ZIP

ZIP

ZIP

ZIP

modify packwrite back using compare-and-swap

query = put(28, 5)

Page 126: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Problem: writes are expensive

Page 127: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Problem: writes are expensive

• Solution: append-only mode

Page 128: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Problem: writes are expensive

• Solution: append-only mode

• Inserted keys are roughly monotonically increasing

Page 129: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Problem: writes are expensive

• Solution: append-only mode

• Inserted keys are roughly monotonically increasing

• Key-value pairs can be modified within some bounded time

Page 130: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Problem: writes are expensive

• Solution: append-only mode

• Inserted keys are roughly monotonically increasing

• Key-value pairs can be modified within some bounded time

• Applications: streaming data, time-series data

Page 131: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Approach

Page 132: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Approach• Server keeps track of epoch

Page 133: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Approach• Server keeps track of epoch• Each insert assigned an epoch

• Each new record inserted normally

Page 134: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Approach• Server keeps track of epoch• Each insert assigned an epoch

• Each new record inserted normally• Merge epochs into packs in the background

• merge deterministically

Page 135: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Append mode10:

15:

27:

33:

ZIP

ZIP

ZIP

ZIP

Client

MiniCrypt

Page 136: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Append modeCurrent epoch: 4 10:

15:

27:

33:

ZIP

ZIP

ZIP

ZIP

Client

MiniCrypt

Page 137: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Append mode

time

Current epoch: 4 10:

15:

27:

33:

ZIP

ZIP

ZIP

ZIP

Client

MiniCrypt

Page 138: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Append mode

time

Current epoch:

504

4 10:

15:

27:

33:

ZIP

ZIP

ZIP

ZIP

Client

MiniCrypt

Page 139: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Append mode

time

Current epoch:

504534

4 10:

15:

27:

33:

ZIP

ZIP

ZIP

ZIP

Client

MiniCrypt

Page 140: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Append mode

time

Current epoch:

504534614

4 10:

15:

27:

33:

ZIP

ZIP

ZIP

ZIP

Client

MiniCrypt

Page 141: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Append mode

time

Current epoch:

504534614

4 10:

15:

27:

33:

ZIP

ZIP

ZIP

ZIP

Client

MiniCrypt

Page 142: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Append mode

time

Current epoch:

504534614

5 10:

15:

27:

33:

ZIP

ZIP

ZIP

ZIP

Client

MiniCrypt

Page 143: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Append mode

time

Current epoch:

504534614

5 10:

15:

27:

33:

ZIP

ZIP

ZIP

ZIP

Client

MiniCrypt

Page 144: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Append mode

time

Current epoch:

504534614

5 10:

15:

27:

33:

ZIP

ZIP

ZIP

ZIP

Client

MiniCrypt

Page 145: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Append mode

time

Current epoch:

504534614

625

5 10:

15:

27:

33:

ZIP

ZIP

ZIP

ZIP

Client

MiniCrypt

Page 146: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Append mode

time

Current epoch:

504534614

625635

5 10:

15:

27:

33:

ZIP

ZIP

ZIP

ZIP

Client

MiniCrypt

Page 147: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Append mode

time

Current epoch:

504534614

625635655

5 10:

15:

27:

33:

ZIP

ZIP

ZIP

ZIP

Client

MiniCrypt

Page 148: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

5

Append mode

time

Current epoch:

504534614

625635655

10:

15:

27:

33:

ZIP

ZIP

ZIP

ZIP

Client

MiniCrypt

Page 149: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

5

Append mode

time

Current epoch:

625635655

10:

15:

27:

33:

ZIP

ZIP

ZIP

ZIP

Client

MiniCrypt

504534614

Page 150: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

5

Append mode

time

Current epoch:

625635655

10:

15:

27:

33:

ZIP

ZIP

ZIP

ZIP

Client

MiniCrypt

ZIP

Page 151: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

5

Append mode

time

Current epoch:

625635655

10:

15:

27:

33:

ZIP

ZIP

ZIP

ZIP

Client

MiniCrypt

ZIP

Page 152: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

5

Append mode

time

Current epoch:

625635655

10:

15:

27:

33:

ZIP

ZIP

ZIP

ZIP

Client

MiniCrypt

ZIP

50:

Page 153: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Evaluation

Page 154: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Evaluation• MiniCrypt built on unmodified Cassandra

Page 155: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Evaluation• MiniCrypt built on unmodified Cassandra

• Comparison with

Page 156: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Evaluation• MiniCrypt built on unmodified Cassandra

• Comparison with

• Baseline: each row compressed and encrypted

Page 157: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Evaluation• MiniCrypt built on unmodified Cassandra

• Comparison with

• Baseline: each row compressed and encrypted

• Vanilla: no encryption

Page 158: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Evaluation• MiniCrypt built on unmodified Cassandra

• Comparison with

• Baseline: each row compressed and encrypted

• Vanilla: no encryption

• YCSB benchmark

Page 159: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Evaluation• MiniCrypt built on unmodified Cassandra

• Comparison with

• Baseline: each row compressed and encrypted

• Vanilla: no encryption

• YCSB benchmark

• Anonymized Conviva data (video analytics)

Page 160: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Evaluation setup

Page 161: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Evaluation setup• Amazon EC2 cluster of 3 instances

Page 162: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Evaluation setup• Amazon EC2 cluster of 3 instances

• 15 GB of memory

Page 163: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Evaluation setup• Amazon EC2 cluster of 3 instances

• 15 GB of memory

• 8 cores

Page 164: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Evaluation setup• Amazon EC2 cluster of 3 instances

• 15 GB of memory

• 8 cores

• Zlib compression

Page 165: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Evaluation setup• Amazon EC2 cluster of 3 instances

• 15 GB of memory

• 8 cores

• Zlib compression

• AES-256 CBC for encryption

Page 166: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

YCSB 100% single-record read

SSD

Page 167: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

YCSB 100% single-record read

SSD

9.2x

Page 168: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

YCSB 100% single-record read

SSD Disk

9.2x

Page 169: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

YCSB 100% single-record read

SSD Disk

9.2x 100x

Page 170: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

SSD

YCSB 100% range query

Page 171: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

SSD

YCSB 100% range query

5x

Page 172: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

SSD Disk

YCSB 100% range query

5x

Page 173: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

SSD Disk

YCSB 100% range query

5x 38x

Page 174: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

YCSB 100% single-record write

Default

Page 175: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

YCSB 100% single-record write

Default Append-only

Page 176: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Conclusion

MiniCrypt shows that we can achieve compression and encryption using systems techniques

Page 177: MiniCrypt: Reconciling Compression and Encryption in Big ...wzheng/eurosys_2017_talk.pdf · Problem: small compression ratio ZIP 12809 Amanda D. Edwards 40 Diabetes ZIP ZIP ZIP ZIP

Conclusion

MiniCrypt shows that we can achieve compression and encryption using systems techniques

Thank you!