Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Protecting crypto keys in RAM?

is there any way to protect encryption keys that are being stored in RAM from a freezer attack? (Sticking the computer in a freezer before rebooting malicious code to access the contents of RAM)

This seems to be a legitimate issue with security in my application.

EDIT: it's also worth mentioning that I will probably be making a proof of concept OS to do this on the bare metal, so keep in mind that the fewer dependencies, the better. However, TRESOR does sound really interesting, and I might port the source code of that to my proof of concept OS if it looks manageable, but I'm open to other solutions (even ones with heavy dependencies).

like image 887
coder543 Avatar asked Jun 17 '13 12:06

coder543


1 Answers

You could use something like the TRESOR Linux kernel patch to keep the key inside ring 0 (the highest privilege level) CPU debug registers only, which when combined with an Intel CPU that supports the AES-NI instruction, doesn't need to result in a performance penalty (despite the need for key recalculation) compared to a generic encryption implementation.

like image 128
Will Avatar answered Oct 01 '22 06:10

Will