Encrypting cuda sections in .exe file

(I’m having a windows 7 environment)
I am looking for a way to keep cuda code secret.

Can I take an executable, encrypt its cubin sections and then execute it, but only the cubin-loader will decrypt those sections it needs?

The NVIDIA CUDA toolchain doesn’t provide any built-in support for module encryption. However, using the driver API, I believe it should be possible to load an encrypted module from disk, decrypt it, and then provide that decrypted resource via the image pointer to cuModuleLoadDataEx:


For a general understanding of how to use cuModuleLoadDataEx, refer to any of the CUDA sample codes that use it, such as vectorAddDrv.

Great reply,
This looks interesting to me. Decrypting myself is preferable anyway to me.

You may want to read this for extra information:

I am also interested in the thing, but as Njuffa normally says, a determined attacker will break the protection.

I like that paper. However, it shows me that cuda protection still has a long way to go.