- Encrypted Home Directories in Ubuntu Jaunty
- How eCryptfs Works
- Mounting Encrypted Home Using a LiveCD.
If my encrypted data is accessible from a LiveCD, what protection do I have?
The answer is "two things":
- your login passphrase
- your mount passphrase (which is encrypted in your ~/.ecryptfs/wrapped-passphrase file)
Inevitably, however, your login passphrase will be weaker than your mount passphrase, which is a randomly generated 128-bit string.
What can I do about this?
Two-factor authentication!
- Something you have (the wrapped-passphrase file)
- Something you know (your system login passphrase)
I was able to do this in a couple of simple steps.
- I added a line to my /etc/fstab to ensure that my PCMCIA CompactFlash card reader gets mounted on system boot to the same mountpoint everytime. Very important! Something like:
/dev/sdb1 /media/pcmcia ext3 defaults 0 0 - I moved my ~/.ecryptfs/wrapped-passphrase file to /media/pcmcia. For fun, you might consider changing the name of the file to something more obfuscating, like ".trash" or something random like ".ee47d044~".
- Create a symlink to that file, into its proper location:
ln -s /media/pcmcia/.ee47d044~ $HOME/.ecryptfs/wrapped-passphrase
Big thanks to Matt Trudel who first suggested this idea to me!
Isn't there another authentication type?
Okay, so there's another form of authentication that's potentially even stronger than the first two I mentioned... Something you are.
We're talking about biometrics here.
Now unfortunately, strong biometric input devices are not currently available for the masses on most portable computers. At this point, eCryptfs does not yet support biometric tokens. However, the design of eCryptfs supports arbitrary PKCS-11 tokens, so it would not take too much effort at all to extend the encrypted-home and encrypted-private conveniences to use biometric calculators as well.
What about fingerprint readers?
I'm sorry, but fingerprint readers are security theatre. The prevailing opinion from security professionals is that fingerprints are perhaps a good replacement for usernames. However, they're really not a good replacement for passwords.
Consider your laptop... How many fingerprints of yours are there on your laptop right now? As such, it's about as secret as your username. You don't leave your password on your spacebar, or on your beer bottle :-)
See the Criticisms section of this wikipedia entry (although it's about Microsoft Fingerprint Readers), it still applies:
:-Dustin
Thanks again, Dustin. Do USB sticks/compact flash have UUIDs as disks as well? Maybe using a UUID for the disk instead of /dev/sdb1 (or what have you) might be better, in case I have multiple storage devices connected to the machine on boot.
ReplyDeleteHi Dustin,
ReplyDeleteWould it be safe to mount like this:
UUID=2cc62c00-bc34-467b-ab6a-7d2e6801be85 /home/username/.ecryptfs ext2 defaults 0 0
This allows you to use other USB sticks also, without them getting mounted there.
This is how I keep my GPG keys (in .gnupg, of course, instead of .ecryptfs)
I like the idea and details.
ReplyDeleteNow your thumb drive becomes critical.
When you upgrade it or lose it...
you did back it up on another thumb
drive right?
What are the steps, and pitfalls,
to keeping access to your encrypted
home?
Or is it better to keep a backup of
home and recreate a new encrypted home?
I like the idea and details.
ReplyDeleteNow your thumb drive becomes critical.
When you upgrade it or lose it...
you did back it up on another thumb
drive right?
What are the steps, and pitfalls,
to keeping access to your encrypted
home?
Or is it better to keep a backup of
home and recreate a new encrypted home?
I moved my wrapper file to a thumb drive and sym-linked to it form .ecryptfs dir. If I login to my session without my thumb drive but later insert it and manually mount my Private dir it works but complains. Here is what it says.
ReplyDeleteEnter your login passphrase:
Unable to read salt value from user's .ecryptfsrc file; using default
Inserted auth tok with sig [xxxxxxxxxxxxx] into the user session keyring
Any insite into this would be great! (This is on 8.10)
I have also noticed that I can remove my thumb drive and unmout and mount my private dir without any issue. I assume that key is cached somewhere. This is concerning because I don't feel I should have to logout in order to protect my private dir again.
Kevin-
ReplyDeleteThanks for the comments.
I'm sorry, but blog comments are not the best way for me to provide support for these types of questions. Please use Launchpad bugs:
* https://bugs.launchpad.net/ubuntu/+source/ecryptfs-utils
:-Dustin