Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Understanding encryption using Disk Utility

Using Disk Utility, I created an encrypted disk image, into which I have copied files I would like to secure. This works well, but I am trying to understand how things work, so that I can control exposure. Fundamentally, the question is when are files exposed, and when not. Clearly, when a password has been entered, the file is visible and available. But is it being decoded (ie is the underlying file is always encrypted)? If I make a copy of a file (after password entered), is this copy encrypted? If I make a back-up using Time Machine, are the back-up files (of encrypted files) encrypted?

Mac OS X (10.7.2)

Posted on Feb 2, 2012 2:10 PM

Reply
Question marked as Best reply

Posted on Feb 2, 2012 2:15 PM

See: http://en.wikipedia.org/wiki/OTFE

41 replies

Feb 3, 2012 9:46 AM in response to Pondini

Pondini wrote:


Tony T1 wrote:

...but the OP is asking about encrypted disk images

Yes, that's what I mean. You can create them with Disk Utility, via the New Image icon in the Toolbar:


Then I don't understand your statement that "When an encrypted volume (an actual disk partition or a disk image) is backed-up, the data is decrypted." An encrypted disk image is not decrypted when backed-up.

Feb 9, 2012 6:40 AM in response to christopher rigby1

Chris:


I must admit to still being a little uncertain too. My take from some of the earlier postings is that encrypted data will remain encrypted in TM. But Pondini's latest posting seems to suggest that if an app (TM?) reads data, it becomes decrypted. Not sure this makes sense.


Agree that goal needs to be that encrypted data remains encrypted, even when backed-up - otherwise no real sense.


I'm not sure that I'm totally comfortable with answers to date - although Tony seems pretty categoric (and is giving the answer I was looking for).


TM back-ups really go the essence of the question. Assume automatically scheduled backups through out the day. Assuming that during the day, there are times that the encrypted disk image is being used (ie a password has been entered), and other times not. What is happening in TM? Are all back-ups encrypted? Or are backups that occur while files are available(ie password entered) taking unencrypted data? The latter would certainly not be a desired outcome!

Feb 9, 2012 8:19 AM in response to guy toronto

guy toronto wrote:

. . .

But Pondini's latest posting seems to suggest that if an app (TM?) reads data, it becomes decrypted. Not sure this makes sense.

Yes, that's exactly what happens. The data is copied and decrypted "on the fly" so you can read it. The original file (on disk) remains encrypted. Only the copy made in memory (RAM) for you to read or edit is decrypted.


When you then save, copy, export, the (unencrypted) data in memory, it may or may not be encrypted, depending on the destination. If you just save it back to the encrypted drive (or disk image), it will be encrytped. If you save it to an unencrypted drive (or disk image), it will not be encrypted.


Part of the confusion here is the difference between encrypting an entire volume vs. encrypting a disk image.

Agree that goal needs to be that encrypted data remains encrypted, even when backed-up - otherwise no real sense.

Not always. A laptop user who makes backups to an external HD may want the laptop's HD to be encrypted, so it's protected if the laptop is lost or stolen while the user is travelling, but may not want the backups to be encrypted, if the backup HD is in a secure place.


An encrypted disk image, however, will always be encrypted on disk, regardless of the encryption status of the volume it resides on.


Assume automatically scheduled backups through out the day. Assuming that during the day, there are times that the encrypted disk image is being used (ie a password has been entered), and other times not. What is happening in TM? Are all back-ups encrypted?

If the disk image is encrypted, the backups of it will be encrypted. But remember, the contents are only backed-up when the disk image is not mounted.

Jan 11, 2013 7:35 PM in response to guy toronto

Hopefully this will clear things up:


Let's say you have an encrypted volume (either a disk partition or a disk image). When you mount the volume and enter the password, it gives OS X the ability to present the volume as if it wasn't encrypted. Anything read from the disk is decrypted on-the-fly, and anything written to the disk is encrypted on-the-fly. To the user, and his applications, the volume might as well not be encrypted.


This is the only way encrypted volumes can work, logically. If files weren't decrypted on-the-fly, then they would just appear as encrypted garbage to your applications and you wouldn't be able to open them.


So to answer the OP's question, if you copy a file from an encrypted volume (for example, your Mac, if you're using FileVault) to an unencrypted volume (for example, an unencrypted Time Machine disk), the file will be decrypted on-the-fly as it's read off the encrypted volume and stored in unencrypted form on the unencrypted volume. This might not be as worthless as it sounds since maybe your Mac is a laptop with a non-trivial chance of being stolen, whereas your Time Machine backup disk might be stored in your relatively safe office or home.

Jan 13, 2013 1:04 PM in response to motrek

Thanks for the clarification, Motrek. Ultimately, I suppose that this is all logical. But still a little uncertain regarding Pondini's comment that TM will only back up when a disk is not mounted. That would mean that backups (of an encrypted disk image) would always be encrypted (irrespective of whether the destination is itself an encrypted image). While I like that solution, I can't help wondering what makes TM skip info in a disk image that is mounted.


If Pondini is correct, I would of course need to remember to make sure that my disk images are unmounted when making backups!

Jan 13, 2013 1:17 PM in response to guy toronto

I don't want to start an argument but I don't see how what Pondini is saying could possibly be correct.


First of all, you can certainly use TM to back up mounted volumes, since almost everybody uses TM to back up their main (boot) hard drive, and you can't be expected to unmount your boot drive in order to back it up. Also, one of TM's main features is file versioning, so you can access a file as it was an hour ago in case you accidentally mess it up (hence the name "Time Machine"). That wouldn't be possible if you could only back up unmounted volumes since it means you'd have to unmount and remount whatever volume you're using every hour, which people obviously don't do.


Second, I don't believe TM backups are necessarily encrypted, even if they are backing up encrypted volumes, since there's a very prominent setting in TM that lets you choose whether or not your backup is encrypted. Presumably if this option is not checked, the backup is not encrypted. Otherwise, why have the option?


So if you want everything encrypted, I think it's very easy. Just turn on FileVault on your boot drive and select the option in Time Machine to encrypt your backup and you should be covered.

Jan 13, 2013 1:17 PM in response to guy toronto

Time Machine won't back up the contents of a mounted disk image. Apple doesn't say why not, but since a disk image (except sparse bundle disk images) is actually a single (often very large) file, it would be likely for OSX to try to update it while it's being backed-up, or vice-versa. On a large one, that could lead to a very long hang of whichever process is second, or an inconsistent backup OSX allows both to occur at once. In addition, it might be seen as better to wait until it's closed, so intermediate changes don't cause multiple backups.

Understanding encryption using Disk Utility

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.