CryptDB Protecting Confidentiality with Encrypted Query Processing - - PowerPoint PPT Presentation

cryptdb
SMART_READER_LITE
LIVE PREVIEW

CryptDB Protecting Confidentiality with Encrypted Query Processing - - PowerPoint PPT Presentation

CryptDB Protecting Confidentiality with Encrypted Query Processing Katarzyna Baranowska University of Warsaw January 21, 2012 Threats Threat 1 Speed Evaluation Threat 2 More Evaluation Why secure data? Medical data Contact data Payment


slide-1
SLIDE 1

CryptDB

Protecting Confidentiality with Encrypted Query Processing Katarzyna Baranowska

University of Warsaw

January 21, 2012

slide-2
SLIDE 2

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Why secure data?

Medical data Contact data Payment Personal evaluation and recommendations Company data

slide-3
SLIDE 3

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Posible threats

slide-4
SLIDE 4

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Posible threats

slide-5
SLIDE 5

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Posible threats

slide-6
SLIDE 6

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Posible threats

slide-7
SLIDE 7

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Other solutions

Encrypt and decrypt data at users side

slide-8
SLIDE 8

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Other solutions

Encrypt and decrypt data at users side

Needs moving application logic to users

slide-9
SLIDE 9

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Other solutions

Encrypt and decrypt data at users side

Needs moving application logic to users Not effective if apllication computes over large amount of data

slide-10
SLIDE 10

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Other solutions

Encrypt and decrypt data at users side

Needs moving application logic to users Not effective if apllication computes over large amount of data

Use fully homomorphic encryption, which allows servers to compute functions over encrypted data

slide-11
SLIDE 11

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Other solutions

Encrypt and decrypt data at users side

Needs moving application logic to users Not effective if apllication computes over large amount of data

Use fully homomorphic encryption, which allows servers to compute functions over encrypted data

Very slow

slide-12
SLIDE 12

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Other solutions

Encrypt and decrypt data at users side

Needs moving application logic to users Not effective if apllication computes over large amount of data

Use fully homomorphic encryption, which allows servers to compute functions over encrypted data

Very slow Very expensive

slide-13
SLIDE 13

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

CryptDB solution

slide-14
SLIDE 14

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

CryptDB solution

Threat 1

slide-15
SLIDE 15

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

CryptDB solution

Threat 1

SQL-aware encryption strategy (symmertic keys)

slide-16
SLIDE 16

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

CryptDB solution

Threat 1

SQL-aware encryption strategy (symmertic keys) Adjustable query-based encryption (onions of encryption)

slide-17
SLIDE 17

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

CryptDB solution

Threat 1

SQL-aware encryption strategy (symmertic keys) Adjustable query-based encryption (onions of encryption)

Threat 2

slide-18
SLIDE 18

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

CryptDB solution

Threat 1

SQL-aware encryption strategy (symmertic keys) Adjustable query-based encryption (onions of encryption)

Threat 2

Chaining encryption keys to user passwords

slide-19
SLIDE 19

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Dealing with curious DBA

slide-20
SLIDE 20

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Dealing with curious DBA

slide-21
SLIDE 21

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Dealing with curious DBA

UPDATE Table1 SET C2-Ord = DECRYPT RND(K, C2-ORD, C2-IV)

slide-22
SLIDE 22

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Used alorithms

slide-23
SLIDE 23

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Used alorithms

RND (random): AES-CBC, Blowfish (for integers) with IV

slide-24
SLIDE 24

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Used alorithms

RND (random): AES-CBC, Blowfish (for integers) with IV DET (deterministic): AES-CMC, Blowfish without IV

slide-25
SLIDE 25

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Used alorithms

RND (random): AES-CBC, Blowfish (for integers) with IV DET (deterministic): AES-CMC, Blowfish without IV JOIN : keyed cryptographic hash, with the additional property that hashes can be adjusted to change their keys without access to the plaintext (JOIN-ADJ)

slide-26
SLIDE 26

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Used alorithms

RND (random): AES-CBC, Blowfish (for integers) with IV DET (deterministic): AES-CMC, Blowfish without IV JOIN : keyed cryptographic hash, with the additional property that hashes can be adjusted to change their keys without access to the plaintext (JOIN-ADJ) OPE (order-preserving encryption): random mapping that preserves order, never before implemented

slide-27
SLIDE 27

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Used alorithms

RND (random): AES-CBC, Blowfish (for integers) with IV DET (deterministic): AES-CMC, Blowfish without IV JOIN : keyed cryptographic hash, with the additional property that hashes can be adjusted to change their keys without access to the plaintext (JOIN-ADJ) OPE (order-preserving encryption): random mapping that preserves order, never before implemented OPE-JOIN: must be known a priori, but is rare (50 out of 128,840 columns)

slide-28
SLIDE 28

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Used alorithms

