Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

59
Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy

Transcript of Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Page 1: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Managing and querying encrypted data

Trần Mỹ Giao

Huỳnh Mai Thúy

Page 2: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Outline

Introduction1

DAS - Storing and querying encrypted data

Trust, Encryption Key- Management, Integrity & Data confidentiality

References

2

3

4

Page 3: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Introduction

Two new challenges emerge:oEfficient encryption algorithms for

relational dataoSupporting query on the encrypted

relational data.

Example: secure email server.

Page 4: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Outline

Introduction1

DAS - Storing and querying encrypted data

Trust, Encryption Key- Management, Integrity & Data confidentiality

References

2

3

4

Page 5: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

What is DAS ?

• It is a paradigm wherein data owned by a client is hosted on a third-party server

• There is significant interest in secure query evaluation over encrypted databases.

Page 6: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

DAS - Storing and querying encrypted data

• DAS set up and security model

• Querying encrypted relational data

• Relational encryption and storage model

• Keyword search on encrypted text data

• Search over encrypted XML data

Page 7: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

DAS setup and security

• Data-owner, clients, server• Data must be encrypted on the server and

only decrypted on the client-side.

Page 8: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Querying encrypted relational data

• EMP(eid, ename, salary, addr, did)• DEPARTMENT(did, dname, mgr)• The goal in DAS is to process the query

directly at the server without the need to decrypt the data.

Page 9: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Querying encrypted relational data

• Requires mechanism to support the following basic operator over encrypted data

• Comparison operators• Arithmetic operators

Page 10: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

2 categories

• Approaches based on new encyption techniques

• Information-hiding based Approaches

Page 11: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Approaches based on new encryption techniques

• Support either arthrimetic and/or comparison operators– PH supports basic arithmetic operations,and

doesn’t allow comparison.– Order-preserving encryption: support comparison,

join, selection, sorting, grouping, not support aggregation.

• The limitation: – Only safe under limited situations where the

adversary knowledge is limited.

Page 12: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Information-hiding based Approaches

• Store additional auxiliary information along with encrypted data

• Secure indices are designed carefully exploiting information hiding mechanism .

Page 13: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Information-hiding based Approaches

• 3 basic techniques:– Pertubation :Add a random value to the true

value (numeric attribute)– Generalization : Replace a numeric or categorical

value by a more general value– Swapping : swap the values of a specific attribute

of two records

Page 14: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Information-hiding based Approaches

• Support comparison , select – project - join , sorting ,grouping.

• Cannot support aggregation at the server.

Page 15: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Query processing architecture for DAS

Page 16: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Relational encryption and storage model

• R(A1, A2,.., An)

• Emp(etuple, eid, ename, salary, addr, did)

Page 17: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Relational encryption and storage model

• Partition functions:– Patition(emp.eid) = {[0,200], [200, 400],[400,600],

[600, 800], [800, 1000]}

• Identification functions:

E.g. : Ident(emp.eid)([0,200]) =2

Page 18: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Relational encryption and storage model

• Mapping functions– Map(emp.eid)(395) = 7

• Storing encrypted data

Page 19: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Relational encryption and storage model

• Decyption functions– D(Rs) = R

• Mapping condition– To translate query conditions to corresponding

conditions over the server-side, Map (cond) is called.

Page 20: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Translating Realtional Operator

• The Selection Operator:

• E.g. :C = eid < 395 & did = 140 (emp)

Page 21: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Query Execution

• Give an example:

Page 22: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Query Execution

• Give an example:

Page 23: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Query Execution

• Give an example:

Page 24: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Query Execution

• Give an example:

Page 25: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Keyword search on encrypted text data

• Answer is

Page 26: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Private key based search scheme on encrypted text data

• Secure index: reveals no imformation about its content to the adversary

• However, allows the adversary to tests the presence or absence of the keyword using a trapdoor

• A user search for documents containing word w, generates a trapdoor , which can be used by adversary to retieve documents.

Page 27: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Secure index’s creation

• Alice generates a sequence of pseudo-random values s1...sn, using a stream cipher.

• For each string si, Alice using pseudo-random function Fk(si) to generate a random m-bit sequence

• Then computes n-bit sequence ti= <si, Fk(si)>• Ciphertext ci = wi XOR ti• Secure index is a set of ci.

Page 28: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Secure index’s creation

• To prevent adversary from knowing what keyword is, pre- encrypt each word w using algorithm Ek

• Instead of using w below, we using xi = Ek(wi) to replace xi.

Page 29: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.
Page 30: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.
Page 31: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Search over encrypted XML data

• There has been little work in the area of encrypted XML data management.

• Two kinds of information the client may consider as sensitive: Individual node with its content Association between data values.

