Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Create multiple nested secure disk images System
If you don't think AES-128 is good enough to keep your secrets safe in an encrypted disk image, you can try using nested encrypted disk images. This simply means storing one encrypted disk image inside another encrypted disk image, with each disk image having a different password. You can nest disk images to as many levels as you wish. Doing this should result in the sensitive data being encrypted multiple times with multiple passwords before being written to the hard disk.

The following steps show how to nest one disk image inside another:
  1. Using Disk Utility, create a sparse encrypted disk image named "Outside".
  2. Using Disk Utility create a second sparse encrypted disk image named "Inside". Use a different password for each disk image. It is best not to remember the passwords in the Keychain when creating these disk images.
  3. At this point you should have files Outside.sparseimage and Inside.sparseimage on the Desktop, as well as an Outside disk icon and an Inside disk icon. Drag the Inside disk icon to the Trash.
  4. Drag the Inside.sparseimage file into the Outside disk icon.
  5. Drag the Inside.spargeimage file in the Desktop to the Trash.
  6. At this point you should have file Outside.sparseimage in the Desktop and file Inside.sparseimage in the Outside disk.
  7. Double click the Inside.spargeimage file in the Outside disk. This will make the Inside disk icon appear on the Desktop.
  8. Copy your sensitive files to the Inside disk. When you do this the data will be encrypted first with the password for Inside disk, then again with the password for Outisde disk before it is finally written to the Outside.sparsedisk file.
  9. When done, drag the Inside disk icon to the Trash, then drag the Outside disk icon to the Trash.
  10. To access the sensitive files, double click the Outside.sparseimage file to mount the Outside disk, then double click the Inside.sparseimage file in the Outside disk to mount the Inside disk
[robg adds: I haven't tested this one. Make sure you use different passwords for each, or it's no more secure than just one image...]
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[9,745 views]  

Create multiple nested secure disk images | 21 comments | Create New Account
Click here to return to the 'Create multiple nested secure disk images' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Create multiple nested secure disk images
Authored by: larkost on Jan 14, '05 12:02:28PM

AES 128 is rated by the US government for Secret (but not Top Secret) documents. That means that is is unreasonable to think that someone without extraordinary resources (think NSA level resources) could break the encryption within a reasonable amount of time (think days of work) with current common hardware.

Putting one disk image inside another is not really going to get you any more real security. It is a "see how cool I am" move. The proper way of getting this done would be to use hdiutil's -encryption [crypto_method] call to set the encryption method to AES 192 or better (Top Secret rated). At that point we are well into tinfoil-hat range.



