column level encryption in microsoft sql server

27
Column Level Encryption Presented by Behnam Mohammadi [email protected] Database Security Course by Dr. Meghdad Mirabi Fall 2016 Microsoft SQL Server Islamic Azad University South Tehran Branch

Upload: behnam-mohammadi

Post on 11-Apr-2017

274 views

Category:

Software


13 download

TRANSCRIPT

Page 1: Column Level Encryption in Microsoft SQL Server

Column Level Encryption

Presented byBehnam Mohammadi

[email protected]

Database Security Course byDr. Meghdad Mirabi

Fall 2016

Microsoft SQL ServerIslamic Azad University South Tehran Branch

Page 2: Column Level Encryption in Microsoft SQL Server

Table of content

• Problem

• Encryption

• Database security tools

• Encryption Hierarchy

• Encryption Mechanisms

• Transact-SQL functions

• Asymmetric keys2 28

Page 3: Column Level Encryption in Microsoft SQL Server

Table of content

• Symmetric keys

• Certificates

• Transparent Data Encryption (TDE)

• Column Level Encryption

• Advantages and Disadvantages

• References

3 28

Page 4: Column Level Encryption in Microsoft SQL Server

Problem

• For example financial firms have sensitive data

• Credit card numbers

• Financial history

• etc.

• Needs to be protected from unauthorized access

4 28

Page 5: Column Level Encryption in Microsoft SQL Server

Encryption • Most effective way to achieve data security

• Cannot be easily understood by anyone except authorized

parties

• Main types of encryption in databases

• Database level encryption

• Column level encryption5 28

Page 6: Column Level Encryption in Microsoft SQL Server

Database Security Tools

• Data stored in tables

• Views

• Column level permissions

• Database encryption

• Database

• Column

6 28

Page 7: Column Level Encryption in Microsoft SQL Server

Encryption Hierarchy

7 28

Page 8: Column Level Encryption in Microsoft SQL Server

Encryption Mechanisms

• Transact-SQL functions

• Asymmetric keys

• Symmetric keys

• Certificates

• Transparent Data Encryption (TDE)

8 28

Page 9: Column Level Encryption in Microsoft SQL Server

Transact-SQL functions

• SQL Server built-in encryption function

• SQL Server built-in decryption function

9 28

Page 10: Column Level Encryption in Microsoft SQL Server

Transact-SQL functions

• The encryption function password is plain text

• It can be stolen by a sniffer in case

• SQL Server profiler

1028

Page 11: Column Level Encryption in Microsoft SQL Server

Certificates

• A public key certificate, usually just called a certificate

• Digitally-signed statement

• Certificates are issued and signed by a certification authority

• Subject is entity that receives a certificate form CA

• Relieve need to maintain a set of passwords for individual

subjects for hosts 1128

Page 12: Column Level Encryption in Microsoft SQL Server

Certificates

• Certificate contents

• Subject public key

• Subject identifier information [name, e-mail and etc.]

• Validity period

• Issuer identifier information and digital signature

1228

Page 13: Column Level Encryption in Microsoft SQL Server

Symmetric Keys

• Used for both encryption and decryption

• Encryption and decryption by using a symmetric key is fast

1328

Page 14: Column Level Encryption in Microsoft SQL Server

Asymmetric Keys

• Made up of a private key and the corresponding public key

• Each key can decrypt data encrypted by the other

• Higher level of security than symmetric encryption

1428

Page 15: Column Level Encryption in Microsoft SQL Server

Transparent Data Encryption (TDE)

• Transparent to end-user

• Protect data and log files

• Performed at page level

• Real time I/O Encryption and Decryption

• Impact on performance between 3% to 5%

1528

Page 16: Column Level Encryption in Microsoft SQL Server

Transparent Data Encryption (TDE)

• Use a symmetric key called the database encryption key

• Protected by certificate that

it also protected by the DMK

• Protected by an asymmetric

key stored in an EKM

1628

Page 17: Column Level Encryption in Microsoft SQL Server

Column Level Encryption

1. Create SQL Server Database Master Key (DMK)

2. Create a Self Signed SQL Server Certificate

3. Create SQL Server Symmetric Key

4. Using Encryption

1728

Page 18: Column Level Encryption in Microsoft SQL Server

Column Level Encryption

1. Create SQL Server Database Master Key (DMK)

1828

Page 19: Column Level Encryption in Microsoft SQL Server

Column Level Encryption

2. Create a Self Signed SQL Server Certificate

1928

Page 20: Column Level Encryption in Microsoft SQL Server

Column Level Encryption

3. Create SQL Server Symmetric Key

2028

Page 21: Column Level Encryption in Microsoft SQL Server

Column Level Encryption

4. Using Encryption Encrypt

2128

Page 22: Column Level Encryption in Microsoft SQL Server

Column Level Encryption 4. Using Encryption Decrypt

2228

Page 23: Column Level Encryption in Microsoft SQL Server

Column Level Encryption

• A user need to have permission to symmetric key and

certificate to decrypt data

• Decrypt with wrong key or certificate gives NULL for encrypted

values

2328

Page 24: Column Level Encryption in Microsoft SQL Server

Column Level Encryption

• Grant Permissions to the Encrypted Data

2428

Page 25: Column Level Encryption in Microsoft SQL Server

Advantages and Disadvantages

• High level security

• Requires no maintenance password for end-user

• Impact on performance

• Database migration is difficult

2528

Page 26: Column Level Encryption in Microsoft SQL Server

References

• www.msdn.microsoft.com

• www.searchsecurity.techtarget.com [Margaret Rouse]

• www.mssqltips.com [Nitansh Agarwal]

2628

Page 27: Column Level Encryption in Microsoft SQL Server

xx

END

SIMPLICITY IS POWER

Thanks 2727