Solid state memory device under magnification

How To Securely Erase My SSD?

Q. I have a used SSD [Solid State Drive] that I want to sell. How can I wipe it to ensure my deleted data cannot be later recovered?

A. Since opening it up and putting a nail through the NAND flash memory chips is not an option here, we’re looking for a reliable software approach that anyone can do.

The easy way is to download the manufacturer’s utility for whichever brand of SSD you have, such as Samsung Magician, Intel SSD Toolbox or SanDisk’s SSD Toolkit. You’re looking for an option in these utilities with a label or description that includes “secure erase”. For additional security, try encrypting your most private information first, prior to the erase process.

Now the longer route – if we understand the inner workings a little more, we can be more sure of our options and of the security of the outcome rather than simply clicking and trusting a manufacturer utility does what it says it does (which in most cases, it will – but can’t know for sure without testing).

Firstly, common to all SATA SSDs (and others) is an interpreter that will accept certain commands over the ATA interface. The ones we’re interested in are CRYPTOGRAPHIC ERASE and SECURITY ERASE UNIT. The former deletes and replaces the encryption key that your SSD uses when it performs writes and reads (to the best of my current understanding). After performing this, all data that existed on the SSD is rendered unreadable without the original encryption key, which has been overwritten and is theoretically gone for good. Follow the CRYPTO ERASE function with SECURITY ERASE, that is a command that executes even if interrupted after the removal of power (so use caution!) and should result in your SSD having been effectively* wiped.

*Why the asterisk? Due to how SSDs work, it’s not desirable to force all blocks to write as this increases wear unnecessarily. The SECURITY ERASE function should make the SSD erase its Flash Translation Layer table and all other internal data structures, then should mark all NVRAM as ’empty’. The remaining storage space is not always actually empty but is theoretically unreadable. Samsung SSDs do actually wipe all blocks (overwriting them with ‘FF’ pattern) while Corsair SSDs do not. In any case, combining the CRYPTOGRAPHIC ERASE and the SECURITY ERASE commands should ensure your data is utterly unrecoverable.

Q. How can I implement these two commands, CRYPTOGRAPHIC ERASE and SECURITY ERASE?

A. Good news, it’s usually fairly straightforward. For example, in Corsair’s utility, CRYPTOGRAPHIC ERASE is called PSID Revert while SECURITY ERASE is called Sanitize Drive. As usual, Google is your friend here. Use the manufacturer’s SSD utility for your brand of SSD and search the web for your brand of SSD and each of these two commands. If you’re stuck, you can always use a file shredding utility for specific files before simply running the ‘erase’ command for your brand of SSD, even taking the extra step of encrypting the files before shredding, before wiping.

A non brand-specific method is to use a tool in DOS such as the now-freeware licensed HDDErase (available here). This tool runs from a bootable DOS environment and requires you set your SSD to ‘IDE’ (sometimes called ‘Compatibility’) in your computer’s BIOS. The SSD must be connected directly by the SATA port rather than through a USB or other ‘external’ interface, as HDDErase issues commands directly over the ATA interface. The software as linked will walk you through the steps, though it’d be a good idea to disconnect all other drives in your system first so you can ensure you don’t accidentally wipe the wrong one – not even I can help you if this happens!

Security is a balance of convenience and effectiveness in many cases. I recommend you weigh up the value of the data you wish to delete with the time and effort you are willing to expend. The manufacturer’s utility will get you out of trouble most of the time.