Overview
eCryptfs (SourceForge
page) is a POSIX-compliant enterprise-class stacked cryptographic
filesystem for Linux. It is derived from Erez Zadok's Cryptfs,
implemented through the FiST framework for generating stacked
filesystems. eCryptfs extends Cryptfs to provide advanced key
management and policy features. eCryptfs stores cryptographic metadata
in the header of each file written, so that encrypted files can be
copied between hosts; the file will be decryptable with the proper
key, and there is no need to keep track of any additional information
aside from what is already in the encrypted file itself. Think of
eCryptfs as a sort of ``gnupgfs.''
eCryptfs is a native Linux filesystem (other popular cryptographic
filesystems for Linux require FUSE or operate via RPC calls). The
kernel module component of eCryptfs is upstream in the Linux
kernel.
eCryptfs is undergoing a staged feature release process:
- Mount-wide passphrase, specified at mount time (complete)
- Encryption/decryption support (complete)
- Add cipher selection support (complete)
- Add mount-wide public key support, specified at mount time (complete)
- Storage of metadata in file extended attribute region (complete)
- PAM module (complete)
- Multiple keys per inode (complete)
- TPM key module (complete)
- PKCS#11 key module (complete)
- Integrity verification (in progress; preliminary patch here)
- Filename encryption support (in progress; preliminary patch here)
- GnuPG key module (in plan)
- Dynamic policy support (in plan)
To use eCryptfs, I recommend that you perform an overlay mount. You
can do this on any existing installed system by creating a directory
for your encrypted files and then by mounting that directory as an
eCryptfs filesystem:
mkdir /secret
mount -t ecryptfs /secret /secret
The eCryptfs mount helper will ask you a few questions about what
key you want to use, what cipher you want to use, and so forth. Once
mounted, you can read and write to /secret
, and your
files will be encrypted on disk. Also, make sure that you use dm-crypt
with a random key at boot on any swap space you may be using. See the
Linux Journal
article for some more details on this process.
Documentation
See the README that is distributed with the
eCryptfs source.
Read the FAQ.
Read the article on
eCryptfs. The content of this article was originally published in the
April 2007 edition of Linux Journal magazine. This article is now part
of the eCryptfs documentation.
Read the guide on setting up a
wrapped passphrase PAM mount.
Read the 2005 Ottawa Linux Symposium
paper on eCryptfs.
Read the original design
document detailing cryptographic properties of eCryptfs. Note
that, due to the nature of the Linux kernel development process, the
actual implementation may change at any time. Consult the source code
directly to get an accurate understanding of exactly what eCryptfs
does.
Credits
Michael Halcrow is the
lead developer.
Michael Thompson is a developer.
Phillip
Hellewell is the project maintainer.
Erez Zadok and his research team authored and maintain Cryptfs,
which is the basis from which eCryptfs was developed.
Many folks have contributed time and resources toward helping
eCryptfs become what it is today. These include Steve French (CIFS),
David Kleikamp (JFS), and many folks on various mailing lists.