Yeah. Right. Good luck with that.Having covered database encryption for about eight years as an analyst, I've learned that it is one of the single most confusing areas of database management and security. While marketing materials try their best to make it seem as if encryption is never more than a checkbox away, and in some cases that might be true, determining which kind of database encryption is best for any particular application is rarely so easy.
A couple of years ago I started writing a guide to picking the right encryption option. Then when I started working with Adrian Lane (who blogs on database security here for Dark Reading), we decided to collaborate and push the paper out the door.
There's a reason it took us another 18 months to actually finish the darn thing.
There is an incredible array of options available for database encryption -- everything from encrypting the media the database resides on, to encrypting the files, to encrypting at the application level, and just using the database for storage. With these come a corresponding matrix of potential problems: Some types of encryption limit the kinds of searches you can run. Others don't affect performance, but don't really improve security at all. And since the databases you want to encrypt are often your most critical and frequently part of complex, distributed systems, the encryption has to operate with the same degree of reliability in the midst of the heterogeneity.
Our first attempts at a framework focused on the technical issues of where the encryption engine, key management, and authorization resided. That didn't last long as we realized it didn't mesh with the decision-making process. Eventually we realized that picking the right encryption option is based first on the threat model, and then on the technology issues.
There are two major threat vectors to a database. Either you are protecting against someone with credentialed access to the system (including an attacker who cracks in through a user account), or you are protecting against a noncredentialed user (like a sysadmin peeking at the raw database files). For a credentialed user, you are then protecting against someone with administrative-level or standard access.
If the threat vector you are worried about is outside the database, then life is a lot easier. Your best option is usually to encrypt the database files (keeping the keys someplace else) or to use the transparent encryption option built into your database management system. Not to oversimplify, but this is generally a straightforward process.
For credentialed database users, if it's just a standard user your first bet is transparent/external encryption combined with properly configured access controls. Access controls work pretty darn well, and encryption isn't a substitute. Even if you encrypt more granularly, a lot of people tie the encryption to the user account and thus lose some of the security advantages.
If you want to protect against administrative database users (including, sometimes, to limit privilege escalation issues), then you need to look at more granular options, like application encryption, user-based column encryption, or even tokenization (which is rapidly growing in popularity, especially for PCI). These aren't bad to build into a new system, but can be very difficult to add to legacy application/database combinations.
I realize most of this seems incredibly obvious, but in the countless conversations I've had about database encryption, people usually get so hung up on the technology first that they fail to properly evaluate or pick the best option.
I've barely skimmed the surface here; if you want more details you can download our paper "Understanding and Selecting a Database Encryption or Tokenization Solution" for free, without any kind of registration, at Securosis.com. It includes a full version of the decision tree I just described, as well in-depth coverage of each of the encryption options.
Rich Mogull is founder of Securosis LLC and a former security industry analyst for Gartner Inc. Special to Dark Reading.