Encrypting Disk Images in OSX

You can use the built in FileVault feature to encrypt your whole user directory in Mac OSX. However, this usually comes with an overall price on performance. Additionally, if you use Time Machine and Filevault together, your home directory gets backed up once you log out of your machine.
There is however, another option. You can make a mountable Encrypted Disk Image (any size) of your own to securely store your confidential files. This will allow you to turn FileVault off for best system performance, giving you the ability to backup your password protected images to CD-R or DVD-R, or other removable media.
Lets get to it. Although you can make the image any size, for this example we will make a file that is 660MB, so it can be backed up to a CD.
Open Finder, and go to your Applications/Utilities folder. Launch Disk Utility.
Select New > Blank Disk Image from the File menu, you can also click New Image from the tool bar.
- Lets call it 'Test' in the "Save As" Field.
- Choose 'Desktop' in the "Where" field.
- We'll call the Volume name 'Myfiles'.
- Select '660MB (CD-Rom 80 min)' from from the "Volume Size Dropdown".
- "Volume format" should be 'Mac OS Extended Journaled'.
- For "Encryption", choose '256-bit AES'.
- In "Partitions" pick 'No Partition Map'.
- Under "Image Format", choose 'read/write disk image'.
This section should look like this:
Click "Create", and you will be prompted for a password. Uncheck the option for 'Remember password' or 'save to the keychain'. No point encrypting the disk image if your keychain is available to someone with access to your logged in computer. Select a strong password using uppercase, lowercase, numbers & symbols. Remember it, because there is NO way to recover your data if you forget it. If your password is strong enough, you will see a green meter bar like below.
(**DO NOT write your password down on a sticky or near your computer**)!
Click 'OK', and Disk Utility will now create the disk image and mount it. Now you can copy any files you want to keep inside by dragging them into your mounted disk.
When you are done copying files to it, un-mount the image by dragging it to the Trash, or right clicking (control-click if you have a single button mouse) the mounted drive icon and selecting 'EJECT'.
Whenever you wish to save files into it, re-mount it by double clicking the Test.dmg file. You will be prompted for your password every time it is mounted for access.
We could be finished here, and that's fine for the average person. There are however, 2 more options, which may be preferable for your needs when not backing up to a CD or DVD.
The Volume size we selected is hard coded (will always be the same size). If you were to select 'Sparse Disk Image' under the "Image Format", then you will have an encrypted disk image that grows as you add to it. Keeping the file smaller to begin with, until it reaches the maximum size you specified in "Volume size".
The final option is for a 'Sparse bundle disk image'. This option acts just like a sparse image by growing in size. But it isn't actually a single file, as the previous disk image formats were. The bundle is also known as a package (a folder full of file slices that are each 8 MB in size, composed of what is needed to hold all your data). What's interesting here is that if you change something on a sparse bundle by modifying or adding a file, only the slices containing the data will change, not the whole image. So if your backup software can handle bundles, then it's easier and faster to backup the small portions that have changed rather than the whole image.
That's it. Stay safe with Encrypted Disk Images in Mac OSX.




Reader Comments