Basics of Cryptographic Filesystems
mix_master_mike writes "Found a good article over at security focus: cryptographic filesystems: design and implementation. Nice piece on this level of security that isn't being used very effectively in the industry."
I know I'm going off on a tangent, but I think it's relevant... One of the big problems with PC security is swap space. Unencrypted data often finds its way onto the disk when memory space is swapped out. The simplest solution would be to just load the system up with a huge amount of RAM and disable swapping entirely, but that can get expensive.
Are there any crypto schemes designed specifically for use on swap files and volumes? They'd need to be blazingly fast so as not to slow the machine down, but would also have to be strong enough to protect anything that gets dumped to the drive. Maybe a big (2 meg plus) hash table generated randomly on boot, with a few extra operations to keep block comparisons from working?
Maybe its largely unused because servers etc which are the biggest use of "the industry" aswell as workstations are supposed to be physically secure anyways and when in use the crypto-filesystems would be running unencrypted.
Crypted filesystems have their uses but they arent as many as one would imagine. Laptops for instance should have it by default. That should be remedied. But as long as there arent crypto offloading chipsets by default it wont be widely used because of fear to loose speed. Also its not easy enough to use yet..
What if I yank out the powercord ? ;-)
How is the OS gonna cope with that, then I dissect your computer and connect your harddrive (including your swapspace) into my computer and find all the little pieces and nuggets of information that I need to fry your ass
The problem with encrypted filesystems is that, in order to decrypt them, you need some kind of large, ungainly key. Those keys are not justthe kind fo thing you memorize and type in when you boot up the system, so they have to be stored someshere. If they are stored on the disk, in an unencrypted partition, then you no longer are very secure... if they are stored on some kind of physical key, like a USB token, then you are safe if you turn the machine off and you head home, but unless you plan to paged to come into work and plug in your token every time the machine wants to swap Mozilla out of memory, you're probably going to be leaving it plugged in most of the time, and then you are back to leaving the key around for people to grab. And with all of this, you then have the issue of how to recover the system when your usb token burns out or the partition with your key gets corrupted.
The point of encrypting a drive is so that if the drive mechanism itself is stolen your safe. There is some saftey in having data encrypted on a life filesystem, but the saftey of the files is limited unless you encrypt each file/directory/partition with a different key. If they all use the same key, I'll just compromise the OS and read it if the filesystem is mounted. Otherwise, I just compromise the OS and wait around for you to access the encrypted filesystem, and steal it after you put the key in.
Encrypting the filesystem is also handy for drive disposal. If you always write to the encrypted drive, then you can just give the drive to anyone you want and they can't get any data off it. Which means that hospitals or other places with sensitive could feel a lot safer that medical data isn't being given away every time they auction old computers off, or everytime a laptop gets lost.
Swap has a lot of stuff on it. Lets say I know that your using ssh-agent, this stores the decrypted private keys in memory so it's never written on the disk (the private key is normally stored encrypted via a password on disk). So if I pull the plug on the computer, it was in RAM so it's gone now I have to know your password. However, if I can load up enough stuff into memory to force that to be written to swap, now if I pull the plug, I just steal the swap disk (or boot into single user mode and copy the swap partition). Granted this is predicated on me having physical access to the machine, but if swap isn't secured, I've got a legitimate attack on your machine to get me enough information that I can be you, and all I had was a regular user account (or access to an open console), and physical access.
Kirby
Motherboard chipsets need to include crypto accelerators. If that was done, all the filesystem encryption/decryption stuff can be done in hardware, and therefore it shouldn't really slow the system at all. If combined with some intelligent caching, it could probably be faster than the harddrive access we have now. Anyone know of a motherboard chipset that does crypto acceleration?