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 {
dev=/home/francois/.archives
dir=/home/francois/archives
fstype=ext4
fsoptions=defaults,noatime
keyfile=/home/francois/.archives.key
keyformat=builtin
keyhash=sha512
keycipher=aes-xts-plain64
cipher=aes-xts-plain64
}
Create the key and the 3GB loopback partition:
sudo cryptmount --generate-key 32 archives
sudo chown francois:francois .archives.key
dd if=/dev/zero of=.archives bs=1G count=3
mkdir archives
sudo cryptmount --prepare archives
sudo mkfs.ext4 -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 francois:francois .
cryptmount -u archives
Then you can mount and umount that partition using:
cryptmount archives
and:
cryptmount -u archives
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.
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..).
Regards
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.