Chances are you’ve encountered disk image files (indicated by the extension .dmg) when installing software on your Mac. When you double-click on this type of file, your computer mounts it as though it were a DVD or hard drive. In fact, you can think of mounted disk images as virtual drives.
The Disk Utility program in Mac OS X Leopard allows you to create your own disk images. Used to format, verify, repair, and partition disks and volumes, Disk Utility also lets you make safety copies of important CDs and DVDs, back up your hard drive, or create a virtual copy of a physical CD. (For example, you can make a disk image of the CD that authorizes your favorite computer game, so you don’t have to insert the physical disc each time you play.)
Best of all, you can add password protection to disk images when you create them. Without the correct password it’s nearly impossible to read the contents of an encrypted disk image, so it’s a great way to transfer data securely via email, FTP, flash drive, CD-ROM, or DVD-ROM. This format is especially useful if you need to send sensitive information to a colleague, or travel with files you want to keep confidential.
To create a disk image from a folder on your Mac, first open Disk Utility. (You’ll find it in the Utilities folder inside the Applications folder.) In the File menu, select New, then New Disk Image from Folder (or type Command-shift-N). Navigate to the desired folder, then click Image.
A pop-up menu prompts you to choose a name and save location for your disk image. It also includes two pull-down options: Image Format and Encryption. If you’re going to transfer your disk image (for example, as an email attachment), select Compressed under the Image Format pull-down. If you want to add password protection, select 128-bit or 256-bit AES encryption under the Encryption pull-down. (128-bit encryption is extremely secure; it would probably take a password-guessing computer many lifetimes to crack it. The second option is even more secure, but takes longer to create.)
Click Save, and Disk Utility begins to create the new disk image with the name and preferences you’ve specified. If you chose to add encryption, a password pop-up appears. Enter and verify the password of your choice. (As always, the best passwords are at least eight characters long, mix letters and numbers, and avoid dictionary words.) Disk Utility evaluates the password’s strength and gives you the option of remembering the password in your Mac’s keychain.
Now you can transfer the disk image easily and securely via email or other means. The only way to access the data inside the disk image is by entering the correct password.
Disk Utility can make disk images from folders, but not from individual files. If you want to create a disk image for a single file, just create and name a new folder, place your file inside, and make a new disk image from that folder using the steps above.
Please note: Don’t lose that password! If you do, you’ll probably never be able to open your disk image.