Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

I was just wondering whether performing encryption on the GPU was safer than on the CPU, with regard to the difficulty of reading the encryption key from memory and/or various other hardware attacks.

I know there exists extensive literature about how to extract information from software cryptographic implementations but they mostly assume that a standard CPU is running the code. Can such attacks be extended to a GPU-style hardware architecture? Has it been done?

This could also be useful in general-purpose key management, where an encryption key must be kept secret for some duration. Instead of having it sit in memory, it could go into GPU memory (bonus: it can't be paged out to disk nor cached), and if you are doing the encryption within the GPU you don't even need to move it back and forth. But I'm sure there are GPU memory dump programs out there.

Does anyone have any experience with GPU cryptography and any possible weaknesses?

share|improve this question
2  
I think GPU-based cryptography is primarily used for performance. I've never heard of it being a security measure. –  Iszi Apr 11 '12 at 18:29
    
Yes of course the reason I use GPU is for performance, but I was concerned about the security risks it entailed. –  Thomas Apr 12 '12 at 4:19
add comment

1 Answer

up vote 6 down vote accepted

While it's true that GPU memory isn't paged out, all peripherals have addressable memory on the system and graphics cards have no special aspect about them that's designed with security in mind. It's an obscurity thing at best that somebody might not think to check there or the out-of-the-box tools don't address that space. Given proper drivers, GPU memory can be accessed via DMA, so you hard drive can write directly to the GPU if the CPU says to go for it.

Generally, all the available resources of a GPU are dedicated to graphics work. You'd have to fiddle with drivers to make them respect the space you're trying to use or it would risk being clobbered by various pixels of cats as you watch videos on YouTube.

If you're looking for a more secure use of hardware for encryption and key storage, it's best to look into dedicated units.

share|improve this answer
    
I am using OpenCL which allows for persistent buffers, so I wouldn't have to hack my way through allocating GPU memory. Good point about DMA, I guess a computer isn't the safest place for a key to be. –  Thomas Apr 12 '12 at 4:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.