There are many ways to password protect and encrypt small pieces of data on a Mac. You can use Keychain Access to encrypt a note in your keychain. You can use Disk Utility to create a small encrypted disk image. The app Evernote allows you to encrypt a piece of text inside a note. You can also use the Terminal to create a password protected zip file.
Hi this is Gary with MacMost Now. On today’s episode let me show you three different ways to securely store a bit of information on your Mac.
Now there is a ton of ways to secure all the information on your Mac. You can set passwords for user account and then use fire vault to encrypt the entire user account for instance. But what if you just wanted to encrypt a tiny bit of information. Like maybe say a code for a padlock or the number of your safety deposit box or a map that shows you where you buried hidden treasure. Well you can do that very easily in a variety of different ways. Let me show you three different ones.
So the first one uses keychain. You want to run Keychain Access which is found in your utilities folder in your Applications folder. This is where your Mac stores all different things like passwords you use for different accounts and websites and tons of different stuff in there. You can see there are different categories listed on the left. You want to go to the Secured Notes category. This is kind of your own do whatever you want with category. You can create some secure notes.
So let’s create one by pressing the + button here at the bottom. You want to give the item a name. So maybe you call this say padlock code and then you give it the code right there. And you say add. So now it is added to your Keychain. At this point it is securely encrypted but it is easy to get to because usually for most users when you are logged into your Mac you are logged into Keychain as well. So all you need to do is to run Keychain Access, go to the secure notes here, and double click on the padlock code and it will come. Except that when you hit show note it is going to ask you to enter your keychain password and it won’t show you the data until you enter that password. So somebody has to know both your user password to log onto your Mac but also the keychain password to go on because it is asked here a second time even if you are logged into the keychain under normal circumstances.
Now even though there are a lot of tutorials that show you that method I don’t really like it. It is a bit convoluted and there are a lot of better ways to do it like this one.
So let’s say you store the information that you want inside a simple text file. Just use TextEdit to create it. I’ve created a Padlock file from TextEdit and its got, you can see the contents in there are the numbers. I’ve put it in a folder called Secrets. The idea is that I actually want to protect everything in here so I can have padlock code, I can have an image with a map on it, I can do all sorts of things in here.
So the way to do this is to run Disk Utility and with Disk Utility you can do something called New Disk Image from folder. So let’s do that. I’ll go in and find under Documents there’s that Secrets folder I created. I’ll create an image from that and what I’m going to do here is I’m going to set the image format, just a compressed image format, but I’m going to set the encryption to 128-bit encryption and I’m going to save it in the same location under Documents and I’ll save it and it’s going to ask me to enter a password. I’m going to enter in a good password (not in this case, not really, but you should) and then you can have it remember the password in your Keychain which is handy if you need to access it all the time or say forget that because I want to enter the password every single time I open this up and say okay. What will happen is it will create this disk image and we will close out Disk Utility here and you see I still have the original folder. I want to toss that and I’ve thrown that away. Now I have this Secrets.dmg and its not even mounted. You can see it is not listed here on the left. So if I want to get to it, get to the contents of it, I need to double click it to open it up, enter that same password (don’t forget it) and say okay and it will open up the disk image. Once the disk image is opened up you can see I have access to it. It is now on the left under devices and then here I’ve got the rtf file and when I’m done viewing the information I simply eject it and now it is no longer mounted. The dmg file which is secure and and 128-bit encrypted is still there and I can only access it with the password.
The cool thing about this is that I can drag and drop it to say a flash drive, or another computer or backup drive. It is still encrypted and has all this cool data in it and only I can get to because I’m the only one that has the password.
Now neither of these methods are particularly quick to do. There is a lot of steps involved. What if you really quickly want to encrypt something. Well, if you are user of Evernote then you can do this very easily inside Evernote.
So here I am inside Evernote and I have no notes here in this particular notebook so I’m going to create a brand new note. I’m just going to click that right there and I’m going to call it Secrets and the cool thing about doing this in Evernote is you don’t have to encrypt the entire note as you may expect. You can encrypt only an important part. So I can do something like Padlock Code and then I can enter it in and then the cool thing is that I can select just the text that I want to encrypt. So I can leave the words Padlock Code unencrypted so I can see what’s there. I’m going to, there are a lot of different ways to do this. I’m going to control click on it and I’m going to select Encrypt Selected Text and here I can enter a pass phrase, password, and I can even do a hint which is really handy, and then I can select whether or not to remember it. In other words I enter it in once and it will show me the data in there until I quit Evernote and then I have to enter it again. I’m not going to do that for this one because I want to keep it super secret and hit okay.
So now I’ve got this note here and Padlock Code and you can see it’s this little encrypted content thing and I have to click on it and say show encrypted text and hit the password and now it will show me that and it instantly, as soon as I click away, it is gone. So now I can in the Secrets note I can do all sorts of things, enter in other codes, and encrypt those. I can use a different password for each one of these. There we go. So I’ve got two encrypted pieces of data and I can encrypt huge blocks of text and information, everything, inside of the note or just select the entire note and encrypt it as well.
So every note wins as far as how easy and versatile it is to encrypt a small bit of data but if you want to stick something on say a flash drive or send a file to somebody and be able to encrypt it when it gets to their computer then a disk image is probably the way to go.
So one final bonus method if you are comfortable using the terminal, you can go into the terminal, navigate to the folder you want. I’m here in the same Secrets folder I created before and you can see I’ve listed the contents and there is the Padlock file. You can use the zip command and dash E for encrypt and then give it the name you want, so say Padlock.zip, and then give it the file that you want to encrypt. So Padlock.rtf, that’s the command there. It is going to ask me for a password and verify the password. Now I’ve got that. If I list the files there you can see I still have both. So I’m going to have to trash the one I don’t want, the rtf file. But if I go to the Finder now I can see the cool thing is that I don’t have to use the terminal to look at the contents of it. I can just double click on the zip file. It is going to ask me for that password, and it will decompress it.
Now the disadvantage of this is that the fact that it has now decompressed it and made it into a file. So now once I look at the contents of it I have to select it and delete it. I still have the zip file there. I get rid of the original too. But every time I want to look at it it is creating a copy of it that I can then look at. The advantage of this though may be that it probably works on multiple systems. This may work on Windows. This may work on Linux. Anything that uses a fairly robust zip application should be able to get to this file by using the password.
So there is not three, but four different ways to encrypt a tiny bit of information with a password.
I hope you found this useful. Until next time this is Gary with MacMost Now.