Li Xiong
CryptDB: Protecting Confidentiality with Encrypted Query Processing
CS573 Data Privacy and Security
Slides credit: Raluca Ada Popa, Catherine M. S. Redfield, Nickolai Zeldovich, and Hari Balakrishnan MIT CSAIL
CryptDB: Protecting Confidentiality with Encrypted Query Processing - - PowerPoint PPT Presentation
CS573 Data Privacy and Security CryptDB: Protecting Confidentiality with Encrypted Query Processing Li Xiong Slides credit: Raluca Ada Popa, Catherine M. S. Redfield, Nickolai Zeldovich, and Hari Balakrishnan MIT CSAIL Problem Confidential
Slides credit: Raluca Ada Popa, Catherine M. S. Redfield, Nickolai Zeldovich, and Hari Balakrishnan MIT CSAIL
Application DB Server
SQL User 1 User 2 User 3
Confidential data leaks from databases
8M medical records compromised 2009-2011 [Homeland Sec.
News Wire,’11]
2012: hackers extracted 6.5 million hashed passwords from the
DB of LinkedIn
Sony Playstation Network, accessed 77 million user profiles
System administrator Threat 1: passive DB server attacks Threat 2: any attacks on all servers Hackers
Goal: protect confidentiality of data 1.
2.
Application DB Server
SQL Threat 1: passive DB server attacks Threat 2: any attacks on all servers
User 1 User 2 User 3
2.
3.
salary 60 100 800 100 100 = query ?
index
60
Unencrypted databases fast insecure FHE [Gentry’09], [BV’11,12][GHS’12],..
… 100 800 salary xa32601 x8199f3 x62d03b xcef3f7 …
circuit C
slow strong security
salary x4be2 x95c6 x2ea8 x17ce x98aa = query ?
index
x4be2 … x17ce x2ea8
CryptDB fast high degree
query input x24ab1c
Most SQL uses a limited set of operations Security: Reveal only relations among data that are required by classes of queries issued
Unencrypted databases fast insecure FHE slow strong security
salary x4be2 x95c6 x2ea8 x17ce x98aa = query ?
index
x4be2 … x17ce x2ea8
CryptDB fast high degree
DB Server
transformed query
Proxy
plain query
Under attack
Application decrypted results encrypted results
Trusted
completely at the DBMS,
Process SQL queries on encrypted data
Encrypted DB
col1/rank col2/name table1/emp SELECT * FROM emp WHERE salary = 100 x934bc1 x5a8c34 x5a8c34 x84a21c SELECT * FROM table1 WHERE col3 = x5a8c34 Proxy
x5a8c34 x5a8c34
x5a8c34 x5a8c34 x4be219 x95c623 x2ea887 x17cea7 col3/salary Application 60 100 800 100
col1/rank col2/name table1 (emp) x934bc1 x5a8c34 x5a8c34 x84a21c x638e5 4 x638e5 4 x922eb4 x1eab8 1 SELECT * FROM table1 WHERE col3 ≥ x638e54 Proxy x638e5 4 x922eb4 x638e5 4 col3/salary Application 60 100 800 100
SELECT * FROM emp WHERE salary ≥ 100
e.g., =, !=, IN, COUNT, GROUP BY, DISTINCT Scheme RND HOM DET SEARCH JOIN OPE Function none +, * equality join word search
Construction AES in CBC AES in CMC Paillier
Song et al.,‘00
Boldyreva et al.’09
first implementation
e.g., >, <, ORDER BY, SORT, MAX, MIN restricted ILIKE
Fullword matching
Highest Security
Equality matches bw 2 columns
e.g., sum
Adjust (ti,Cm i): Cm (with ) Encrypt (SK, m, col i): Cm i (with ) - deterministic
Equality checks between two columns Do not know columns to be joined a priori!
Correctness: adjustment yields correct join relations
col j col i Proxy Join key col i – col j
KeyGen (sec. param): SK Token (SK, col i, col j): (ti, tj)
Security: do not learn join relations without token Implementation: 192 bits long, 0.52 ms encrypt, 0.56 ms adjust
col j col i Proxy Join key col i – col j
Preserve the order of ciphertext to remain as they were in
For example, for any secret key 𝐿, if 𝑦 < 𝑧, then
if a column is encrypted with 𝑃𝑄𝐹, the server can perform range
queries when given encrypted constants 𝑃𝑄𝐹𝐿(𝑑1) and 𝑃𝑄𝐹𝐿(𝑑2) corresponding to the range [𝑑1, 𝑑2].
OPE is a weaker encryption scheme than DET because it
Scheme RND HOM DET SEARCH JOIN OPE Function none +, * equality join word search
Construction AES in CBC AES in CMC Paillier
Song et al.,‘00
Boldyreva et al.’09
Highest Security
+ our new scheme
Functionality
rank
ALL?
col1- RND col1- HOM col1- SEARCH col1- DET col1- JOIN col1- OPE ‘CEO’ ‘worker’
int value
HOM Onion Add
value
JOIN DET RND Onion Equality Onion Search
OR each value
value
OPE-JOIN OPE RND Onion Order
text value
SEARCH Idea: To stack encryption schemes into onion of encryption
emp: rank name salary ‘CEO’ ‘worker’
‘CEO’
JOIN DET RND Onion Equality col1- OnionEq col1- OnionOrder col1- OnionSearch col2- OnionEq table 1:
RND RND SEARCH RND SEARCH RND RND RND
‘CEO’
JOIN DET RND
DET Onion Equality RND RND
DET DET col1- OnionEq col1- OnionOrder col1- OnionSearch col2- OnionEq table 1
RND RND SEARCH RND SEARCH RND
common in practice
CryptDB Proxy
Unmodified DBMS CryptDB SQL UDFs (user-defined
functions)
Server
query results transformed query encrypted results
SQL Interface
Application
1.
2.
3.
Application Total columns Encrypted columns phpBB 563 23 HotCRP 204 22 grad-apply 706 103 TPC-C 92 92 sql.mit.edu 128,840 128,840 # cols not supported 1,094
Application Total columns Encrypted columns phpBB 563 23 HotCRP 204 22 grad-apply 706 103 TPC-C 92 92 sql.mit.edu 128,840 128,840 Min level is RND 21 18 95 65 80,053 Min level is DET 1 1 6 19 34,212 Min level is OPE 1 2 2 8 13,131
Most columns at RND Most columns at OPE analyzed were less sensitive
DB server throughput
CryptDB Proxy Encrypted database Application 1
Plain database Application 1
CryptDB Proxy Application 2 Application 2
Latency
Max. Throughput loss 26%
1.
2.
3.