[ Reply to This | # ]
Create multiple nested secure disk images
Authored by: leopold on Jan 14, '05 12:25:15PM

And, WHAT exactly is wrong with my tin-foil hat?



[ Reply to This | # ]
Create multiple nested secure disk images
Authored by: bluehz on Jan 14, '05 12:29:11PM

This brings up a good point no one seems to know - what are the option switches for "crypto_method" used with hdiutil -encryption? How would you go about making an AES 192 encrypted image. I have searched far and wide for that info and can't find it anywhere....



[ Reply to This | # ]
Create multiple nested secure disk images
Authored by: Tidris on Jan 14, '05 01:30:57PM

All one needs to do to break an ordinary encrypted disk image is guess a single password. Given the way most people choose their passwords, the task of correctly guessing them is well within the reach of the average hacker. AES-192 is no more secure than AES-128 if your password is "hello".

The nested disk images force a hacker to guess multiple passwords that need to be applied in the right sequence in order to get to the sensitive data. Also note the hacker doesn't know how many nesting levels / passwords you have used. That uncertainty should be very demoralizing to a hacker and could very well make the hacker quit after just the outermost password has been guessed. This would result in a huge non-linear increase in security due to psychological factors.

If you look at Triple DES, which is considered much more secure than plain DES, you will see that it is similar in principle to what would be achieved by using 3 levels of encrypted disk image nesting.




[ Reply to This | # ]
Create multiple nested secure disk images
Authored by: szabesz on Jan 18, '05 09:55:32AM
just a short comment on this: "Given the way most people choose their passwords"
Anyone trying to protect their files should use good enough passwords in the first place! Why do you suppose that those who take the time to nest their files deep inside encrypted disk images does not take the time to use a good password?
I use only simple AES-128 protected disk images (4380 MB so they fit on a DVD), but with a 16 character long, randomly chosen string as a password. Next step would be to use a few more characters, and.....

ps: never use the AES protected sparseimage format! It gets corrupt in case of a system crash never to be mounted again!

[ Reply to This | # ]
This just linearly increases the security
Authored by: hamarkus on Jan 14, '05 01:08:20PM

If cracking the password on your outermost disk image takes let's say one week, than cracking the password of the second one takes another week.



[ Reply to This | # ]
This just linearly increases the security
Authored by: Tidris on Jan 14, '05 01:45:39PM

Not necessarily. If your first password is "hello", and your second one is "fdhjsaiofhaidhfashfoiwqu8947q49uqwiru89q3wu4r2", then the second password could take much longer to guess than the first one.



[ Reply to This | # ]
This just linearly increases the security
Authored by: foobar104 on Jan 14, '05 02:44:28PM

In that case, the correct course of action would have been to use a strong password the first time.

This hint isn't really useful. Rather, it's just something you can do if you feel like being inconvenienced.



[ Reply to This | # ]
This just linearly increases the security
Authored by: Spades on Jan 16, '05 02:47:45PM

Actually, they're both wrong. From what I know about AES, it's no better than other forms of encryption when it comes to "nesting". If you do AES once, and then do AES again, you haven't strengthened it any. It ends up being encrypted with just another key no stronger than the strongest key in the chain. It could even end up worse than any of the original keys.

In other words, if you combine keys such as "hello" and "qfhejlhfqm8hvaowhgfimahiwuhfcmilwaf", an attacker might be able to decrypt it with a key like "lkjafeuono".

Basically, if you're not a crypto expert, don't go arbitrarily combining crypto systems. It's usually counter-productive.



[ Reply to This | # ]
Create multiple nested secure disk images
Authored by: macg4dave on Jan 14, '05 02:54:53PM

I just call the inside disk image ". " and remove the icon. Make it a bit harder to find for some people new to the system. but at the end of the day if someone try's hard they will get into anything



[ Reply to This | # ]
Create multiple nested secure disk images
Authored by: TvE on Jan 15, '05 02:52:14AM

Well - it does not take much intelligence to figure out that the 100 MB "empty" disk image is NOT empty :-)



[ Reply to This | # ]
AES-256
Authored by: Lectrick on Jan 14, '05 03:22:11PM

I agree that this hint is more ridiculous than simply using AES-256 via the command line and picking a VERY good password. Once.

---
In /dev/null, no one can hear you scream



[ Reply to This | # ]
AES-256
Authored by: bluehz on Jan 14, '05 04:21:18PM

Would you care to eleborate on how to do this?



[ Reply to This | # ]
AES-256
Authored by: Tidris on Jan 14, '05 04:59:10PM

The problem is that what most people would actually do is keep using the same old easy to remember / easy to guess password when they switch to AES-256, thinking they are more secure just because they switched algorithms. If the password length doesn't exceed 128 bits / 16 characters, what is the point of going to AES-256?



[ Reply to This | # ]
Create secure disk image then use GnuPG
Authored by: ld50 on Jan 14, '05 03:40:49PM
An even better option would be to create your secure disk
then encrypt that with gpg GnuPG
With this option you wouldn't even need to create a secure disk image.

mh

[ Reply to This | # ]
Create secure disk image then use GnuPG
Authored by: erikh on Jan 16, '05 05:30:03AM

IIRC, PKE (which is what GnuPG normally uses) is good for encrypting short amounts of data once, while a symmetric cipher such as AES is better for encrypting large amounts of data (as it re-keys with each block). In a SSL transaction, PKE is used for the initial key exchange and certificate verification, and then a symmetric cipher is negotiated.

At least, this is how I recall it working. I could be horribly off-base here, and encourage anyone to read up on the topic instead of relying on what I'm shooting from the hip.



[ Reply to This | # ]
Create multiple nested secure disk images
Authored by: bluehz on Jan 16, '05 08:15:33AM

So no one has any suggestions as how to create anything other than the default AES-128 disk image using hdiutil? What are the cli switches necessary to create a higher level encrypted disk image??????



[ Reply to This | # ]
Create multiple nested secure disk images
Authored by: caesurae on Jan 19, '05 04:07:23PM
I believe that AES 128 encrypted disk images are the only choice with hdiutil. this is not necessarily a limitation of hdiutil itself, but a limitation of the current framework which hdiutil uses for working with disk images.

"/System/Library/PrivateFrameworks/DiskImages.framework"

If this is indeed the case, then it may be possible to use stronger encryption in future versions of OS X.

The hdiutil man page indicates that the default specification, or [crypto_method], used by the the hdiutil create -encryption option is called CEncryptedEncoding. After searching the OS X 10.3.7 filesystem, the Apple Developer Connection, and the WWW in general, I have found no mention of any possible alternative specifications. Furthermore, if there were such an alternative, there would have to be mention of it in a framework somewhere otherwise such an image would be unrecognizable/unmountable.

For the curious, there is a file called CEncryptionEncoding.strings located with "/System/Library/PrivateFrameworks/DiskImages.framework/Versions/A/Resources/English.lproj/" which simply provides some strings for use with Disk Utility.

To create an AES 128 encrypted disk image from the command line, from a folder named "MyFolder" located on the desktop, one could type the following:

hdiutil create -encryption -srcfolder ~/Desktop/MyFolder ~/Desktop/MyFolder.dmg

after being prompted for a password, the resulting image should be created on the desktop.

[ Reply to This | # ]

Create multiple nested secure disk images
Authored by: jago_lebow on Nov 24, '05 11:23:28AM

I'm trying to do this on my clients OSX server and I get no propt for a pass word .. they only way it works is to put the passphrase as a comandline arg ( kinda defats the point )



[ Reply to This | # ]
Create multiple nested secure disk images
Authored by: webweave on Jan 16, '05 11:15:18PM

There are good uses for this technique but absloute security is not of them.

If you want to secure files so it takes two or more people to open them then this is a good idea but your flaw is you are only protecting discovery of your password. If someone finds a flaw or backdoor in the encryption technique then knowing the password becomes moot. You use the exploit to remove the first layer of encryption and then use the same exploit to remove however many layers remain.

The comment that mentions to use GNUpgp as well is getting on to a better idea. If you are really paranoid you could break up the encrypted file into many files and store them at different locations.



[ Reply to This | # ]
Create multiple nested secure disk images
Authored by: poofuss on Jan 26, '10 05:09:37AM

I made a terrible mistake a put my file that contains all my passwords within a sparsediskimage (removed the extension of course leaving it a '.') -- creating a Disk Image and have already forgotten the password and there seems to be no way to retrieve the password through the password dialog box that comes up when trying open the disk image. And guess where I saved the password if you haven't already guessed...within that disk image. >_<

Is ANY way to recover this password for the disk image? This has seriously wrecked my work-flow and let it be known I will know better than to ever make this mistake again.

Any all and help to attention will be immensely appreciated.



[ Reply to This | # ]