cop-6087 university of central floridadcm/teaching/cop6087-fall... · mohammad ahmadian...

32
Mohammad Ahmadian [email protected] COP-6087 University of Central Florida

Upload: others

Post on 10-Oct-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: COP-6087 University of Central Floridadcm/Teaching/COP6087-Fall... · Mohammad Ahmadian ahmadian@knights.ucf.edu COP-6087 University of Central Florida

Mohammad Ahmadian [email protected]

COP-6087

University of Central Florida

Page 2: COP-6087 University of Central Floridadcm/Teaching/COP6087-Fall... · Mohammad Ahmadian ahmadian@knights.ucf.edu COP-6087 University of Central Florida

Motivation Database in AWS Approaches to reduce risk SUNDE DBCrypt SQL-aware Encryption Threats Case studies Performance Evaluation Contribution Weakness Improvement

Wednesday, September 25, 2013 COP 6087 Cloud comptation 2

Page 3: COP-6087 University of Central Floridadcm/Teaching/COP6087-Fall... · Mohammad Ahmadian ahmadian@knights.ucf.edu COP-6087 University of Central Florida

Unencrypted databases can be very unsecure ◦ Attackers, malicious admins, hosting providers

◦ Snoop on private data: Health records, Financial Statements

Current encrypted systems are either client-side or computationally expensive

Page 4: COP-6087 University of Central Floridadcm/Teaching/COP6087-Fall... · Mohammad Ahmadian ahmadian@knights.ucf.edu COP-6087 University of Central Florida

DynamoDB SimpleDB

RDS

MySQL in EC2

Page 5: COP-6087 University of Central Floridadcm/Teaching/COP6087-Fall... · Mohammad Ahmadian ahmadian@knights.ucf.edu COP-6087 University of Central Florida

Encrypting all sensitive data in database

DBCrypt: execute queries that SQL over encrypted data. ◦ The biggest challenge is providing efficiency and

adequate confidentiality.

◦ Strong cryptosystems like AES would prevent DBMS server from executing many SQL queries, such that ask for number of employees whose salary is greater than $60000

Page 6: COP-6087 University of Central Floridadcm/Teaching/COP6087-Fall... · Mohammad Ahmadian ahmadian@knights.ucf.edu COP-6087 University of Central Florida

Encrypting all sensitive data in database

Advantage: It reduce damage caused by server compromises

Disadvantages: ◦ All computation (application logic) runs on clients.

◦ Other applications not support this approach

Page 7: COP-6087 University of Central Floridadcm/Teaching/COP6087-Fall... · Mohammad Ahmadian ahmadian@knights.ucf.edu COP-6087 University of Central Florida

Intermediate point between DBMS and application server

Executes queries over encrypted data

Efficiently supports SQL queries ◦ Equality checks, sums, joins, etc

◦ Supports most relational queries

Symmetric Encryption

MySQL 5.1

C++ & PHP

Page 8: COP-6087 University of Central Floridadcm/Teaching/COP6087-Fall... · Mohammad Ahmadian ahmadian@knights.ucf.edu COP-6087 University of Central Florida

Select name from Emp where sal > 100000

Queries

Select decrypt (“xsxx”)

from “cwlxss”

where “xescs” > OPESencrypt(100000)

DBMS

Translation layer

Encrypted data

And metadata

Users have a plaintext view of an

encrypted database

Plaintext queries are translated into

equivalent queries over encrypted data

Tables are encrypted using

standard as well as order

preserving encryption

Comparison operators are directly

applied over encrypted columns

I strictly will focus on the

OPES algorithms in my

next presentation

Page 9: COP-6087 University of Central Floridadcm/Teaching/COP6087-Fall... · Mohammad Ahmadian ahmadian@knights.ucf.edu COP-6087 University of Central Florida

Works for 99.5% of columns used by MIT applications

Low overhead ◦ Reduced throughput by only 14.5% for phpBB forum

and by 26% for TPC-C

6 applications running on secure database

Page 10: COP-6087 University of Central Floridadcm/Teaching/COP6087-Fall... · Mohammad Ahmadian ahmadian@knights.ucf.edu COP-6087 University of Central Florida

Intercepts all queries

Encrypts & decrypts data

Hides decryption keys from DBMS

Prevents access to logged out users’ data

Can’t prevent deletion of data or maintain integrity of application

Page 11: COP-6087 University of Central Floridadcm/Teaching/COP6087-Fall... · Mohammad Ahmadian ahmadian@knights.ucf.edu COP-6087 University of Central Florida

Attacker: (Passive) Malicious admin or attacker with access to DBMS ◦ More likely to read or leak data than to alter or

delete

Goal: Confidentiality

Approach ◦ DBCrypt encrypts queries and inserted data

◦ Encrypts meta-data

Page 12: COP-6087 University of Central Floridadcm/Teaching/COP6087-Fall... · Mohammad Ahmadian ahmadian@knights.ucf.edu COP-6087 University of Central Florida

Guarantees ◦ Sensitive data is not plaintext readable by DBMS

◦ DBMS can’t read results of queries not requested by DBCrypt

Can’t Hide ◦ Table structure, number of rows, column types,

column relationships

Page 13: COP-6087 University of Central Floridadcm/Teaching/COP6087-Fall... · Mohammad Ahmadian ahmadian@knights.ucf.edu COP-6087 University of Central Florida

Proxy intercepts and rewrites query ◦ anonymizes table and cloumn names

◦ Encrypts using a master Secret Key

Passes new query to DBMS

Decrypts query results and returns it to the application

