Notes on how to create encrypted directories. While / and swap on my laptop is encrypted, my stationary computers are not. So when working with sensitive data on them, I need encrypted directories. Rather than using real partitions, image-files will do just fine (speed is no issue for the few data-sets I want to keep secret).
aptitude install cryptsetup cryptmount modprobe dm-crypt
cryptmount-setup offers a convenient guide for setting up encrypted image-files that users can mount.
As root, issue
cryptmount-setup
As user, mount with
cryptmount -m <name-of-target>
umount with
cryptmount -u <name-of-target>