EncFS

EncFS
Developer(s) Valient Gough
Stable release 1.8.1 / March 24, 2015
Operating system Linux, FreeBSD, Mac OS X,[1] Windows ("encfs4win" port)[2] (also Safe, an alternative Mac OS X and Windows port)
Type filesystem, encryption
License LGPL
Website EncFS home

EncFS is a Free (LGPL) FUSE-based cryptographic filesystem. It 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.

Common uses

Advantages

EncFS offers several advantages over other disk encryption software simply because each file is stored individually as an encrypted file somewhere else in the host's directory tree.

Disadvantages

There are some drawbacks to using EncFS.

Compatibility

EncFS volumes cannot be formatted with an arbitrary filesystem. They share the same features and restrictions as the filesystem containing the source directory.

No support for very long filenames

Due to encryption, the filenames for encrypted files produced by EncFS are longer than the original filenames. Therefore, filenames whose length is close to the maximum supported by the filesystem cannot be stored by EncFS, since they will exceed the length limit after encryption. Most filesystems limit filenames to 255 bytes; in that case, EncFS only supports filenames up to 190 bytes.[3][4]

General security concerns

Anyone having access to the source directory is able to see how many files are in the encrypted filesystem, what permissions they have, their approximate size, and the last time they were accessed or modified, though the file names and file data is encrypted.[5]

EncFS 1.8 security concerns

The announcement of EncFS 1.8 included several underlying design changes, acknowledging the security concerns raised in the previous audit. However, certain concerns still remain regarding those vulnerabilities:[6]

EncFS 1.7 security concerns

A paid security audit was conducted in February 2014, which revealed several potential vulnerabilities. It concludes:[7]

EncFS is probably safe as long as the adversary only gets one copy of the ciphertext and nothing more. EncFS is not safe if the adversary has the opportunity to see two or more snapshots of the ciphertext at different times. EncFS attempts to protect files from malicious modification, but there are serious problems with this feature.

Filesystem options

When creating a new EncFS volume, several different options are available to customize the filesystem to suit various needs.

Cipher algorithm

EncFS uses whatever ciphers it is able to locate in various encryption libraries on the system. Blowfish and AES are typically available.

The cipher key length (keySize) can be selected for ciphers that support variable key lengths.

Block size

Each file is encrypted in blocks, and this option controls what size those blocks are. Each time a single byte is read the entire block it is contained in must be decrypted. Likewise, for each write the block must be decrypted, altered, and re-encrypted.

The default block size of 1024 is sufficient for most purposes.

Filename encoding

Filenames in the source directory can be plain or encrypted in block or stream mode. Block mode obscures the filename length somewhat, while stream mode keeps them as short as possible, which might save space on the source directory's filesystem depending on how that filesystem manages the directory tree.

Filename IV chaining

When enabled, the initialization vector for filename encryption is derived from the file's parent directories, causing two files with the same name but in different directories to have different encrypted filenames.

If a directory is renamed, all files and directories contained therein will need to have their encrypted filenames re-encrypted, which can be an expensive operation. This option should be disabled if heavily populated directories will be renamed often.

Per-file IV initialization vector

When enabled, each file is encrypted with a random 8-byte initialization vector, which is stored within the encrypted file in the source directory. If this option is disabled, each file is encrypted with the same initialization vector, which can make the volume key easier to break.

Enabling this option makes the filesystem more secure at the cost of an additional 8 bytes per file.

External IV chaining

Causes the file data initialization vector to be derived from the filename's initialization vector chain. The same data will be encrypted differently given a different filename or directory.

Consequently, renaming a file when this mode is enabled requires that either the file's random initialization vector be offset by the change in the filename initialization vector chain, or the data be re-encoded. The authors of EncFS have chosen the former route as it is considerably faster, especially for large files.

Filename to IV header chaining

Makes encoding depend on the full pathname. So renaming or moving means reencoding. Hardlinks are not supported.

Block MAC headers

Stores a checksum with each encrypted block, causing corruption or modification of the encrypted files to be detected by EncFS. The checksum (blockMACBytes) is 8 bytes, and optionally up to 8 additional bytes of random data (blockMACRandBytes) can be added to each block to prevent two blocks with the same unencrypted data from having the same checksum. This option creates a large amount of CPU overhead, as each block's checksum must be calculated when data is read (to verify integrity) or written (to update the checksum).

Secondary volumes

EncFS supports a somewhat primitive form of secondary volumes, that is, a single source directory offering different files given different passwords.

If EncFS is unable to decrypt a file with the volume key, it is ignored. If EncFS is forced to ignore an invalid password entry, the volume key will decode differently, and hence files will be encrypted and decrypted with a different key. This will present two different encrypted volumes given different passwords.

However, it is possible that two filenames on two different secondary volumes will be encrypted to the same filename. In this case, any other file will be overwritten with a new file being created. Note that this refers only to the encrypted filenames, not the unencrypted filenames. This danger can be averted by creating one directory per secondary volume and storing files in the only visible directory after a secondary volume is mounted.

Also, if the password is changed, the volume key will be re-encoded with the new password. This will cause secondary filesystems to vanish, as the volume key will no longer incorrectly decode to the same key for a given secondary password. If the primary password is changed back, the secondary filesystems will become available again.

The EncFS author does not support this technique.

See also

References

  1. http://www.arg0.net/
  2. "encfs4win - an experimental project of porting encfs to the Windows world". Retrieved 29 November 2013.
  3. "Issue #7 - alternative filename storage for very long filenames". github.com. 2014-08-22. Retrieved 2016-01-27. Long filenames can exceed the filesystem limits after encryption & encoding.
  4. "Manpage for enfs.1". manpages.ubuntu.com. Ubuntu. Retrieved 2016-01-27. If your underlying filesystem limits you to N characters in a filename, then EncFS will limit you to approximately 3*(N-2)/4. For example if the host filesystem limits to 256 characters, then EncFS will be limited to 190 character filenames. This is because encrypted filenames are always longer than plaintext filenames.
  5. "EncFS Directory Encryption Notes".
  6. "EncFS 1.8 Announcement".
  7. "EncFS Security Audit".

External links

This article is issued from Wikipedia - version of the Thursday, May 05, 2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.