using in-memory encrypted databases on the cloud

31
Using In-Memory Encrypted Databases on the Cloud Francesco (and Davide) Pagano [email protected] Department of Information Technology Università degli Studi di Milano - Italy

Upload: francesco-pagano

Post on 11-Jun-2015

549 views

Category:

Education


1 download

DESCRIPTION

Storing data in the cloud poses a number of privacy issues. A way to handle them is supporting data replication and distribution on the cloud via a local, centrally synchronized storage. In this paper we propose to use an in-memory RDBMS with row-level data encryption for granting and revoking access rights to distributed data. This type of solution is rarely adopted in conventional RDBMSs because it requires several complex steps. In this paper we focus on implementation and benchmarking of a test system, which shows that our simple yet effective solution overcomes most of the problems.

TRANSCRIPT

Page 1: Using In-Memory Encrypted Databases on the Cloud

Using In-Memory Encrypted Databases on the CloudFrancesco (and Davide) Pagano

[email protected]

Department of Information Technology

Università degli Studi di Milano - Italy

Page 2: Using In-Memory Encrypted Databases on the Cloud

IWSSC 2011Milan, 09/07/2011 22

Agenda

Privacy issue on the cloud

An agent based approach

Database encryption

In Memory Databases and HyperSql

Our solution

Benchmarking

Conclusion

Question time

Page 3: Using In-Memory Encrypted Databases on the Cloud

IWSSC 2011Milan, 09/07/2011 33

Access control problem

Cloud Platform

Desktop Desktop

controlled accesses for external users

uncensored access for

cloud provider

Page 4: Using In-Memory Encrypted Databases on the Cloud

IWSSC 2011Milan, 09/07/2011 44

Privacy within the cloud:on the same side of the wall

PresentationLayer

privacy

DataLayer performance

Page 5: Using In-Memory Encrypted Databases on the Cloud

IWSSC 2011Milan, 09/07/2011 55

An agent-based approach Untrusted

Synchronizer never holds

plaintext dataLocal agent

with local db

Page 6: Using In-Memory Encrypted Databases on the Cloud

IWSSC 2011Milan, 09/07/2011 66

The model

Page 7: Using In-Memory Encrypted Databases on the Cloud

IWSSC 2011Milan, 09/07/2011 77

Proposed solution

Page 8: Using In-Memory Encrypted Databases on the Cloud

IWSSC 2011Milan, 09/07/2011 8

Database encryption

* L. Bouganim and Y. Guo, “Database encryption,” in Encyclopedia of Cryptography and Security, Springer, 2010, 2nd Edition

Page 9: Using In-Memory Encrypted Databases on the Cloud

IWSSC 2011Milan, 09/07/2011 9

Granularity in database-level encryption

• database

• tables

• columns

• rows

Page 10: Using In-Memory Encrypted Databases on the Cloud

IWSSC 2011Milan, 09/07/2011 10

In Memory Databases

“An in-memory database (IMDB also known as main memory database system or MMDB and as real-time database or RTDB) is a database management system that primarily relies on main memory for computer data storage.” * Wikipedia

Page 11: Using In-Memory Encrypted Databases on the Cloud

IWSSC 2011Milan, 09/07/2011 11

HyperSql

Page 12: Using In-Memory Encrypted Databases on the Cloud

IWSSC 2011Milan, 09/07/2011 12

Loader

Page 13: Using In-Memory Encrypted Databases on the Cloud

IWSSC 2011Milan, 09/07/2011 13

Insert

Page 14: Using In-Memory Encrypted Databases on the Cloud

IWSSC 2011Milan, 09/07/2011 14

Serializer

Page 15: Using In-Memory Encrypted Databases on the Cloud

IWSSC 2011Milan, 09/07/2011 15

.script file of a sample database CREATE SCHEMA PUBLIC AUTHORIZATION DBA

CREATE MEMORY TABLE DOSSIER(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL PRIMARY KEY,NAME CHAR(80))

CREATE MEMORY TABLE STUDENTS(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL PRIMARY KEY,NAME CHAR(80))

ALTER TABLE DOSSIER ALTER COLUMN ID RESTART WITH 0

ALTER TABLE STUDENTS ALTER COLUMN ID RESTART WITH 32

CREATE USER SA PASSWORD ""

GRANT DBA TO SA

SET WRITE_DELAY 10

SET SCHEMA PUBLIC

INSERT INTO STUDENTS VALUES(12,'Alice')

INSERT INTO STUDENTS VALUES(31,'Bob')

Page 16: Using In-Memory Encrypted Databases on the Cloud

IWSSC 2011Milan, 09/07/2011 16

Implemented solution: client side

On the client side, using IMDBs, we have only two interactions between each local agent and the Synchronizer

Page 17: Using In-Memory Encrypted Databases on the Cloud

IWSSC 2011Milan, 09/07/2011 17

The modified .script file

INSERT INTO students(id,name) VALUES(12,'Alice');