Page 14: COP-6087 University of Central Floridadcm/Teaching/COP6087-Fall... · Mohammad Ahmadian ahmadian@knights.ucf.edu COP-6087 University of Central Florida
Page 15: COP-6087 University of Central Floridadcm/Teaching/COP6087-Fall... · Mohammad Ahmadian ahmadian@knights.ucf.edu COP-6087 University of Central Florida

Different Layers of encryption depending on query type

Page 16: COP-6087 University of Central Floridadcm/Teaching/COP6087-Fall... · Mohammad Ahmadian ahmadian@knights.ucf.edu COP-6087 University of Central Florida

Random ◦ Maximum security (AES or Blowfish)

◦ Indistinguishable under an adaptive chosen-plaintext attack

Deterministic ◦ Generates same ciphertext for the same plaintext

◦ Allows server to perform equality checks (equality JOINs, GROUP BY, COUNT, DISTINCT)

Page 17: COP-6087 University of Central Floridadcm/Teaching/COP6087-Fall... · Mohammad Ahmadian ahmadian@knights.ucf.edu COP-6087 University of Central Florida

Order-preserving encryption ◦ If x < y, then OPE(x) < OPE(y)

◦ Allows for ORDER BY, MIN, MAX, SORT

Join ◦ Prevents cross-column correlations exposed by

Deterministic encryption

Word Search ◦ Allows for searching over encrypted text (LIKE)

◦ Only full-word, can’t support regex

Page 18: COP-6087 University of Central Floridadcm/Teaching/COP6087-Fall... · Mohammad Ahmadian ahmadian@knights.ucf.edu COP-6087 University of Central Florida

Adjust layer of encryption based on query needs

Page 19: COP-6087 University of Central Floridadcm/Teaching/COP6087-Fall... · Mohammad Ahmadian ahmadian@knights.ucf.edu COP-6087 University of Central Florida

Attacker compromises application server, DBCrypt proxy, or DBMS

Solution: Encrypt different data with different keys – e.g. data belonging to different users

Developers annotate DB schema to indicate how each data item should be decrypted

Maintains security from threat 1

Page 20: COP-6087 University of Central Floridadcm/Teaching/COP6087-Fall... · Mohammad Ahmadian ahmadian@knights.ucf.edu COP-6087 University of Central Florida
Page 21: COP-6087 University of Central Floridadcm/Teaching/COP6087-Fall... · Mohammad Ahmadian ahmadian@knights.ucf.edu COP-6087 University of Central Florida

Key chaining & public key encryption allow different groups or users access to the same information ◦ Sub-forum that is hidden to non-group members

◦ Private messages between two users

Only access data for logged in users

Page 22: COP-6087 University of Central Floridadcm/Teaching/COP6087-Fall... · Mohammad Ahmadian ahmadian@knights.ucf.edu COP-6087 University of Central Florida

phpBB ◦ Opensource forum

◦ Users & groups with varied access permissions to messages, forums, posts

HotCRP ◦ Conference review application

◦ Users restricted from viewing who reviewed papers

◦ Currently, vanilla HotCRP cannot prevent a conference chair from viewing confidential information, so many conferences setup second server

Page 23: COP-6087 University of Central Floridadcm/Teaching/COP6087-Fall... · Mohammad Ahmadian ahmadian@knights.ucf.edu COP-6087 University of Central Florida

Grad-apply ◦ Graduate admissions system used by MIT EECS

◦ An applicant’s data can only be viewed by applicant and reviewing faculty

◦ Applicant can’t view letters of recommendation

Page 24: COP-6087 University of Central Floridadcm/Teaching/COP6087-Fall... · Mohammad Ahmadian ahmadian@knights.ucf.edu COP-6087 University of Central Florida
Page 25: COP-6087 University of Central Floridadcm/Teaching/COP6087-Fall... · Mohammad Ahmadian ahmadian@knights.ucf.edu COP-6087 University of Central Florida
Page 26: COP-6087 University of Central Floridadcm/Teaching/COP6087-Fall... · Mohammad Ahmadian ahmadian@knights.ucf.edu COP-6087 University of Central Florida
Page 27: COP-6087 University of Central Floridadcm/Teaching/COP6087-Fall... · Mohammad Ahmadian ahmadian@knights.ucf.edu COP-6087 University of Central Florida

10 parallel clients

Page 28: COP-6087 University of Central Floridadcm/Teaching/COP6087-Fall... · Mohammad Ahmadian ahmadian@knights.ucf.edu COP-6087 University of Central Florida

Layer of security for typical databases that guarantees a certain level of confidentiality for different threats

Page 29: COP-6087 University of Central Floridadcm/Teaching/COP6087-Fall... · Mohammad Ahmadian ahmadian@knights.ucf.edu COP-6087 University of Central Florida

Cannot support both computation and comparison on the same column ◦ E.g. WHERE salary > employment_length*1200

In multi-key mode, cannot support server-side computations on encrypted data affecting multiple entities

Page 30: COP-6087 University of Central Floridadcm/Teaching/COP6087-Fall... · Mohammad Ahmadian ahmadian@knights.ucf.edu COP-6087 University of Central Florida

Add features to secure Integrity of data in addition to Confidentiality ◦ Perhaps impractical

Add both comparison and Computation in one query

Page 31: COP-6087 University of Central Floridadcm/Teaching/COP6087-Fall... · Mohammad Ahmadian ahmadian@knights.ucf.edu COP-6087 University of Central Florida
Page 32: COP-6087 University of Central Floridadcm/Teaching/COP6087-Fall... · Mohammad Ahmadian ahmadian@knights.ucf.edu COP-6087 University of Central Florida

OPE

FHE(HOM)