2

It seems a lot of computers are switching to solid state drives, and one of the downsides of this is that it seems to make encryption of individual files basically useless, because when you encrypt a file, you can't securely get rid of the original (unencrypted) data. Repeatedly encrypting and decrypting files will result in lots of copies of the encrypted/decrypted files being left on your hard drive for an attacker to pick up.

Encryption of an entire drive is not really a good alternative. I read this paper that says that the key for whole drive encryption can be recovered from DRAM minutes or even hours after a computer is turned off. It's much more effective (not to mention efficient) to encrypt individual files that you want to keep secret, but with solid state drives, I'm not sure if that's really possible any more. Is there any way around this, using solid state drives?

  • OpenSSL is in the title and tag but seems to be missing from the body of your question. Consider updating to address OpenSSLs role in your query. – zedman9991 Dec 24 '15 at 14:13
  • 1
    A cold boot attack is difficult to execute, and full-disk encryption will thus protect you against the vast majority of likely data compromises. It's unlikely to be worth worrying about unless you have good reason to believe that a hostile government is targeting you specifically. – Mike Scott Dec 24 '15 at 14:30
  • @Mike Scott: Yeah, I haven't really read the entire paper yet. I was entertaining the idea of joining Anonymous, so it's a possibility that I might have a hostile government or two after me, though it's relatively unlikely. I just want to take whatever precautions are necessary. – Zen Hacker Dec 24 '15 at 14:38
  • It's only the original DDR and DDR2 DRAM which has data which persists for minutes or longer. Modern DRAM is DDR3 and even DDR4, which has data which vanishes in seconds. On top of that, modern DRAM has features which make cold boot attacks a bit harder (though not impossible) like memory scrambling and higher density. If you are using Linux, you can use a kernel patch called TRESOR which defeats cold boot attacks by keeping your encryption key in the CPU only, and never letting it touch RAM. – forest Apr 5 '16 at 1:06
8

A good alternative to individual files encryption is a crypto container or file vault: a single encrypted file containing a whole file system which you use to keep your secrets. Files inside the container are directly usable, so there is no need to create unencrypted copies.

The "cold boot" technique you mention can be used to attack individually encrypted files as well, so SSDs are not more vulnerable to it compared to HDDs.

  • Okay, that sounds like something to look into. Can you use AES-256 for that? I was thinking of going with AES-256, since it's the cipher that the FBI and the NSA use for all of their secrets. I'm very paranoid about people stealing my data. – Zen Hacker Dec 24 '15 at 14:20
6

Full-disk encryption is always the preferred way to go. Cold-boot attacks are not trivial and require expensive hardware, so it is always worth considering your threat levels. If your adversary is able to afford expensive hardware to perform a successful cryogenic passphrase extraction from RAM, they can probably afford to sniff your keystrokes via other means (such as by planting a microphone/camera in your room, etc). Implementing full disk encryption will offer the least hassle while providing best data-at-rest protection compared to file vaults or encrypting individual files.

2

Encryption of an entire drive is not really a good alternative. I read this paper that says that the key for whole drive encryption can be recovered from DRAM minutes or even hours after a computer is turned off.

Well, actually...

Whole disk encryption is a perfectly reasonable alternative, and probably your best bet. Just because a laboratory can create a scenario where encryption keys can be recovered from RAM doesn't mean that this can be done reliably (or even at all) in the field.

Another great option is encrypted file containers, which could include the same options useful for whole-disk encryption, but also tools like encfs which do file-by-file encryption and decryption on the fly. There are caveats to systems like this; they don't, for example, obscure most metadata like a file's size, permissions, change history, etc. On the other hand, you can encrypt storage that gets synced to places like dropbox, and you don't have to mount the filesystem when you're not using it.

Obviously you need to choose the system thats most appropriate for your usage case. But remember that encryption is about increasing attack cost, not about absolute invulnerability.

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.