Tag: encryption

  • The Encryption Primer Resources

    I delivered my Encryption Primer talk this past Tuesday at the Boulder SQL Server Users Group and last night at the Denver SQL Server Users Group. Great questions and discussions, and I hope those of you that attended found it interesting.

    I’ve updated my deck and code samples, and here are the updated files for download:

    Powerpoint: The Encryption Primer v8.ppt

    Code: EncryptionPrimer.zip

  • Better Secure Hashing – SHA3

    I’ve been giving an encryption talk over the last year, focusing on educating DBAs on the various features and capabilities available in SQL Server. One of the things I note in the talk is that SHA1 is not considered secure. You should avoid SHA or SHA1 if you are using SQL Server 2012. If you’re on an earlier version, you don’t have a choice.

    Hopefully we’ll have more choices in the future. NIST has selected an SHA-3 algorithm as a new standard. This should provide more security, though there will be some time before we find out if there are any problems or potential attacks against this algorithm.

  • Create an Asymmetric Key

    SQL Server has asymmetric keys available for encryption. I wouldn’t recommend them for direct encryption of data since they are slow, i.e. they require lots of resources, but they are good for encrypting the (faster) symmetric keys.

    How can you create one? It’s actually easy, using the standard CREATE ASYMMETRIC KEY DDL.

    create asymmetric key HRProtection
     with algorithm = RSA_1024
     ENCRYPTION BY PASSWORD = 'Use4SomeStr0ngP@ssword%^'
    ;
    GO
    

    This create a key with the name and using the RSA algorithm at 1024 bits and protects the key with a password. You could chose other key lengths (512, 1024, 2048), but 1024 is the minimum I would use. It has been shown that 512 bit keys can be cracked relatively cheaply and easily on AWS for less than US$100.

    These keys can be created from key files (a key pair set of files if you used something like SN from the Windows SDK. This would require a path to the files and permissions to read them. Just like protecting the password with this file, you should have limited permissions set on any key pair files that exist on your OS. The ideal way to create these keys is with a hardware EKM device, but those are expensive, rarely used, and not foolproof.

    This requires the CREATE ASYMMETRIC KEY permission, or equivalent. Most of the DDL type permissions include this permission.

    There are no GRANT/DENY/REVOKE permission statements with keys. Make sure you use a strong password and protect it. Do not disclose this unnecessarily.

    That’s the basic of the key creation. I’ll look at some other options with these keys in another post.

  • Speaking at the Denver SQL Server User Group – November

    I’m scheduled to give “The Encryption Primer” at the Denver SQL Server Users Group on the November 15 meeting. It’s a basic look at the encryption features in SQL Server, updated for SQL Server 2012. The meeting is in the Denver Tech Center and we usually have a drink after.

    The local user group is a great way to meet people in the business, network, and learn a few things. It’s worth a night out of your life every month or two, so come on by.