Hacker News new | ask | show | jobs
by jnwatson 1790 days ago
Why in the world do they ship unencrypted drives around?

Drive encryption is pretty standard these days, isn't it?

2 comments

With the big cloud provides its a trivial checkbox.

Can anyone speak to the effort in doing it at the OS level?

There's a checkbox to encrypt the disks when installing some linux distros.
> There's a checkbox to encrypt the disks when installing some linux distros.

While I'm not going to defend moving around unencrypted disks it is not as simple as that.

The difficult part is not the encryption. The difficult part is the key management of the encryption. You need to solve issue like ensuring you don't lose access to the keys (and thereby access to the data), securely providing keys to people and machines that need access, dealing with key revocation when people leave the company, etc.

Though I guess in this case using a simple (long enough) passphrase instead of some form of keys could have saved them from this particular threat.

When I ran a cloud provider, we used a hardware security module on storage systems which had public/private key pair which could be used to decrypt the header on the disk which contained a copy of the symmetric cipher key. Each header had the symmetric cipher key encrypted with multiple different public keys, including a fallback whose private key only existed in on paper in a vault.

Each system could reach out to other storage systems to ask them to use their private key to decrypt the header (for example if their hardware security module had failed), but in some configurations this would require an operator to intervene to enter in passphrase to unlock the hardware security module to authorize the action.

This means that:

1. The symmetric cipher key could always be recovered, even from paper backup

2. Having physical access to a disk or any set of disks did not allow you to read the data

3. Having physical access to a disk and a hardware security module did not allow you to read the disk (unless you knew the passphrase, which was always present, and user set)

4. Having physical access to disks, servers, and hardware security module may not allow you to read the data (in the more secure configuration where passphrases were not cached on disk -- but this meant that rebooting required an operator to manually enter the password at boot)

5. The set of valid public keys could be changed frequently (this was indeed automated and only the set of currently active hardware security modules could decrypt the current disk header)

Of course you could always short circuit this by making a copy of the symmetric key when you did have access (e.g., `dmsetup table --showkeys`) but without putting some more hardware in the fast/hot path that was unavoidable. The symmetric key could not easily be changed, without rewriting the entire disk (though since it was a storage system designed to accommodate multiple failures, this wasn't that hard, but we didn't do it automatically)

The hardware security modules we used were FIPS 140-2 validated and physically connected to the racks (though it would be possible to cut them away). It would also be possible to spy on the APDUs sent to the modules to capture the decrypted data, since there was not mutual authentication (it was in the works though).

This is exactly why most of us are more than happy to pay a premium to AWS, GCP, and Azure. They reduce all what you listed to a handful of checkboxes for us plebs. You have to have a few discussions about how you as an org will manage your keys, and you're a couple of terraform files away for having access to this (budget notwithstanding).

This is the level of redundancy/backups/processes the large cloud providers have. It's not just "hey is this encrypted" – it's "what happens, how do you retire a drive, are the modules FIPS 140-2 compliant, how do we physically secure our HSMs?" etc

It's just so much more than "hey Digital Ocean is 50% cheaper"

AWS's egress bandwidth charges still feel criminal though.

We were a relatively small cloud provider, but all disks were encrypted so at least we wouldn't leak someone's data if we had to replace a disk.
It's perhaps worth mentioning Mandos for unattended booting of servers with encrypted root https://www.recompile.se/mandos
Is there anything on the consumer level like this?
Well, a lot of laptops these days have TPMs that can store disk encryption keys. BitLocker on Windows, or an exotic dm-crypt setup on Linux.

However for a server, the chance of a thief getting a disk and the HSM at the same time is low; and you really don't want to have to enter a password every boot. So the HSM design delivers some benefits worth having.

Whereas for a laptop, you can easily type in a password; and the chance of a thief snatching the disk and TPM at the same time is basically 100%. So there hasn't been a big push among Linux users to start using the TPM.

It was all made out of parts with standardized interfaces, so components could be consumer equipment.

I also used the same software on my laptop to encrypt it. It's nothing fancy, just using the dm-crypt kernel module and any kind of hardware security module that talks PKCS#11 (which is all of them); On my laptop I just used my existing smartcard (which I used to login to the system and remote systems).

The disk header was just text occupying the first 4MiB of the disk in 2 circular buffers similar to LVM (though 2 copies for redundancy).

Purism will sell you a setup with the Librem laptop and hardware key, which has some verification of the system firmware as well as, presumably, supporting disk decryption. I'm not sure how much extra that gives you over fairly generic hardware tokens with LUKS encryption. Apparently LUKS2 supports FIDO2 keys, which may be the cheapest.
I thought any of these providers always encrypted with their own key whether you encrypted on top of that or not. But I guess not.

Yet another reason to just stick with the big providers. They seem to have pretty serious compliance needs and encrypt no matter what. (Yet you should still encrypt your assets, but I believe they all encrypt their volumes anyway and have pretty strict policies on how to dispose this kind of hardware)

It is trivial in the Ubuntu installer.
It's not trivial when it comes to a server. Sure, you can tick that checkbox you'll enable encryption, but when you reboot you realize that you can't actually SSH in it, as it's waiting for a key to be entered on the physical console.

Entering (and managing) that key is the hard part.

That's what Dropbear is supposed to do, it can be included in the initramfs of a server: https://matt.ucc.asn.au/dropbear/dropbear.html

Disclaimer: I still didn't try it myself yet, but it's on my (too long) list of things to do.

[I don't think it has to be dropbear specifically.] https://nixos.wiki/wiki/Remote_LUKS_Unlocking has a recipe also including Tor. You still have to be present to unlock the system, unlike with Mandos -- which I wish I'd been able to set up for our office, even before the Great Work From Home.
They say they’re iso27001 compliant and certified. If they aren’t encrypting in transit, it’s hard to see how they actually can be.
Are you sure they're actually saying that?

A lot of hosting providers actually say that their data centers are ISO 27001 compliant, but that doesn't make the provider itself compliant

(and it seems scaleway is still doing that too on https://www.scaleway.com/en/datacenter/)

Well, that’s ridiculous - an asset cannot be compliant - an organisation, and their processes and controls are what are meant to be compliant.

If just their data centres are compliant, I guess there’s nothing to stop their staff or contractors just stealing data, as they have here - as compliance purely around physical security for a data centre is 100% meaningless if you’re just ignoring cryptographic controls and human security controls.

I’m guessing their certification body isn’t themselves certified. Actually, the fact that they neither say who their certifying body is nor include a link to their certificate, suggests to me that they are lying - which is far more common than you would think.

I assume they don't mean to refer to the physical building, but to the organisation responsible for the building and its physical security. Anyway that's a thing for auditors to have fun with (so you say you're hosting provider is certified, can you show me their certificate?) as you're not supposed to lean on their website information anyway.

I don't think many of the competitors in this space (eg Linode and DigitalOocean) own their datacenters either.

As Linode put it: Linode as an entity is not ISO27001 and we rely on the data centers we colocate with to obtain and maintain these certifications

Or DigitalOcean in 2017: Our FRA1 facility is ISO9001:2008, ISO27001:2005, and ISO22301:2012 certified.

(DigitalOcean later got their own certification)