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

Simulating an encrypted physical disk in OS X System
I've always wanted to have a fully encrypted memory stick which when plugged in, OS X would automatically ask me for a password before mounting it. As far as I know (and from what tests I carried out), it's not possible to create an encrypted disk image and overwrite the entire device with it.

My solution involves placing a hidden encrypted disk image on a device, hiding the volume itself so it doesn't show up in the desktop, and applying a Folder Action to the /Volumes folder which takes care of mounting the encrypted image when the device is plugged in, and unmounting the device when the encrypted image is ejected.

No Terminal access necessary: an AppleScript droplet for preparing the device, the Folder Action AppleScript, and an AppleScript for restoring the device are provided here.

The scripts are tested in 10.5.1, but they really should work in Tiger as well. Only known issue: if you hit Cancel when asked for the password to mount the encrypted image, you will have to unmount the device through Disk Utility, as it's not accessible via the Finder. However, it's not hard to create a 'cleanup' AppleScript that does this.

[robg adds: Typically, I'd host these scripts on macosxhints as well. In this case, however, due to their complexity and the chance of their changing in the future, I'm leaving them linked via the external site. I haven't tested these scripts. One other solution to do this came up just yesterday -- TrueCrypt is a free program that's now available for OS X. Using TrueCrypt, you can apparently encrypt an entire USB memory stick, for instance. I haven't tested it, however (I believe it uses MacFUSE to do some of its magic).]
    •    
  • Currently 2.00 / 5
  You rated: 1 / 5 (10 votes cast)
 
[8,008 views]  

Simulating an encrypted physical disk in OS X | 6 comments | Create New Account
Click here to return to the 'Simulating an encrypted physical disk in OS X' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Simulating an encrypted physical disk in OS X
Authored by: osxpounder on Feb 07, '08 01:03:04PM

Wow!

The idea looks really useful, but I wonder if it would be possible to modify the scripts [or whatever needs changing] so that the disk images *does appear* on the desktop, or in Finder, when mounted?

I'd find that very useful. I'd be able to plug in my USB keychain drive, and your clever scripts would cause the password prompt to show up, but once the disk mounted, it would be visible as any other disks are, so that, when it's time for me to leave with my USB drive, I could click an Eject button or do CMD-E.

Is that possible? Is it a lot of trouble?



[ Reply to This | # ]
Simulating an encrypted physical disk in OS X
Authored by: aquarajustin on Feb 07, '08 05:19:27PM

This will be particularly useful when I get my external FW RAID for TM. Since it's more likely to get up and walk away than my machines, I'd like for it to be fully encrypted. Thanks!



[ Reply to This | # ]
Simulating an encrypted physical disk in OS X
Authored by: PopMcGee on Feb 08, '08 12:02:42PM

Didn't we have this in Mac OS 7 - 9? "Silverlight"... something like that...?



[ Reply to This | # ]
Simulating an encrypted physical disk in OS X
Authored by: mcmikemn on Feb 08, '08 04:37:11PM

TrueCrypt also has a feature called Hidden Volume, which is similar to this hint's idea (but a little better, actually). Hidden Volume is available in the OS X version of TrueCrypt, I think, but they are working on it.



[ Reply to This | # ]
Will this work when inserted in a PC?
Authored by: VanFruniken on Feb 11, '08 03:19:24AM

Looks like PC users will have full access to the contents of your USB stick.

Besides, the hidden attribute of your volume can be easily overriden (Goto Folder, Search for visible+invisible, utilities that allow enabling the viewing of hidden files)



[ Reply to This | # ]
Will this work when inserted in a PC?
Authored by: jaguarcy on Feb 14, '08 07:42:41AM

All users will have full access to the contents of your USB stick, not just PC users. But the 'contents' of your USB stick are an encrypted disk image, hence the 'simulate' part :)



[ Reply to This | # ]