fscrypt encrypts files and names, not every metadata field or online compromise
Filesystem-level encryption can protect a directory tree without encrypting the whole block device. Linux fscrypt marks a directory with an encryption policy, keeps the key material in the kernel while the filesystem is unlocked, and transparently encrypts regular files, directories, and symbolic links created below that policy. The threat model is narrower than many deployment diagrams imply.
The kernel documentation says offline protection covers file contents and filenames after a point-in-time compromise of block-device data, provided userspace selected a strong key. It does not protect non-filename metadata such as file size, permissions, timestamps, extended attributes, or the location of holes. It is also not guaranteed to preserve confidentiality or authenticity if an attacker can modify the filesystem offline before a later authorized use.
Key management remains the control
The kernel does not stretch a low-entropy passphrase by itself. If userspace derives the key from a password, it must use a proper password-based key derivation function. Key rotation, recovery, and destruction need the same ownership as any other encryption system. A backup that includes the encrypted files but not any usable recovery key is an availability failure. A backup that includes the key beside the data may remove much of the intended separation.
Hardware-wrapped keys can change the exposure model for some keys and file contents, but they do not cover every type of fscrypt subkey. The exact deployment needs a data-flow diagram. Which process unlocks the directory? Where is the key stored between boots? Who can invoke the unlock operation? What happens when the device is rebooted, suspended, or handed to support staff?
Online attacks need a separate answer
The documentation states that storage encryption has limited protection against online attacks. Once the filesystem is unlocked and the keys are in memory, an attacker with the right kernel or process access may reach plaintext or key material. Endpoint detection, privilege separation, memory-lifetime reduction and access logging remain relevant. Full-disk encryption and fscrypt are not substitutes for process isolation.
Applications should also review the non-encrypted metadata they rely on. An encrypted filename store can still reveal directory counts, write timing, and file sizes. A product that claims to hide all information about uploaded objects should document those residual signals instead of treating encryption as a blanket privacy property.
Test the actual lifecycle
Create a directory, unlock it, restart, and verify the expected lock state. Check an offline copy with the key unavailable. Test key rotation, backup restore, multiuser access, and deletion of the key material. Confirm that temporary files, exports, logs, and search indexes do not contain plaintext outside the encrypted tree.
The security decision is not whether fscrypt is enabled. It is which assets the policy protects, which metadata remains visible, and which process can still unlock them.
References
[1] Linux Kernel documentation, Filesystem-level encryption (fscrypt). https://docs.kernel.org/filesystems/fscrypt.html
[2] Linux Kernel documentation, fscrypt key and encryption policy details. https://docs.kernel.org/filesystems/fscrypt.html
Top comments (0)