17.07.2015 Views

Download eBook (PDF) - Red Gate Software

Download eBook (PDF) - Red Gate Software

Download eBook (PDF) - Red Gate Software

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

5 – Cell-Level Encryption• ENCRYPTION BY, which defines the protection method of the key.The key used in the ENCRYPTION BY argument can be a certificate,another symmetric key, asymmetric key or a password. We will use ourMyHighCert certificate to achieve the seamless functionality that weare expecting.Since this key will be used to protect data with the sensitivity classification of"High", we will name it HighSymKey1. Since requirement 3 requires a keylength of 128 bits and the use of the AES algorithm, we use AES_128 for theWITH ALGORITHM argument, as shown in Listing 5-6.USE HomeLending;GO-- A 128 bit Symmetric key (strong)CREATE SYMMETRIC KEY HighSymKey1WITH ALGORITHM = AES_128ENCRYPTION BY CERTIFICATE MyHighCert;GOListing 5-6: Creating the HighSymKey1 symmetric key.Granting Permission to Use the Symmetric KeyOnce we have created our symmetric key we will need to define the databaseroles that have permissions to use it. This is accomplished through use of theGRANT method. In order to use this symmetric key, our database role willrequire VIEW DEFINITION permissions. Since the Sensitive_highdatabase role is the only one that we are allowing to encrypt and decrypt datathat has a sensitivity classification of "High", we will grant the VIEWDEFINITION permissions to that role.USE HomeLending;GO-- Used By Sensitive_highGRANT VIEW DEFINITION ON SYMMETRIC KEY::HighSymKey1TO Sensitive_high;GOListing 5-7: Granting the VIEW DEFINITION permission to theSensitive_high database role.112

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!