RND (random): AES-CBC, Blowfish (for integers) with IV DET (deterministic): AES-CMC, Blowfish without IV JOIN : keyed cryptographic hash, with the additional property that hashes can be adjusted to change their keys without access to the plaintext (JOIN-ADJ) OPE (order-preserving encryption): random mapping that preserves order, never before implemented OPE-JOIN: must be known a priori, but is rare (50 out of 128,840 columns) HOM (homomorphic encryption): Paillier cryptosystem for summation

slide-29
SLIDE 29

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Used alorithms

RND (random): AES-CBC, Blowfish (for integers) with IV DET (deterministic): AES-CMC, Blowfish without IV JOIN : keyed cryptographic hash, with the additional property that hashes can be adjusted to change their keys without access to the plaintext (JOIN-ADJ) OPE (order-preserving encryption): random mapping that preserves order, never before implemented OPE-JOIN: must be known a priori, but is rare (50 out of 128,840 columns) HOM (homomorphic encryption): Paillier cryptosystem for summation SEARCH (word search): protocol of Song et al.

slide-30
SLIDE 30

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Used alorithms

slide-31
SLIDE 31

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Used alorithms

OPE can be speeded up by caching frequently used constants

  • ver diffrent keys

HOM encryption can be speeded up by precomputing Paillier rn randomness

slide-32
SLIDE 32

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

CryptDB features

Security improvements

slide-33
SLIDE 33

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

CryptDB features

Security improvements

Minimum onion layers

slide-34
SLIDE 34

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

CryptDB features

Security improvements

Minimum onion layers In-proxy processing

slide-35
SLIDE 35

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

CryptDB features

Security improvements

Minimum onion layers In-proxy processing Training mode

slide-36
SLIDE 36

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

CryptDB features

Security improvements

Minimum onion layers In-proxy processing Training mode Onion re-encryption

slide-37
SLIDE 37

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

CryptDB features

Security improvements

Minimum onion layers In-proxy processing Training mode Onion re-encryption

Performance Optimizations

slide-38
SLIDE 38

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

CryptDB features

Security improvements

Minimum onion layers In-proxy processing Training mode Onion re-encryption

Performance Optimizations

Developer Annotations

slide-39
SLIDE 39

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

CryptDB features

Security improvements

Minimum onion layers In-proxy processing Training mode Onion re-encryption

Performance Optimizations

Developer Annotations Known query set

slide-40
SLIDE 40

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

CryptDB features

Security improvements

Minimum onion layers In-proxy processing Training mode Onion re-encryption

Performance Optimizations

Developer Annotations Known query set Precomputing and caching for OPE and HOM

slide-41
SLIDE 41

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

CryptDB structure

slide-42
SLIDE 42

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Environment used for tests

slide-43
SLIDE 43

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Environment used for tests

slide-44
SLIDE 44

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Throughput 1

slide-45
SLIDE 45

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Throughput 2

slide-46
SLIDE 46

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Throughput 2

SUM (2x less) and UPDATE (1.6 less) requires HOM additions at server

slide-47
SLIDE 47

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Processing times

Proxy* - without precomputing and caching optimization

slide-48
SLIDE 48

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Processing times

CryptDB adds an average of 0.60ms to a query 24% is spent in MySQL proxy 23% is spent in encryption and decryption 53% is spent parsing and processing queries

slide-49
SLIDE 49

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Threat 2

slide-50
SLIDE 50

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

phpBB messages

slide-51
SLIDE 51

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

phpBB posts

slide-52
SLIDE 52

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

HotCRP

slide-53
SLIDE 53

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Key Chaining

Each instance of each principal type has a secret, randomly choosen key (symmetric, and public/private pair)

slide-54
SLIDE 54

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Key Chaining

Each instance of each principal type has a secret, randomly choosen key (symmetric, and public/private pair) If B speaks for A then A’s key (symmetric and private) is encrypred with B’s key (symmetric) and stored in access keys table

slide-55
SLIDE 55

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Key Chaining

Each instance of each principal type has a secret, randomly choosen key (symmetric, and public/private pair) If B speaks for A then A’s key (symmetric and private) is encrypred with B’s key (symmetric) and stored in access keys table In case, when it is imposible to encrypt with B’s symmertic key, A’s key is encrypted with public key (stored in public keys table) for reencryption in the future

slide-56
SLIDE 56

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Key Chaining

Each instance of each principal type has a secret, randomly choosen key (symmetric, and public/private pair) If B speaks for A then A’s key (symmetric and private) is encrypred with B’s key (symmetric) and stored in access keys table In case, when it is imposible to encrypt with B’s symmertic key, A’s key is encrypted with public key (stored in public keys table) for reencryption in the future External principal keys are encrypted by their passwords and stored in table external keys

slide-57
SLIDE 57

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Key Chaining

Each instance of each principal type has a secret, randomly choosen key (symmetric, and public/private pair) If B speaks for A then A’s key (symmetric and private) is encrypred with B’s key (symmetric) and stored in access keys table In case, when it is imposible to encrypt with B’s symmertic key, A’s key is encrypted with public key (stored in public keys table) for reencryption in the future External principal keys are encrypted by their passwords and stored in table external keys Logging in and out the users is done by INSERTs and DELETEs on table cryptdb active with two columns username and password

slide-58
SLIDE 58

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Tested applications

phpBB open souce forum

slide-59
SLIDE 59

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Tested applications

phpBB open souce forum HotCRP conference review application

slide-60
SLIDE 60

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Tested applications

phpBB open souce forum HotCRP conference review application grad-apply raduate admissions system used by MIT EECS

slide-61
SLIDE 61

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Tested applications

phpBB open souce forum HotCRP conference review application grad-apply raduate admissions system used by MIT EECS OpenEMR electronic medical records application

slide-62
SLIDE 62

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Tested applications

phpBB open souce forum HotCRP conference review application grad-apply raduate admissions system used by MIT EECS OpenEMR electronic medical records application MIT 6.02 application storing students grades

slide-63
SLIDE 63

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Tested applications

phpBB open souce forum HotCRP conference review application grad-apply raduate admissions system used by MIT EECS OpenEMR electronic medical records application MIT 6.02 application storing students grades PHP-calendar - an online organizer

slide-64
SLIDE 64

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Tested SQL sources

TPC-C SQL queries centered around the principal activities (transactions) of an order-entry environment (entering and delivering orders, recording payments, checking the status of orders, monitoring the level of stock at the warehouses, etc)

slide-65
SLIDE 65

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Tested SQL sources

TPC-C SQL queries centered around the principal activities (transactions) of an order-entry environment (entering and delivering orders, recording payments, checking the status of orders, monitoring the level of stock at the warehouses, etc) sql.mit.edu a 10 days trace from schared database of web and MIT applications

slide-66
SLIDE 66

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Tested SQL sources

TPC-C SQL queries centered around the principal activities (transactions) of an order-entry environment (entering and delivering orders, recording payments, checking the status of orders, monitoring the level of stock at the warehouses, etc) sql.mit.edu a 10 days trace from schared database of web and MIT applications

slide-67
SLIDE 67

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Implementation

Lua module (150 lines of code) C++ library (18 000 lines of code)

Query parser Query encryptor/rewriter Decryption module

Test code (10 000 lines of code)

slide-68
SLIDE 68

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Implementation

Lua module (150 lines of code) C++ library (18 000 lines of code)

Query parser Query encryptor/rewriter Decryption module

Test code (10 000 lines of code)

slide-69
SLIDE 69

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Speed (phpBB example)

slide-70
SLIDE 70

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Functionality

slide-71
SLIDE 71

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Functionality

CryptDB encrypts 99.5% of columns (571 of 128 840). Of 571 columns:

slide-72
SLIDE 72

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Functionality

CryptDB encrypts 99.5% of columns (571 of 128 840). Of 571 columns: 222 use bitwise operator in WHERE clause or in aggregation (mostly for checking permissions)

slide-73
SLIDE 73

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Functionality

CryptDB encrypts 99.5% of columns (571 of 128 840). Of 571 columns: 222 use bitwise operator in WHERE clause or in aggregation (mostly for checking permissions) 205 use string processing in where clause (mostly for case insensitive match)

slide-74
SLIDE 74

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Functionality

CryptDB encrypts 99.5% of columns (571 of 128 840). Of 571 columns: 222 use bitwise operator in WHERE clause or in aggregation (mostly for checking permissions) 205 use string processing in where clause (mostly for case insensitive match) 76 use mathematical transformations in WHERE clause (dates, times, scores, coordinates)

slide-75
SLIDE 75

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Functionality

CryptDB encrypts 99.5% of columns (571 of 128 840). Of 571 columns: 222 use bitwise operator in WHERE clause or in aggregation (mostly for checking permissions) 205 use string processing in where clause (mostly for case insensitive match) 76 use mathematical transformations in WHERE clause (dates, times, scores, coordinates) 41 use LIKE to check data over a pattern (IP adresses, usernames, URLs, etc)

slide-76
SLIDE 76

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Functionality

CryptDB encrypts 99.5% of columns (571 of 128 840). Of 571 columns: 222 use bitwise operator in WHERE clause or in aggregation (mostly for checking permissions) 205 use string processing in where clause (mostly for case insensitive match) 76 use mathematical transformations in WHERE clause (dates, times, scores, coordinates) 41 use LIKE to check data over a pattern (IP adresses, usernames, URLs, etc) 27 other

slide-77
SLIDE 77

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Security

MinEnc from strongest to weakest: RND and HOM SEARCH DET and JOIN OPE HIGH encryption means RND, HOM and DET for columns with no repetitions

slide-78
SLIDE 78

Threats Threat 1 Speed Evaluation Threat 2 More Evaluation

Source code is available for research purposes

  • nly

at g.csail.mit.edu/cryptdb. It can be accesed using git. Notes on how to build CryptDB can be found in doc/BUILD, and several examples

  • f how to run CryptDB in doc/README.

We are actively developing CryptDB. In particular, we are currently transitioning the code to perform more generic query parsing and rewriting, based on the native parser from the MySQL server. We will announce any significant changes to CryptDB on the cryptdbannounce mailing list css.csail.mit.edu/cryptdb/