Encrypted Container

Suppose you have some data that you want to keep safe in case an unauthorized person gets into your computer. For example, you might have a file with your credit card numbers and other private information. One way to keep such information safe is to encrypt the file, and only decrypt it when you need to use the data.

The Mac comes with several tools for doing this. (One is called File Vault. I don't use File Vault because it is a heavy solution, encrypts too much stuff, and has encountered problems with other software in the past.)

I keep my private data in an encrypted disk image file. A disk image is a file that the OS can mount as if it were a disk; you often see these when you are installing new application software on your Mac. You can create a disk image that is encrypted with a password: when the system tries to mount the file as a volume, it requires that you type the password.

To create an encrypted disk volume, run Disk Utility and create a new sparse disk image, minimal size, encrypted, with a  strong password. Double clicking this image file will require the password to mount it: then it looks like a mounted disk that you can put private files in. Dismount the image, and your files are secured. You can copy this encrypted file somewhere safe, like onto a CD, to create a backup of your important data.

There are others way to create an encrypted container: I also use PGP software to encrypt and decrypt a text file. The advantage to this is that the file can be decrypted on non-Mac machines if necessary, because PGP is available (free) on several platforms. OpenSSL, which comes with the Mac, provides a similar function.

For more security advice, see the Security article.