I read a lot of posts on SSD wear and full disk encryption awhile back. Many are dated or conflicting, but the general consensus seemed to be that full disk encryption through LUKS or another full disk encryption software doesn't add significant wear to modern SSDs. However, a lot of information beyond that seemed to be all over the place.

I read some things here and there that made it seem like using home folder encryption for user accounts on Linux might add additional wear on an SSD, especially if the SSD was already running full disk encryption. The same with other encrypted files, such as large Truecrypt/Veracrypt containers.

I'm considering adding other user accounts to a Debian 10 install on a Samsung 860 EVO with LUKs full disk encryption, so I'm thinking about setting up home folder encryption (mostly to keep other users from snooping in other people's home folders). Will it add significant wear to my SSD or is it a non-issue? I would appreciate feedback as well as any relevant comments about the current state of encryption wear on modern SSDs.



Encrypting a blank partition

Usually, no. Running cryptsetup format just initializes a small header at the beginning of the partition, and does nothing else.

However, if you want to zero-fill the encrypted partition (for privacy, as noted below) that'll of course need to rewrite every single sector, causing wear.

Encrypting an existing partition with data on it

Yes. The initial encryption process will of course need to rewrite every plaintext sector with its encrypted version. (The encryption tools on Linux will rewrite the entire disk, while BitLocker on Windows will only rewrite the in-use areas.)

Using the encrypted disk day-to-day

No. Full-disk encryption algorithms/modes are selected to not increase the data size and to not require propagating changes to nearby sectors (often at the cost of some integrity assurance), so one input sector causes exactly one encrypted sector to be written.

However, you will need to decide whether you want to use TRIM on the encrypted disk:

  • Allowing TRIM might help the SSD's wear leveling, but will reveal which disk areas are in use or free (all files will be encrypted, of course, but they'll be surrounded by trimmed areas which will be seen as all-zero).
  • Disabling TRIM will improve privacy, but will might reduce the SSD's write performance.
  • Disabling TRIM and zero-initializing the encrypted disk before use will cause a significant amount of writes (the entire disk will be rewritten exactly once).

Encryption doesn't add writes to an existing stream; it modifies the data before being written.

But: for full disk encryption to be as effective as possible, it's suggested the entire device be first overwritten with random data and that TRIM not be used.

This has an impact on TRIM and flash allocation. An SSD where every sector has been written and needs to be kept might be suffering write amplification and may suffer increased wear. SSDs need TRIMed/erased areas to keep device performance high and prevent moving data internally to accomodate new data.

If TRIM is used and/or the device is not written with random data first, an attacker can look at the device and determine how much and where you've written to the device. This is a side-channel style attack that could leak some information, but not the content of it.

Solid state drive users should be aware that, by default, TRIM commands are not enabled by the device-mapper, i.e. block-devices are mounted without the discard option unless you override the default.

The device-mapper maintainers have made it clear that TRIM support will never be enabled by default on dm-crypt devices because of the potential security implications. Minimal data leakage in the form of freed block information, perhaps sufficient to determine the filesystem in use, may occur on devices with TRIM enabled. An illustration and discussion of the issues arising from activating TRIM is available in the blog of a cryptsetup developer. If you are worried about such factors, keep also in mind that threats may add up: for example, if your device is still encrypted with the previous (cryptsetup <1.6.0) default cipher --cipher aes-cbc-essiv, more information leakage may occur from trimmed sector observation than with the current default.

Read the reference for all the details.

If you don't overwrite the device with random data and you enable TRIM passthrough, it doesn't increase wear on your SSD or affect the performance.

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.