Encfs encryption the Truecrypt alternative?
Posted: 06 Jun 2014, 13:26

Well those cryptic announcements that Truecrypt has become unsafe and is discontinued do probably mean that the NSA have demanded and gotten what they needed.
So it is time to look for an alternative. There are several but i went for Encfs.
Encfs does not reserve a space on your HD and simply grows and shrinks with the files you put in there.
The one thing that can seem a bit confusing about it is that you need to make two directories (folders) to make it work:
one encrypted and one unencrypted.
Why would I need an unencrypted folder that contains the data I want to encrypt; is that not the mother of all security flaws?
The entire point with encryption is that the encrypted data should not be accessible in an unencrypted form; right?
Well the way encfs works is that the un-encrypted directory is the mount point for the encrypted content.
If you do not mount it - nothing nix de nada - will be visible there.
And to mount it; you need to enter that password

Ok let's go then:
I installed Encfs in my Manjaro distro (it will be pretty much the same in any distro. I found a bug in SolydX though).
Code: Select all
sudo pacman -S encfsThen I decided that I wanted to make a directory that I would call .secret to keep my encrypted stuff and I would make the mount point secret:
Code: Select all
encfs ~/.secret ~/secretNote that .secret will contain the unreadable encrypted stuff so we make that a hidden directory with the "." because there is no use in looking at it.
.secret will be mounted to secret (where you put all the content you want to encrypt aka your working directory) as a HD with this command in the future, but since this is a first time run the directories need to be created.
You will be prompted about this and can simply answer "y" twice so the directories will be created.
Next you will be prompted for the configuration mode here you can simply pick "p" for paranoia mode which is a good mode.
(If you pick x for expert mode; you can configure manually).
Next you will be prompted for your password. Make it long and hard to crack but don't forget it - if you do; there is no way of recovering your data.
(Tip: use sentences and slang like; Ain'tToHappyBoutNSATheseDays062014)
And that's it
you'r finished Well let us test it then; open your Thunar or Nautilus or Dolphin and go to ~/secret and add a file like test.txt or whatever.

Next open ~/.secret and there you will se something completely jiberish

That is why we made it a hidden directory (don't mind the addresses - I used encfs to encrypt my dropbox - we will get to that later...).
To test that the password prompt and the mounting will work properly we need to unmont secret first:
Code: Select all
fusermount -u ~/secretHave a look at secret now! It is completely empty (as it should be). Our test.txt is not there.
Then we (re)mount it with:
Code: Select all
encfs ~/.secret ~/secretHere you will have to enter your password.
Et voila now the test.txt is visible and editable in secret.
It is as easy as that
The security lies in that you will have to mount your secret to make it visible.Now I found those commands a bit hard to remember so I made myself an alias
Code: Select all
alias mountsecret='encfs ~/.secret ~/secret'and to unmount it
Code: Select all
alias umountsecret='fusermount -u ~/secret'Naturally you can pick some other names than "mountsecret" and "umountsecret".
You can also install a GUI (from AUR in the Arch world) like gencfs it will make the mounting and unmounting real easy:

