1

There are "Average Joes" answers here for "Full disk encryption vs home folder encryption".

I have three use cases in the frame of professional activities with customers wanting their data secured:

  • Laptop for sales people (with data such as business strategy and opportunities, tenders, propositions, company economic data, etc)
  • Workstations or laptops for developpers (with data such as customer project requirements and technical information, and all project deliveries)
  • Workstations for staff (with data such as invoices, purchase orders, wages, etc)

Our main threats are :

  • to be fired by our customers if we have security issues
  • data leaks
  • laptop stolen by unknown hands

What are the pros and cons for security experts who can for example on Linux:

  • have a granular partition schema with encrypted partitions for /home, /boot, /tmp, /var/tmp, /var/log, /etc, /var/lib/mysql, /swap, etc
  • audit all user applications to check where files are created and redirect them into /home with simlinks
  • want to maximize available performances

Is it relevant (answer per OS appreciated)? If not, what is missing? How much performance gain can be expected?

  • I have added use cases and threats – lalebarde Nov 7 '18 at 8:57
2

I would just encrypt the entire disk. There's a little overhead that unless you measure load times, you cannot tell if the disk is encrypted or not1. Having a custom kernel module that inspects every write operation and redirects the destination to /home will surely have a bigger penalty on performance.

Encrypting the whole disk will prevent "data leakage", when you save data on the wrong partition by mistake and have to move it to the right place, and secure-delete the original file (unless you have SSD that will make secure-delete useless). It prevents the mental load of memorizing different passwords for different partitions.


1 I did a quick test on my computer, using dd iflag=direct to read 16MB from an encrypted filesystem and another un-encrypted one, the difference were about 2.5% (averaged between 5 runs). Mint 19, spinning rusty-plate based HDD, ext4, very low workload.

  • "Having a custom kernel module that inspects every write operation and redirects the destination to /home" : I had in mind only a simlink – lalebarde Nov 8 '18 at 9:07
5

It's not clear how you're defining "security experts". That term can mean different things to different people. It seems more like you're asking about advanced Linux users who know how to create granular encryption schemes.

As with anything involving security, it at least partly depends on what threat you're trying to protect against.

If you have a laptop that you carry around everywhere, and for which you are the sole operator, you might choose to keep most or all of it encrypted. Whereas, your workstation at your place of employment, or your kodi box at home, might not demand the same level of security. And if you are up against state-level actors, that's a completely different game to just wanting to be able to protect against casual theft.

You also need to consider the hardware. Solid state drives don't play particularly nicely with encryption.

On several of my machines I have a mix of rotational drives and SSDs. I put /var, /home and swap in LUKS partitions on the larger rotational drives and put / on an SSD. Given my threat model, this seems like a good compromise between getting the most utility out of the SSDs while still keeping most important data reasonably secure.

You mention directories like /tmp. Depending on your configuration/distribution, this will often be a tmpfs, i.e. it will be kept in memory. In that case, it will be both fast and also no need for encryption. If you're up against an actor that can perform cold boot attacks and extract the contents of a tmpfs, well, I guess you'll need to think about how to protect against that.

If you're up against a state level actor and you ever don't have complete provenance over the physical components of the device for their entire lifetime then all bets are off.

  • 3
    The average user isn't going to notice much of a performance difference between encrypting everything vs just a few partitions. As long as your CPU supports the AES-NI instruction set there is very little overhead. – AndrolGenhald Nov 6 '18 at 22:05
  • Yes, that's correct. It is why I said to use encryption on rotational drives. The question isn't whether to encrypt, but what to encrypt. – cryptarch Nov 6 '18 at 22:39
  • 1
    If you aren’t encrypting the root partition then anybody with physical access can change binaries, steal crypto keys etc. The impact on SSD speed is a small trade off compared to the benefits of full encryption. – David Nov 6 '18 at 22:50
  • Even though what I said about speed was a negligible part of the overall thesis (i.e. define your threat and know your system before making decisions), I have removed it because it is such a hot topic for "security experts". – cryptarch Nov 6 '18 at 23:09
  • I thought I had originally mentioned that if someone has physical access then all bets are off. I've edited the post to add that note. But in that case disk encryption won't protect you. Given physical access, there are all sorts of things that can be done to compromise encrypted drives. – cryptarch Nov 6 '18 at 23:15

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.