Encrypt your sensitive file and folder in macOS easily – quick steps to be encrypted
Your Mac might be one of the most securest and the most personal device you have, containing a ton of personal information. But are you really content with the “Mac privacy and security” that Apple boasts about? Is it a risk you're willing to take with your personal information?
What is there to say that Mac security won't fail and your data will remain secure? Well, you can either contemplate the risks involved or take matters seriously into your hands by encrypting your files on Mac. This article contains some of the best practices and tools you can opt for to encrypt files and folders on Mac, so if you're interested in staying secure, read along.
Encrypt File and Folder In macOS – 2 Best Ways
macOS is the most privacy-oriented operating system with dedicated privacy and encryption tools. In macOS, you don't need any third-party tools or software to encrypt files or folders. The two most popular ways you can encrypt files and folders in your Mac are as follows:
- Using Terminal
- Using Disk Utility
These two methods are the best-known ways you can encrypt files and folders within your Mac. These versatile and user-friendly tools offer robust security to Mac users through secure encryption protocols.
1- Encryption Through Terminal:
Terminal offers two types of encryption to your files and folders: the AES-CBE-128 bit encryption or the AES-CBE-256 bit encryption ciphers. AES, encryption is the industry-standard encryption cipher and by far one of the most robust encryption ciphers currently available. Additionally, Terminal uses the SSL encryption protocol to encrypt your files.
In the following demonstration, I will use 256 bits to encrypt the file; you can choose its alternative.
Terminal Command:
openssl enc -aes-256-cbc -e -in {from path} -out {desire location}”
Explanation:
openssl enc {using OpenSSL encryption protocol}
-aes-256-cbc {Encryption level of 256 bit}
-e : {Encrypt}
-in: {file location path}
- Open >Terminal from Launchpad or applications
- Here is the code to encrypt
openssl enc -aes-256-cbc -e -in
- In my case, I have created a text file named “information” on the desktop and put some information in it. It should look like this /Users/macbook/Desktop/information.rtf
- Add [-out /Users/macbook/Desktop/encrypted.txt ] in this; I declared the location where it should be saved, the name of the file and what the format of the file will be. Hit
Enter
- Set the
password>
It will not show anything when you are typing, so enter the password and confirm the password. - File is been created on our desktop by named “ecnrypted.txt”
- It will open with a chipper text format, you cannot be able to read it, it will look like this.
Here is my complete command after everything
openssl enc -aes-256-cbc -e -in /Users/macbook/Desktop/information.rtf -out /Users/macbook/Desktop/encrypted.txt
Decrypt through Terminal:
It's effortless to decrypt the file and folder as long as you remember the password; otherwise, there is no way you can ever decrypt it. As mentioned above, the AES encryption cipher is the strongest cipher that is not vulnerable to brute force attacks.
It is nearly impossible to break an AES encryption file, so you should remember your password if you don't want to lose your data forever. A supercomputer would take 1 billion years to decrypt the AES 128-bit file.
Along with your password, to decrypt your files on Mac, you will need to tweak the original code a bit, such as follow:
- Open> Terminal
- openssl enc -aes-256-cbc -d -in Just change -e to -d means “d=decrypt”
- Here is the complete command in my case
openssl enc -aes-256-cbc -d -in /Users/macbook/Desktop/encrypted.txt -out /Users/macbook/Desktop/decrypted.rtf
- Enter your password and hit Enter
2-Encrypt File from Disk Utility:
In the disk utility option, you may be unable to pick a particular file to encrypt. You need to make a folder, put everything in it, and then encrypt with AES 128-bit or AES 256-bit encryption ciphers. As mentioned above, both of these ciphers are impossible to decrypt. However, 128-bit is slightly faster to encrypt and decrypt.
- Open>Disk Utility
- >File>New Image>Image from Folder
- Select the folder in my case, its “personal” folder on the Desktop, then Click on Choose
- Rename the document, I call it “encrypted,” then choose the encryption type you want to use from the bottom. I’m going with 256-bit AES encryption and hitting Save
- Next, you need to put your password to encrypt it
- It will take time to complete, depending on size of the file
- After compilation, your folder will look like this, it's basically an image for your folder.
This is how you can Encrypt the whole folder In macOS by using Disk Utility. Just put your password and decrypt the drive, the encrypted image will stay as it is, but it will create another folder on the same spot. You can download stuff from it and put it in others if you want. But the encrypted image will contain the same thing which you put in the first place.
FAQs
You can choose both options discussed above, whether using the Disk Utility option or the Terminal. You need to encrypt a file and attach it with an email to secure a transaction.
If you created the image through the Disk utility, the password is enough to open it. If you used Terminal to encrypt it, you must follow the steps above the “decrypt mac file” heading.
Whether you want to encrypt a folder is purely your choice. However, encryption offers much-needed protection from hackers and snoopers. After all, who wants anyone sneaking a peek into their personal data
You can access all files from an encrypted image file by decrypting that folder to another, you can copy files from it, but you cannot add new files. If you want to add files to another encrypted folder, you need to delete that folder, create another one, put everything in that then again go through the process from Disk Utility.
Conclusion
Encrypting your files on Mac is a crucial step to attaining privacy and security. With hackers and data snoopers prowling to harm your data, it is best to maintain the utmost privacy and secrecy that you can achieve.
If you did everything correctly, your files and folders will be encrypted!