Even with a fully encrypted system (root and swap partitions), your data is still vulnerable while your computer is on. That's why Bruce Schneier recommends a two-tier encryption strategy.

The idea is that infrequently used files are moved to a separate partition, encrypted with a different key. That way, the bulk of your data files is protected even if your laptop is hijacked or if an intruder manages to steal some files while your main partition is decrypted.

On Debian and Ubuntu, a secure archive area can be created easily using an encrypted loopback partition and the cryptmount package.

Add this to /etc/cryptmount/cmtab:

archives {
    fstype=ext3 fsoptions=defaults cipher=aes

    keyhash=sha1 keycipher=des3

Create the key and the 512 MB loopback partition:

sudo cryptmount --generate-key 32 archives
dd if=/dev/zero of=.archives bs=1M count=512
mkdir archives
sudo cryptmount --prepare archives
sudo mkfs.ext3 -m 0 /dev/mapper/archives
sudo cryptmount --release archives

Fix the permissions so that you can write to this partition with your normal user account:

cryptmount archives
cd archives
sudo chown username:username
cryptmount -u archives

Then you can mount and umount that partition using:

cryptmount archives


cryptmount -u archives
A practial solution to the problem is encfs. It is fuse based and works on top of a existing filesystem. The files are not encrypted in a big block file, but in separated files, so you needn't reserve space prior using. The usage of encfs is very easier than that of cryptmount. The speed could be a little slower. No root access is needed.
Comment by Anonymous

Haha. (I am the loon that posted on your previous link)

It gets even better then that for Encfs.

I had this problem, you see. I kept my 'serious' data encrypted in encfs. However I realised that I left it mounted all the time because I got to lazy. So it's purpose is defeated.

I figured I might as well leave it plain text and just encrypt the entire drive. I did some performance testing and I did just that.

Now my drives on all my mobile devices are encrypted using LUKS. (and I wish Debian's installer supported LUKS...... it's just soooooooooooo much much better then old dmcrypt. Same security, much more easier to live with).

Then I realized something while reading this article.

Security (of this type) is nothing without conveniance.

It's the same thing as backups. Both are protecting your data, so I am not surpised the problems are so similar.

If backups are difficult or annoying to do, then you won't do them. You may start off, but unless it's completely automated then you'll forget about it and data will get out of hand and so on and so forth.

Same f-ing thing with encryption.

So towards that end I want to let you know about CRYPTKEEPER. Fantastic stuff.

It's a Gnome applet for Encfs. Found it while going apt-cache search encfs.

Debian ROCKS
Free Software ROCKS.

Encryption with Batteries Included. Got to love this OS.

The one thing about fuse that sucks, but isn't a big deal in a single-user computer is that you have to allow access to /dev/fuse and a couple setuid root binaries. This is a "bad thing". Not the end of the world, but it is what it is.

Maybe it can get fixed with PolicyKit and all that. Right now, though, its the best thing going forward.

Comment by Anonymous

Hello Anonymous cryptkeeper enthusiast, your post is very exciting but it stops right before telling us why and how cryptkeeper is so useful and what it does. And it doesn't even link. (Even though I'm not dumber than that I can apt-cache search too..).


Comment by ulrik

EncFS is nice for storing encrypted files, but this solution works much better if you want to run applications from your encrypted file system. For example, mutt mail can't be stored in the EncFS mount.

EncFS seems to be maturing quickly; for now I think cryptmount is a more mature and dependable solution.

Comment by Anonymous