Database Encryption in SQL Server 2008 Enterprise Edition
Database Encryption in SQL Server 2008 Enterprise Edition
Enterprise Edition
SQL Server Technical Article
Copyright
This is a preliminary document and may be changed substantially prior to final commercial release of the
software described herein.
The information contained in this document represents the current view of Microsoft Corporation on the
issues discussed as of the date of publication. Because Microsoft must respond to changing market
conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot
guarantee the accuracy of any information presented after the date of publication.
This White Paper is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS,
IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS DOCUMENT.
Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights
under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system,
or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise),
or for any purpose, without the express written permission of Microsoft Corporation.
Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights
covering subject matter in this document. Except as expressly provided in any written license agreement
from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks,
copyrights, or other intellectual property.
Unless otherwise noted, the example companies, organizations, products, domain names, e-mail addresses,
logos, people, places and events depicted herein are fictitious, and no association with any real company,
organization, product, domain name, email address, logo, person, place or event is intended or should be
inferred.
Microsoft, BitLocker, SQL Server, Windows, Windows Server, and Windows Vista are either registered
trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.
The names of actual companies and products mentioned herein may be the trademarks of their respective
owners.
Table of Contents
Database Encryption in SQL Server 2008 Enterprise Edition 3
Figure: SQL Server encryption key hierarchy with TDE and EKM
3. Create a backup of the certificate with the private key and store it in a
secure location. (Note that the private key is stored in a separate file
be sure to keep both files). Be sure to maintain backups of the
certificate as data loss may occur otherwise.
BACKUP CERTIFICATE tdeCert TO FILE = path_to_file
WITH PRIVATE KEY (
FILE = path_to_private_key_file,
ENCRYPTION BY PASSWORD = cert password);
What Is Encrypted
TDE operates at the I/O level through the buffer pool. Thus, any data
that is written into the database file (*.mdf) is encrypted. Snapshots and
backups are also designed to take advantage of the encryption provided
by TDE so these are encrypted on disk as well. Data that is in use,
however, is not encrypted because TDE does not provide protection at
Database Backups
When TDE is enabled on a database, all backups are encrypted. Thus,
special care must be taken to ensure that the certificate that was used to
protect the DEK (see How to Enable TDE) is backed up and maintained
with the database backup. If this certificate (or certificates) is lost, the
data will be unreadable. Back up the certificate along with the database.
Each certificate backup should have two files; both of these files should
be archived (ideally separately from the database backup file for
security). Alternatively, consider using the extensible key management
(EKM) feature (see Extensible Key Management) for storage and
maintenance of keys used for TDE.
Cell-Level Encryption
SQL Server offers encryption at the cell level. Cell-level encryption was
introduced in Microsoft SQL Server 2005 and is still fully supported. Cell-
level encryption is implemented as a series of built-ins and a key
management hierarchy. Using this encryption is a manual process that
requires a re-architecture of the application to call the encryption and
decryption functions. In addition, the schema must be modified to store
the data as varbinary and then re-cast back to the appropriate data
type when read. The traditional limitations of encryption are inherent in
this method as none of the automatic query optimization techniques can
be used.
Conclusion
Those who are looking for database-level encryption have many options
in SQL Server and Windows. These options are not mutually exclusive.
The different levels of encryption available in SQL Server and Windows
can be leveraged to provide defense in depth and greater overall
security. Transparent data encryption provides a good blend of ease of
administration, ease of use, performance, and security. TDE also
Microsoft Corporation 2008
Database Encryption in SQL Server 2008 Enterprise Edition 15
Did this paper help you? Please give us your feedback. Tell us on a scale
of 1 (poor) to 5 (excellent), how would you rate this paper and why have
you given it this rating? For example:
Are you rating it high due to having good examples, excellent
screenshots, clear writing, or another reason?
Are you rating it low due to poor examples, fuzzy screenshots,
unclear writing?
This feedback will help us improve the quality of white papers we
release. Send feedback.