I'm wondering about the current best practices for ensuring data confidentiality on an SSD used as an OS boot drive (under Linux). Important considerations are:
- Ensures against data leakage in the usual conditions (stolen drive, &c.; protection of data in motion is of course a separate question)
- Allows for comprehensive and secure data erasure on demand, preferably under pure software control
- Does not overly interfere with normal usage
The obvious first step is to use full-disk encryption, here LUKS. This more or less satisfies condition 1 (or should). It also greatly helps condition 2, since in theory if the header is wiped the remainder of the data becomes permanently inaccessible. However, on an SSD there are some potential issues with this.
Question 1: What is the best way to securely erase a specific area (the LUKS header) from an SSD? The TRIM command is apparently intended for this, but I'm unsure of its reliability. On an HDD I would feel fairly confident just repeatedly overwriting the blocks in question, but apparently wear leveling can prevent this from working in SSD.
Question 2: Absent the ability to destroy the header alone, what about wiping the entire disk? Intuitively, repeatedly overwriting the entire disk should prevent wear leveling from being a problem, since all sectors would eventually be overwritten. However, this seems unwise to rely on, given the possibility of e.g. still-readable sectors being marked bad and excluded from the mapping table. Is the Secure Erase command now reliable? There's a study from around 2010 that says that it was not in many disks then available; do more recent data exist? (It seems that at least some disks now use their own internal encryption, and implement Secure Erase by overwriting the keys used there. This is fine, if it actually works, but closed-source and non-auditable mechanisms implemented within the drive itself don't fill me with confidence.)
There's also the possibility of using something like LUKS' detached-header mode to prevent key data from ever being stored on the SSD itself. This would require some nonstandard configuration on the system, but nothing unreasonably difficult. However, it does introduce a chicken-and-egg problem of ensuring that the device with the header is itself secure and capable of erasure. If I store the header on a separate SD card or flash drive, is erasing this actually any easier? What other kind of device could be used?