Macos – Mac OSX encryption and hidden files

encryptionmacos

I have some PDF files I need to store safely on my Mac (MacBook Air 2011, OSX Lion). I've done a quick search on encryption software, and what I found left me with a couple of questions. First about the encryption software: it seems it encrypts your files using an algorithm of choice, and I'm wondering which is the safest one? And how safe is it actually? Because my (basic) understanding of encryption (PHP password encryption, etc…) tells me that if the encrypted file can be decrypted again, it's not that safe by definition (The algorithm can be "reversed".) So what's the safest way to go about this?

Another thing. I found some people who use the Terminal to hide files by putting a dot before the filename, so it doesn't show up in the normal user interface. This seems very weird to me, because it shows up in the Terminal nonetheless. If you guys could point me in the right direction, that would be much appreciated!

Best Answer

Your best option, as you said, is to do both, i.e. encrypt a file, and then hide it. The best option is to use a disk image, which can be used as a directory in the Finder, for easy access (when mounted).

Create a DMG image using "Disk Utility" (it's in /Applications/Utilities/, or use Spotlight). For this, click File > New > Blank Disk Image. Then you can choose the size (select it large enough to fit your needs) and the encryption (128- or 256-bit AES). Give it a name and a storing location, and there you go.

Using Terminal, you can then rename the file using (assuming the image was saved in your documents folder)

mv ~/Documents/myImage.dmg ~/Documents/.myImage

Every time you need to access your image, you can do, from Terminal,

open ~/Documents/.myImage

You will be prompted for your password, and then you can use the disk image just like usual in the Finder. You can use whatever name you want.

To be safer, you need to clear your history so that no one can see the command you typed to open the image (which reveals its location)

history -c && rm -f ~/.bash_history

Also, when the image is unmounted, make sure to delete its link on the left pane of Disk Utility.

Related Question