Efforts to understand, improve, or do less harm to the world around me.


___________________

Friday, April 24, 2009

Mac security: on-the-fly encryption

After a recent theft of some pretty important data, I've been looking into ways to secure my information without slowing me down. There are commercial tools for this but the best solution so far seems to be the free, open TrueCrypt. This software isn't Mac only but Mac users will want to customize it by setting up TrueCrypt to open at system startup.

Really big files

The only negative about TrueCrypt is that the encrypted volumes it creates cannot change in size. When you backup 25 gigs of data every few days, this can be an issue. So I found a Mac-only way to create an encrypted volume that acts like a removable external drive. I like the idea of using tools built right into the machine (something called "hdiutil") and using fewer system resources.

Here's my own modified script:

hdiutil create SecureSparse -size 100g -encryption -type SPARSE -fs HFS+ -volname ImageName
  • Feel free to change "ImageName" to whatever name you would like. This is what will show up on your desktop as a removable disk when you mount (double-click) the SecureSparse file and type in your password.
  • 100g means 100 gigabytes. This is just the cap on the file size and you can change it to any size.
  • When prompted, for extra security, don't save the password to your keychain.
  • Once the file is created, you can change "SecureSparse" to any name you'd like.

Command line fears?

Even though you need to open up a Terminal window to open it, use of the command line is a very brief experience. After that, you can use the created file just like any other. Unfortunately, the archive will grow but not shrink -- the only negative I can see so far.

Update: Users can shrink the volumes (make sure you have emptied the trash before doing this) by using the command:
hdiutil compact SecureSparse.sparseimage

No comments: