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). ==See also==