Page 32: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Search over encrypted XML data

• The notion of security constraints (SCs) that support both types of security requirements above.

• Such constraints can be specified in the form of Xpath expressions and may be classified as either node-type constraints or association-type constraints.

Page 33: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Search over encrypted XML data

• Hiding individual node with its content by encrypting their content

• Hiding Association between data values by encrypting any one of the nodes can enforce the SC

Page 34: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Search over encrypted XML data

• Query processing follows the typical DAS approach that we mentioned earlier

• Using two indexes( is call discontinuous structural interval index(DSI))– One is the structural index to enable tree

traversal– The second one is a value index for enabling

attribute value based queries like range queries.

Page 35: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Search over encrypted XML data

• Use an “order-preserving encryption” scheme to transform the values from their original domain to a new domain

Use B-trees to implement range-queries

• This scheme is unsafe under known plaintext attack

Page 36: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Outline

Introduction1

DAS - Storing and querying encrypted data

Trust, Encryption Key- Management, Integrity & Data confidentiality

References

2

3

4

Page 37: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Trust, Key- management, Integrity & Data confidentiality

• 3 basic models of trust that are widely studied in literature: Complete trust : the data management

issues are similar to those arising in standard DBMS systems

Partial trust : ensure the confidentiality of sensitive data

Un-trusted model :ensure authenticity of data and correctness of query results

Page 38: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Trust, Key- management, Integrity & Data confidentiality

• Encrypting relational data

• Authentication and integrity issues

• Key management in DAS

Page 39: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Encrypting relational data

• Three important issues to keep in mind1) Encryption algorithms

2) Encryption granularity

3) Efficient storage for encrypted data

Page 40: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

1) Encryption algorithms

• Symmetric key DES : the effective key length is 56 bits,

the block size is 64 bits AES : Each of these ciphers has a 128-bit

block size, with key sizes of 128, 192 and 256 bits

Blowfish : 64-bit block size and a variable key length from 32 up to 448 bits

Page 41: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

DESAES

Page 42: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Blowfish

Page 43: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

1) Encryption algorithms

Page 44: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

1) Encryption algorithms

• Public-key encryption: Avoids the problem of secure key distribution E.g. : RSA

Page 45: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.
Page 46: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

2) Encryption granularity

• Field level The smallest achievable granularity Each attribute value of a tuple is encrypted

separately

Page 47: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

2) Encryption granularity

• Record / row level Each row is encrypted separately Does not differentiate between sensitive and

non-sensitive data

Page 48: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

2) Encryption granularity

• Attribute / column level: Only sensitive attributes are encrypted

Page 49: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

2) Encryption granularity

• Page / block level : Whenever a page/block of sensitive data is

stored, the entire block is encrypted

Page 50: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

3) Efficient storage for encrypted data

• The performance issues associated with storage of encrypted data on the disk

• “ Partitioned Plaintext and Cipher text” (PPC) :– Cluster the non-sensitive and sensitive data

minimize the number of encryption operations

Page 51: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

3) Efficient storage for encrypted data

– Use NSM requires only modifications to the page layout.

Page 52: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Authentication and integrity issues

• Data integrity and authentication can be provided at difference levels of granularity:

the level of a table, a column, a row, an individual attribute value.

• Three flavor of database model: Unified client model

Page 53: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Multiple clients-single owner

Multiple clients-multiple owners

Page 54: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Authentication and integrity issues• One natural and intuitive solution for record-level

integrity is to use message authentication codes (MAC)

• MAC is a keyed hash of record ‘s content , tend to be small and of constant length

• The MAC-s are attractive for the unified client model

• In multi owner and multi querier models, potentially many queriers for each client. In these settings, MAC-s are not useful (repudiation)

Page 55: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Key management in DAS

• The data owner first decides the key-assignment granularity: Database level : generate a single key for

the whole database Table level : tables in database may be

grouped one key generate for each group Row level : records in table be grouped

each group is encrypted with a separate key

Page 56: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Key management in DAS

• In DAS key generation can be carried out at the client-side or at a third-party trusted server.

• The key generation process is classified into two classes: Pre computation :

Key is generated ahead of time After that, be stored in the key registry(key-Id , key

correspondence information , key mode, key material…) of the system

Re computation The key generating information is stored

Page 57: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

Outline

Introduction1

DAS - Storing and querying encrypted data

Trust, Encryption Key- Management, Integrity & Data confidentiality

References

2

3

4

Page 58: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

References

• Handbook of Database Security Applications and Trends 2007

• www.google.com.vn• www.en.wikipedia.org

Page 59: Managing and querying encrypted data Trần Mỹ Giao Huỳnh Mai Thúy.

THANK YOU FOR LISTENING