Encrypting Sparse Disk Images on OS X
This tutorial will show you how to create, mount and use an encrypted sparse disk image in OS X. This is useful if you have some sensitive data that you do not want to risk having compromised in any way. It is very important that you know there is no magic tool to recover data once it is encrypted, you absolutely must remember the password. It is also important to know that this "sparse image" is just like any other file on your desktop, for example if you are running Time Machine it will be backed up by Time Machine which may eat into your storage pretty quickly. The reason for this is if anything is done to modify a file inside the entire image will be backed up as Time Machine can not look inside.
Creating the Sparse Image
- The first thing you will want to do is to open up Disk Utility.app which is in Applications -> Utilities.
- Once Disk Utility is open you will want to click the "New Image" (make sure you don't have any of the disks selected before clicking the button) button in the middle of the top toolbar. This will pull down a menu where you have several options, you can name the image whatever you would like and choose where you would like to save it to.
- Next you want to choose a size appropriate to the amount of data you will be storing, if none of the preset sizes fit your needs you can choose "Custom" and specifiy any amount. It is important to know that once the size is set it can not be exanded upon later.
- You should now choose the type of encryption, the recommended 128-bit AES encryption should be fine.
- You can leave Format and Partitions at their defaults, but change "Image Format" at the bottom to "sparse disk image" and click Create.
- You will now be prompted to type in a password, it is important to remember that this password will be the ONLY way to access the data once it is inside the sparse image. There is no magic tool to retrieve encrypted data, only the password. After you type the password into both the Password and Verify text boxes make sure to uncheck "Remember password in my keychain", otherwise anyone logged into your account will still be able to access the data.
Accessing the Sparse Image
- Now that you've created the sparse image you can navigate to the location where you told the creation wizard to create the image, once you are there double click on the .sparseimage file.
- It should now pop up asking you for a password, this will be the password you typed in during the creation of the sparse image.
You should now see your sparse image mounted and should be able to access it as you would any other disk image in the sidebar of the finder or on your desktop. You and anyone else who may have access to your account will be able to view/change the data as long as it is mounted. To make the data inaccessable without the password again just click the eject symbol next to the sparse image in the finder sidebar, or right click it's icon on the desktop and choose eject from the menu.