INSERT INTO students(id,name) VALUES(31,'Bob');

$27@5F3C25EE5738DAAAED5DA06A80F305A93C95A

$45@5DA67ADA06AAED580FA914BF3C953057D387F

INSERT INTO students(id,name) VALUES(23,'Carol');

Encrypted rows

id_pending_row

Page 18: Using In-Memory Encrypted Databases on the Cloud

IWSSC 2011Milan, 09/07/2011 18

The modified loader

Page 19: Using In-Memory Encrypted Databases on the Cloud

IWSSC 2011Milan, 09/07/2011 19

The modified serializer

Page 20: Using In-Memory Encrypted Databases on the Cloud

IWSSC 2011Milan, 09/07/2011 20

The synchronizer

Page 21: Using In-Memory Encrypted Databases on the Cloud

IWSSC 2011Milan, 09/07/2011 21

Performances

In contrast to the usual row-level encryption, which needs encryption/decryption at every data access, our solution uses these heavy operations only when communicating with Synchronizer, with a clear advantage, especially in the case of rarely modified databases.

Page 22: Using In-Memory Encrypted Databases on the Cloud

IWSSC 2011Milan, 09/07/2011 22

Performances: read operations

The system uses decryption only at start time, when records are loaded from the disk into the main memory. Each row is decrypted none (if it is owned by local node) or just once (if it is owned by a remote node), so this is optimal for read operations. Each decryption implies an access to the remote Synchronizer to download the related decrypting key and, eventually, the modified row.

Page 23: Using In-Memory Encrypted Databases on the Cloud

IWSSC 2011Milan, 09/07/2011 23

Performances: write operations

Write operations occur when a record is inserted / updated into the db, with no overload until the client, when online, explicitly synchronizes data with the central server. At this moment, for each modified record, the client needs to:

• generate a new (symmetric) key

• encrypt the record

• dispatch the encrypted data and the decrypting key to the remote synchronizer

Page 24: Using In-Memory Encrypted Databases on the Cloud

IWSSC 2011Milan, 09/07/2011 24

Benchmark (1)

•Creation of database and sample tables

•Population of tables with sample values

•Sharing of a portion of data with another user

•Receipt of shared dossiers from other users

•Opening of the newly created (and populated) database

Page 25: Using In-Memory Encrypted Databases on the Cloud

IWSSC 2011Milan, 09/07/2011 25

Benchmark (2)

To minimize communication delay, the central Synchronizer and the clients ran on the same computer. For testing purpose, it was sufficient to use only two clients (to enable data sharing). The application was compared with an equivalent one having the following differences:

• It uses the unmodified HyperSQL driver

• It doesn’t share data with other clients

• When populating the database, it creates the same number of dossiers than the previous application; after benchmarking, however, it adds the number of shared dossiers, resulting in the same final number of dossiers.

Page 26: Using In-Memory Encrypted Databases on the Cloud

IWSSC 2011Milan, 09/07/2011 26

Benchmark (3)

We benchmarked the system using single-table dossiers of about 200 bytes, in two batteries of tests; the first with 20%, and the second with 40% of shared dossiers, which numbered from 1,000 to 500,000.

Page 27: Using In-Memory Encrypted Databases on the Cloud

IWSSC 2011Milan, 09/07/2011 27

Results (1)

Overhead when 20% of dossiers are shared

0 100,000 200,000 300,000 400,000 500,0000,00%

20,00%

40,00%

60,00%

80,00%

100,00%

120,00%

Benchmark (20% shared)

diff create + receive (perc)diff load

Num. Dossiers

Ove

rhe

ad

Page 28: Using In-Memory Encrypted Databases on the Cloud

IWSSC 2011Milan, 09/07/2011 28

Results (2)

Overhead when 40% of dossiers are shared

0 100,000 200,000 300,000 400,000 500,0000,00%

20,00%

40,00%

60,00%

80,00%

100,00%

120,00%

Benchmark (40% shared)

diff create + receive (perc)diff load

Num. Dossiers

Ove

rhe

ad

Page 29: Using In-Memory Encrypted Databases on the Cloud

IWSSC 2011Milan, 09/07/2011 29

Results (3)

Total delay

Page 30: Using In-Memory Encrypted Databases on the Cloud

IWSSC 2011Milan, 09/07/2011 30

Conclusion

In this paper, using IMDBs, we presented a simple solution to row-level encryption of databases. It can be used in the cloud to manage very granular access rights in a highly distributed database. This allows for stronger confidence in the privacy of shared sensitive data. An interesting field of application is the use in (business) cooperative environments, e.g. professional networks. In these environments, privacy is a priority, but low computing resources don't allow the use of slow and complex algorithms. IMDBs and our smart encryption, instead, achieve the goal in a more effective way.

Page 31: Using In-Memory Encrypted Databases on the Cloud

IWSSC 2011Milan, 09/07/2011 3131

Questions