This tutorial is about How to Encrypt Files with gocryptfs on Linux. Recently I updated this tutorial and will try my best so that you understand this guide. I hope you guys like this blog, How to Encrypt Files with gocryptfs on Linux. If your answer is yes after reading the article, please share this article with your friends and family to support us.
Check How to Encrypt Files with gocryptfs on Linux
Gocryptfs is a file-level encryption utility built on Filesystem in Userspace (FUSE). FUSE-mounted means that the encrypted files are stored in a single directory tree, which is mounted like a USB stick via the FUSE interface. This allows any user to mount, you don’t need to be root. Because gocryptfs encrypts at the file level, sync operations that copy your files can work efficiently for each file. This is in contrast to disk-level encryption, which encrypts the entire disk as a single large binary blob.
When you use gocryptfs in normal mode, your files are stored on your hard drive in an encrypted format. However, if you provide the encrypted files, you gain unencrypted access to your files, just like any other files on your computer. That means all your regular tools and programs can use your unencrypted files. Changes, new files and deletions are reflected in real time in the encrypted version of the files stored on your hard drive.
How to make use of Gocryptfs to encrypt files.
Gocryptfs comes with a deb package and is available in the Debian and Ubuntu repository, which means you can easily install it with the command:
- sudo apt install gocryptfs
The same applies to Arch Linux. You can install gocryptfs via Pacman:
For other Linux distributions, you can download the binary from their Github site.
To use gocryptfs on macOS, you must first install Homebrew:
- /usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
Then use the following command to install gocryptfs:
Gocryptfs is not natively supported on Windows due to its lack of FUSE support. However, cppcryptfs is an implementation of the gocryptfs encrypted overlay file system in C++ for Windows, so you can still get it to work on Windows. Follow the build instructions here.
Using gocryptfs to encrypt files
To start using gocryptfs, you must first create two empty folders:
Next, initialize gocryptfs:
- gocryptfs -init encryption
Lastly, mount the “encrypted” folder to the “plain” folder:
- gocryptfs plain encryption
Now all the files you put in the “plain” folder will be encrypted and stored in the “encrypted” folder.
As an example, if you want to store the encrypted file in Dropbox and mount it to a “Private” folder in your home directory, you can run the following commands:
- mkdir ~/Dropbox/encryption ~/Private
- gocryptfs -init ~/Dropbox/encryption
- gorcypted ~/Dropbox/encrypted ~/Private
Every file you put in the private folder will be encrypted in the “Encrypted” folder and uploaded to the Dropbox server.
SiriKali – a GUI tool to use gocryptfs
SiriKali is a GUI tool that can be used to encrypt with gocryptfs and other standards. It is available for Linux, macOS, and Windows, although the Windows version does not support gocryptfs.
- Go to the SiriKali website and download the appropriate package for your system. The Linux package offers the source that you can extract and compile. It is also available with its own repository for a variety of distributions and can be found here.
- On Ubuntu, run the following within Terminal:
- sudo sh -c “echo ‘deb http://download.opensuse.org/repositories/home:/obs_mhogomchungu/xUbuntu_18.04/ /’ > /etc/apt/sources.list.d/home:obs_mhogomchungu.list”
Once the commands are done, it’s a good idea to run this to “trust” the key and allow updates.
- wget -nv https://download.opensuse.org/repositories/home:obs_mhogomchungu/xUbuntu_18.10/Release.key -O Release.key
- sudo apt-key add –
- sudo apt-get update
- sudo apt-get install sirikali
- You should now find SiriKali installed and available within your menu. Click to open.
- SiriKali opens a window reminiscent of VeraCrypt with options at the bottom of the screen. You can create volume, mount volume, update, manage favorites, and finally there is a menu.
- Now you can click on Gocryptfs and create a volume.
- Call the volume whatever you want, and the key represents the password. There are different options such as password, password and key file, and GNOME Wallet. Select the one that best suits your needs; just remember to use a password that is not easy to guess. There are more variables below the options button detailing the level of encryption and whether you need encrypted filenames.
- Once this is done, the newly created folder will appear in the SiriKali app. Click here to open your folder where you can copy the files you want to encrypt, just as you would any other file copy action.
- When you’re done, remember to click again and select “unmount volume”.
Final remarks: How to Encrypt Files with gocryptfs on Linux
I hope you understand this article, How to Encrypt Files with gocryptfs on Linux. If your answer is no, you can ask anything via the contact forum section related to this article. And if your answer is yes, please share this article with your friends and family to give us your support.