1

If I understand it correctly, eCryptfs creates a file in the "lower" directory whose content is a header, plus the encryption of the file in the "upper" directory. But when I create an empty file in the "upper" directory, the file created in the "lower" directory is 8192 bytes. Where is it meaningful when eCryptfs introduces a 8K per-file overhead while the gpg encryption of the same empty file is less than 1K? Is there a way to adjust this header size in eCryptfs without compromising its security?

2
  • If it makes you feel better a 500 byte file almost certainly takes 4096 bytes on disk anyway due to the block size. Are you sure this is something you need to be concerned about? Small enough files can actually be stored with the inode data, but still, even if you're talking a million small files you're looking at an extra 8GB of storage (without counting the space taken by inodes), and having a million <1KB files isn't very common. – AndrolGenhald May 12 '20 at 12:34
  • @AndrolGenhald There is a use case. If you have a media server hosting a huge volume of pictures (user gravatars, etc.), then each thumbnail can take several KB. In this case using eCryptfs can double their size, which is not quite interesting. – Cyker May 12 '20 at 18:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.