Dropbox Encryption - Install EncFS on OSX to encrypt-decrypt Dropbox content realtime

Submitted by Janak on Mon, 05/09/2011 - 01:16

If you have been following the recent Dropbox news, you might have some serious concerns about privacy and security of your data. If, like me you do not "trust" anyone with your data, here is a quick guide to how you can get started with EncFS for realtime -on the fly- encryption of your dropbox contents.

wait... BUT..... what is EncFS??

Here is a quote from wikipedia

EncFS is a Free (GPL) FUSE-based cryptographic filesystem that transparently encrypts files, using an arbitrary directory as storage for the encrypted files.

Two directories are involved in mounting an EncFS filesystem: the source directory, and the mountpoint. Each file in the mountpoint has a specific file in the source directory that corresponds to it. The file in the mountpoint provides the unencrypted view of the one in the source directory. Filenames are encrypted in the source directory.

Files are encrypted using a volume key, which is stored encrypted in the source directory. A password is used to decrypt this key.

and, ERM what about FUSE/MacFUSE??

I thought you might ask, quote from Wikipedia:

Filesystem in Userspace (FUSE) is a loadable kernel module for Unix-like computer operating systems that lets non-privileged users create their own file systems without editing kernel code. This is achieved by running file system code in user space while the FUSE module provides only a "bridge" to the actual kernel interfaces.

How to install and setup EncFS on OSX

Create a new secure EncFS Volume on OSX

macbook:~ janaksingh$ encfs ~/Dropbox/encfs ~/Documents/encfs
The directory "/Users/janaksingh/Dropbox/encfs/" does not exist. Should it be created? (y,n) y
The directory "/Users/janaksingh/Documents/encfs" does not exist. Should it be created? (y,n) y
Creating new encrypted volume.
Please choose from one of the following options:
 enter "x" for expert configuration mode,
 enter "p" for pre-configured paranoia mode,
 anything else, or an empty line will select standard mode.
?> p
Paranoia configuration selected.
Configuration finished.  The filesystem to be created has
the following properties:
Filesystem cipher: "ssl/aes", version 2:1:1
Filename encoding: "nameio/block", version 3:0:1
Key Size: 256 bits
Block Size: 512 bytes, including 8 byte MAC header
Each file contains 8 byte header with unique IV data.
Filenames encoded using IV chaining mode.
File data IV is chained to filename IV.
-------------------------- WARNING --------------------------
The external initialization-vector chaining option has been
enabled.  This option disables the use of hard links on the
filesystem. Without hard links, some programs may not work.
The programs 'mutt' and 'procmail' are known to fail.  For
more information, please see the encfs mailing list.
If you would like to choose another configuration setting,
please press CTRL-C now to abort and start over.
Now you will need to enter a password for your filesystem.
You will need to remember this password, as there is absolutely
no recovery mechanism.  However, the password can be changed
later using encfsctl.
New Encfs Password: test
Verify Encfs Password: test

Verify if the EncFS encryption actually worked!!

Unencrypted version accessible from ~/Documents/encfs/

macbook:~ janaksingh$ cd ~/Documents/encfs/
macbook:encfs janaksingh$ ls -la
total 16
drwx------   4 janaksingh  staff  136  9 May 00:50 .
drwx------+ 15 janaksingh  staff  510  9 May 00:19 ..
-rw-r--r--   1 janaksingh  staff   40  9 May 00:50 readme.txt
macbook:encfs janaksingh$ cat readme.txt 
The Magic Words are Squeamish Ossifrage

Encrypted version accessible from ~/Dropbox/encfs/

macbook:encfs janaksingh$ cd ~/Dropbox/encfs/
macbook:encfs janaksingh$ ls -la
total 16
drwx------   4 janaksingh  staff  136  9 May 00:50 .
drwxr-xr-x@ 14 janaksingh  staff  476  9 May 00:19 ..
-rw-r-----   1 janaksingh  staff  239  9 May 00:20 .encfs5
-rw-r--r--   1 janaksingh  staff   56  9 May 00:50 uQPP2N9dFOOLkm9IsjDzkdkr
macbook:encfs janaksingh$ cat uQPP2N9dFOOLkm9IsjDzkdkr
X "?H??X??MW(S????X[??;

Works rather well ;)

Further Reading

How to increase the privacy and the safety of your data on Dropbox
Dropbox Encryption w/ EncFS on MacOS X