Column Level
Encryption
Presented by
Behnam Mohammadi
behnamm92@gmail.com
Database Security Course by
Dr. Meghdad Mirabi
Fall 2016
Microsoft SQL Server
Islamic Azad University
South Tehran Branch
Table of content
• Problem
• Encryption
• Database security tools
• Encryption Hierarchy
• Encryption Mechanisms
• Transact-SQL functions
• Asymmetric keys
228
Table of content
• Symmetric keys
• Certificates
• Transparent Data Encryption (TDE)
• Column Level Encryption
• Advantages and Disadvantages
• References
328
Problem
• For example financial firms have sensitive data
• Credit card numbers
• Financial history
• etc.
• Needs to be protected from unauthorized access
428
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 encryption
528
Database Security Tools
• Data stored in tables
• Views
• Column level permissions
• Database encryption
• Database
• Column
628
Encryption Hierarchy
728
Encryption Mechanisms
• Transact-SQL functions
• Asymmetric keys
• Symmetric keys
• Certificates
• Transparent Data Encryption (TDE)
828
Transact-SQL functions
• SQL Server built-in encryption function
• SQL Server built-in decryption function
928
Transact-SQL functions
• The encryption function password is plain text
• It can be stolen by a sniffer in case
• SQL Server profiler
1028
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
Certificates
• Certificate contents
• Subject public key
• Subject identifier information [name, e-mail and etc.]
• Validity period
• Issuer identifier information and digital signature
1228
Symmetric Keys
• Used for both encryption and decryption
• Encryption and decryption by using a symmetric key is fast
1328
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
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
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
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
Column Level Encryption
1. Create SQL Server Database Master Key (DMK)
1828
Column Level Encryption
2. Create a Self Signed SQL Server Certificate
1928
Column Level Encryption
3. Create SQL Server Symmetric Key
2028
Column Level Encryption
4. Using Encryption Encrypt
2128
Column Level Encryption
4. Using Encryption Decrypt
2228
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
Column Level Encryption
• Grant Permissions to the Encrypted Data
2428
Advantages and Disadvantages
• High level security
• Requires no maintenance password for end-user
• Impact on performance
• Database migration is difficult
2528
References
• www.msdn.microsoft.com
• www.searchsecurity.techtarget.com [Margaret Rouse]
• www.mssqltips.com [Nitansh Agarwal]
2628
xx
END
SIMPLICITY IS POWER
Thanks 2727

Column Level Encryption in Microsoft SQL Server

Editor's Notes

  • #5 داده های حساس باید از دسترس کاربران احراز هویت نشده یا کاربران احراز هویت شده ای که دسترسی ندارد مخفی نگه داشته شود
  • #6 رمزگذاری بهترین ابزار برای محافظت از داده هاست با استفاده از رمز گذاری داده ها برای فقط کاربران مجاز قابل مشاهده و فهم می شود در دیتابیس در دو سطح کلی می توانیم رمز گذاری انجام دهیم: کل پایگاه داده یا ستون
  • #8 SMK: Service Master Key DMK: Database Master Key EKM: External Key Module DPAPI: Windows Data Protection API For best performance, encrypt data using symmetric keys instead of certificates or asymmetric keys. Database master keys are protected by the Service Master Key. The Service Master Key is created by SQL Server setup and is encrypted with the Windows Data Protection API (DPAPI). Other encryption hierarchies stacking additional layers are possible. An Extensible Key Management (EKM) module holds symmetric or asymmetric keys outside of SQL Server. Transparent Data Encryption (TDE) must use a symmetric key called the database encryption key which is protected by either a certificate protected by the database master key of the master database, or by an asymmetric key stored in an EKM. The Service Master Key and all Database Master Keys are symmetric keys.
  • #12 ارائه دهنده های CA Symantec Comodo Godaddy سرتیفیکیت یک عبارت است که توسط سی آی ها یا خود شخص امضا شده است مزیت آن این است که کلید به صورت یک سرتیفیکیت که یک فایل است در اختیار شخص کاربر قرار می گیرد و کاربر نیزا ندارد برای هر سرور یک سرتیقیکت ویژه داشته باشد
  • #26 High Level Password Security