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:

https://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__MODULE.html#group__CUDA__MODULE_1g9e8047e9dbf725f0cd7cafd18bfd4d12

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.
Thanks

You may want to read this for extra information:
http://xavierbellekens.com/publications/SIN16.pdf

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.