---
title: "Adventures with eDrive: Accelerated SSD Encryption on Windows"
url: "/articles/adventures-with-edrive-accelerated-ssd-encryption-on-windows"
type: article
date: 2016-06-08
updated: 2021-01-12
---

# Adventures with eDrive: Accelerated SSD Encryption on Windows

#  Adventures with eDrive: Accelerated SSD Encryption on Windows 

 Plumbing the depths of BitLocker disk encryption

 By

 [  Andrew Berry   ](/about/andrew-berry) 

 June 8, 2016

  

As we enter the age of [ISO 27001](https://en.wikipedia.org/wiki/ISO/IEC_27001:2013), data security becomes an increasingly important topic. Most of the time, we donâ&#128;&#153;t think of website development as something that needs tight security on our local machines. Drupal websites tend to be public, have a small number of authenticated users, and, in the case of a data disclosure, sensitive data (like API and [site keys](http://cgit.drupalcode.org/drupal/tree/sites/default/default.settings.php?h=8.0.x#n271)) can be easily changed. However, think about all of the things you might have on a development computer. Email? Saved passwors that are obscured but not encrypted? Passwordless SSH keys? Login cookies? There are a ton of ways that a lost computer or disk drive can be used to compromise you and your clients.

If youâ&#128;&#153;re a Mac user, [FileVault 2 is enabled by default](https://www.theguardian.com/technology/2014/oct/17/apple-defies-fbi-encryption-mac-osx), so youâ&#128;&#153;re likely already running with an encrypted hard drive. Itâ&#128;&#153;s easy to check and enable in System Preferences. Linux users usually have an encrypted disk option during install, as [shown in the Ubuntu installer](https://thesimplecomputer.info/full-disk-encryption-with-ubuntu). Like both of these operating systems, Windows supports software-driven encryption with [BitLocker](https://en.wikipedia.org/wiki/BitLocker).

I recently had to purchase a new SSD for my desktop computer, and I ended up with the Samsung 850 EVO. Most new Samsung drives support a new encryption technology called "eDrive".

But wait - donâ&#128;&#153;t most SSDs already have encryption?

The answer isâ&#128;¦ complicated.

SSDs consist of individual cells, and each [cell has a limited number of program/erase (PE) cycles](https://www.cnet.com/how-to/storage-talk-understanding-your-solid-state-drive/). As cells reach their maximum number of PE cycles, they are replaced by spare cells. In a naive scenario, write activity can be concentrated on a small set of sectors on disk, which could lead to those extra cells being used up prematurely. Once all of the spare blocks are used, the drive is effectively dead (though you might be able to read data off of it). Drives can last longer if they spread writes across the entire disk automatically. You have data to save, that must be randomly distributed across a disk, and then read back together as needed. Another word for that? Encryption! [As the poster on Stack Overflow says](https://superuser.com/a/986392), it truly is a ridiculous and awesome hack to use encryption this way.

What most SSDs do is they have an encryption key which secures the data, but is in no way accessible to an end user. Some SSDs might let you access this through the ATA password, but there are concerns about that level of security. In general, if you have possession of the drive, you can read the data. The one feature you do get "for free" with this security model is [secure erase](https://en.wikipedia.org/wiki/Parallel_ATA#HDD_passwords_and_security). You donâ&#128;&#153;t need to overwrite data on a drive anymore to erase it. Instead, simply tell the drive to regenerate its internal encryption key (via the ATA secure erase command), and BAM! the data is effectively gone.

All this means is that if youâ&#128;&#153;re using any sort of software-driven encryption (like OS Xâ&#128;&#153;s FileVault, Windows BitLocker, or dm-crypt on Linux), youâ&#128;&#153;re effectively encrypting data twice. It works, but itâ&#128;&#153;s going to be slower than just using the AES chipset your drive is already using.

eDrive is a Microsoft standard based on [TCG Opal](https://en.wikipedia.org/wiki/Hardware-based_full_disk_encryption) and [IEEE 1667](https://en.wikipedia.org/wiki/IEEE_1667) that gives operating systems access to manage the encryption key on an SSD. This gives you all of the speed benefits of disk-hosted encryption, with the security of software-driven encryption.

Using eDrive on a Windows desktop has a pretty strict set of requirements. Laptops are much more likely to support everything automatically. Unfortunately, this article isnâ&#128;&#153;t going to end in success (which Iâ&#128;&#153;ll get to later), but it turns out that removing eDrive is much more complicated than youâ&#128;&#153;d expect. Much of this is [documented in parts](https://arstechnica.com:443/civis/viewtopic.php?f=11&amp;t=1282525) on [various forums](http://forums.anandtech.com/showthread.php?t=2366848), but Iâ&#128;&#153;m hoping to collect everything here into a single resource.

## The Setup

- An SSD supporting eDrive and "ready" for eDrive
- Windows 10, or Windows 8 Professional
- [A UEFI 2.3.1 or higher motherboard](https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/hh831627(v=ws.11)?redirectedfrom=MSDN), without any CSMs (Compatibility Support Modules) enabled, supporting `EFI_STORAGE_SECURITY_COMMAND_PROTOCOL`
- A UEFI installation of Windows
- (optionally) a TPM to store encryption keys
- No additional disk drivers like Intelâ&#128;&#153;s Rapid Storage Tools for software RAID support
- An additional USB key to run secure erases, or an alternate boot disk
- If you need to disable eDrive entirely, an alternate Windows boot disk or computer

Iâ&#128;&#153;m running Windows 10 Professional. While Windows 10 Home supports BitLocker, it forces encryption keys to be stored with your Microsoft account in the cloud. Honestly for most individuals I think thatâ&#128;&#153;s better than no encryption, but Iâ&#128;&#153;d rather have solid backup strategies than give others access to my encryption keys.

Determining motherboard compatibility can be very difficult. I have a [Gigabyte GA-Z68A-D3-B3](https://www.gigabyte.com/products/product-page.aspx?pid=3863), which was upgraded to support UEFI with a firmware update. However, there was no way for me to determine what version of UEFI it used, or a way to determine if `EFI_STORAGE_SECURITY_COMMAND_PROTOCOL` was supported. The best I can suggest at this point is to try it with a bare Windows installation, and if BitLocker doesnâ&#128;&#153;t detect eDrive support revert back to a standard configuration.

## The Install

Samsung disk drives do not ship with eDrive enabled out of the box. That means you need to connect the drive and install Samsungâ&#128;&#153;s Magician software to turn it on before you install Windows to the drive. You can do this from another Windows install, or install bare Windows on the drive knowing it will be erased. Install the Magician software, and set eDrive to "Ready to enable" under â&#128;&#156;Data Securityâ&#128;&#157;.

         ![Enable eDrive](/sites/default/files/styles/wide_xs/public/assets/2016-06/image_0.png.webp?itok=qtBxImqo "image_0.png")  

After eDrive is enabled, you must run a secure erase on the disk. Magician can create a USB or CD drive to boot with, or you can use any other computer. If you get warnings about the drive being "frozen", donâ&#128;&#153;t ignore them! Itâ&#128;&#153;s OK to pull the power on the running drive. If you skip the secure erase step, eDrive will not be enabled properly.

Once the disk has been erased, remove the USB key and reboot with your Windows install disk. You must remove the second secure erase USB key, or Windowâ&#128;&#153;s boot loader will fail (#facepalm). Make sure that you boot with UEFI and not BIOS if your system supports both booting methods. Install Windows like normal. When you get to the drive step, it shouldnâ&#128;&#153;t show any partitions. If it does, you know secure erase didnâ&#128;&#153;t work.

After Windows is installed, install Magician again, and look at the security settings. It should show eDrive as "Enabled". If not, something went wrong and you should secure erase and reinstall again. However, itâ&#128;&#153;s important to note that â&#128;&#156;Enabledâ&#128;&#157; here **does not mean secure**. Anyone with physical access to your drive can still read data on it unless you turn on BitLocker in the next step.

         ![eDrive enabled](/sites/default/files/styles/wide_xs/public/assets/2016-06/image_1.png.webp?itok=6sXW-9hh "image_1.png")  

## Turning on BitLocker

Open up the BitLocker control panel. If you get an error about TPM not being available, you can enable encryption without a TPM by following this [How-To Geek article](https://www.howtogeek.com/howto/6229/how-to-use-bitlocker-on-drives-without-tpm/). As an aside, I wonder if there are any motherboards without a TPM that have the proper UEFI support for hardware BitLocker. If not, the presence of a TPM (and SecureBoot) might be an easy way to check compatibility without multiple Windows installs.

Work your way through the BitLocker wizard. The make or break moment is after storing your recovery key. If youâ&#128;&#153;re shown the following screen, you know that your computer **isnâ&#128;&#153;t** able to support eDrive.

         ![Shows that eDrive isn't working](/sites/default/files/styles/wide_xs/public/assets/2016-06/image_2.png.webp?itok=BMpmjGJl "image_2.png")  

You can still go ahead with software encryption, but you will lose access to certain ATA features like [secure erase unless you disable eDrive](http://forums.anandtech.com/showthread.php?t=2366848). If you donâ&#128;&#153;t see this screen, go ahead and turn on BitLocker. It will be enabled instantly, since all it has to do is encrypt the eDrive key with your passphrase or USB key instead of rewriting all data on disk.

## Turning off eDrive

Did you see that warning earlier about being unable to turn off eDrive? Samsung in particular hasnâ&#128;&#153;t publically released a tool to disable eDrive. To disable eDrive, you need physical access to the drive so you can use the PSID printed on the label. You are supposed to use a manufacturer supplied tool and enter this number, and it will disable eDrive and erase any data. I canâ&#128;&#153;t see any reason to limit access to these tools, given you need physical access to the disk. Thereâ&#128;&#153;s also a Free Software implementation of these standards, so itâ&#128;&#153;s not like the API is hidden. The Samsung PSID Revert tool is out there thanks to a Lenovo customer support leak (hah!), but I canâ&#128;&#153;t link to it here. Samsung wonâ&#128;&#153;t provide the tool directly, and require drives to be RMAâ&#128;&#153;ed instead.

For this, Iâ&#128;&#153;m going to use open-source [Self Encrypting Drive tools](https://github.com/Drive-Trust-Alliance/exec). I had to manually download the [2010](https://www.microsoft.com/en-ca/download/details.aspx?id=5555) and [2015 VC++ redistributables](https://www.microsoft.com/en-ca/download/details.aspx?id=48145) for it to work. You can actually run it from within a running system, which leads to hilarious Windows-crashing results.

```
C:\Users\andre\msed> msed --scan
C:\Users\andre\msed> msed --yesIreallywanttoERASEALLmydatausingthePSID <YOURPSID> \\.\PhysicalDrive?

```

At this stage, your drive is in the "Ready" state and still has eDrive enabled. If you install Windows now, eDrive will be re-enabled automatically. Instead, use another Windows installation with Magician to disable eDrive. You can now install Windows as if youâ&#128;&#153;ve never used eDrive in the first place.

## Quick Benchmarks

After all this, I decided to run with software encryption anyways, just like I do on my MacBook with FileVault. On an i5-2500K, 8GB of RAM, with the aforementioned Samsung 850 EVO:

### Before Turning On BitLocker

         ![Performance before BitLocker](/sites/default/files/styles/wide_xs/public/assets/2016-06/image_3.png.webp?itok=08-eVdVM "image_3.png")  

### After BitLocker

         ![Performance after BitLocker](/sites/default/files/styles/wide_xs/public/assets/2016-06/image_4.png.webp?itok=09wyCL9u "image_4.png")  

### After Enabling RAPID in Magician

RAPID is a Samsung provided [disk filter](https://learn.microsoft.com/windows-hardware/drivers/ifs/attaching-a-filter-to-a-file-system-or-volume) that aggressively caches disk accesses to RAM, at the cost of increased risk of data loss during a crash or power failure.

         ![Off-the-wall performance is easy when you ignore reliability](/sites/default/files/styles/wide_xs/public/assets/2016-06/image_5.png.webp?itok=R4Pz2oUW "image_5.png")  

As you can see, enabling RAPID (6+ GB a second!) more than makes up for the slight IO performance hit with BitLocker. Thereâ&#128;&#153;s a possible CPU performance impact using BitLocker as well, but in practice with Intelâ&#128;&#153;s AES crypto extensions I havenâ&#128;&#153;t seen much of an impact on CPU use.

A common question about BitLocker performance is if there is any sort of impact on the TRIM command used to maintain SSD performance. Since BitLocker runs at the operating system level, as long as you are using NTFS [TRIM commands are properly passed through to the drive](http://blogs.msdn.com/b/e7/archive/2009/05/05/support-and-q-a-for-solid-state-drives-and.aspx?Redirected=true).

## In Closing

I think itâ&#128;&#153;s fair to say that if you want robust and fast SSD encryption on Windows, itâ&#128;&#153;s easiest to buy a system pre-built with support for it. In a build-your-own scenario, you still need at least two Windows installations to configure eDrive. Luckily Windows 10 installs are pretty quick (10-20 minutes on my machine), but itâ&#128;&#153;s still more effort than it should be. Itâ&#128;&#153;s a shame MacBooks donâ&#128;&#153;t have support for any of this yet. Linux support is [functional for basic use](https://github.com/Drive-Trust-Alliance/sedutil), with a new release coming out as I write. Otherwise, falling back to software encryption like regular BitLocker or FileVault 2 is certainly the best solution today.

*Header photo is a [Ford Anglia Race Car, photographed by Kieran White](https://commons.wikimedia.org/wiki/File:Ford_Anglia_Race_Car_(15802254501).jpg)*

 Published in:

- [  Security   ](/topics/security)
- [  System Administration   ](/topics/system-administration)

 

   You must have JavaScript enabled to use this form.

## Get in touch with us

### Tell us about your project. We'd love to hear from you!

 First Name  

 Last Name  

 Your email address  

 Your organization  

 How you heard about us  

 Tell us more 

     Leave this field blank