DBA Training Session: Name: Designation: Date:: TDE N Sanjay Kumar SQL Dba 14 April 2023
DBA Training Session: Name: Designation: Date:: TDE N Sanjay Kumar SQL Dba 14 April 2023
Presentati
on Interrupt Me
4
Where can I do encryption?
SQL functions
SSL EncryptByKey, DecryptByKey
Bit Locker
TDE
Why encrypt database ?
• Protect sensitive data against un-authorized lower-level user (OS,
virtual machine or storage)
• Compliance with standards and policies (business or legal)
Standards
• PCI DSS – financial/payment (credit card)
• HIPAA – health/medical
• FERPA – education and family
• Sarbanes-Oxley Act (SOX) – US corporation, accounting and
communication
• PII – personal identifiable information
Where TDE act ?
Database Engine
Decrypt
TD
E
Encrypt
What is TDE ?
• One more layer to protect data
• Encrypt at page level on the fly. It means data, log and backup files
are encrypted
• Does not encrypt columns or connections
• Algorithm: AES 128, 192, 256 and Triple DES
Encryption Hierarchy
• Windows level: Data
Protection API (DPAPI)
• SQL Instance level: master key
and certificate
• Database level: database
master key and encryption key
Encryption Hierarchy 2
Windows / OS
SQL Instance
Database
Encryption Hierarchy 3
12
SSMS user
interface
Pros and Cons
PROS CONS
• Encrypt database files: backup, • Does not encrypt memory or
transaction log and data files file streams data
• Protect data against lower- • Does not encrypt connections
level access like OS users • Must be SQL 2008+ enterprise
• Low performance cost or developer edition
• It is transparent, no coding
Other considerations
• Always encrypt TempDB (pro or cons)
• Master key dependency (may use SQL EKM capability or EKM software)
• Works with high availability and disaster recovery options: failover clustering,
mirroring and log shipping
• Replication data is not encrypted when it travels between servers (plain text)
• TDE has an estimated performance impact around 3-5% and can be much
lower if most of the data accessed is stored in memory. The impact will mainly
be on the CPU, I/O will have a smaller impact.
• See the SQL documentation on this topic for more details.SATA + 4200 rpm + 1
GB = 1 min 20 sec.
• SCSI + 15000 rpm + SAN (redundancy disk/Raid 0) will be much faster.
References
• Understanding TDE
https://msdn.microsoft.com/en-us/library/bb934049(v=sql.120).aspx
• Extensible Key Management (EKM)
https://msdn.microsoft.com/en-us/library/bb895340(v=sql.120).aspx
• Protecting SQL Server Data – John Magnabosco
(free ebook from Red Gate)
http://www.amazon.com/Protecting-Server-Data-John-Magnabosco/dp/1
906434271
Questions?
17
Thank You!