Implementing RSA with small integers in CUDA I have found some researches dedicated for speeding-up RSA calculations using CUDA. But I am wondering how they do that, given that the biggest unsigned int that could be declared in CUDA is 64 bit.

Could anyone clarify this ambiguity for me?
It is of course possible to combine multiple operations on 64 bit or 128 bit to operations modulo $N$ where $N$ is a value up to $2^{1024}$, where 1024 bits is about the absolute minimum size for an RSA key (2048 bit is now being more common, at least 3072 bits is recommended).

For example, take a look at my 32 bit JCInteger class that I created for the 16 bit Java Card platform. Processors even only handle operations on single bits and combine them into 64 or 128 bit instructions resulting in operations in your GPU.

One problem is that modular exponentiation - the most inefficient part of RSA operations - can only be parallelized to a small extend, leading to speed ups of about 2 times single core operation. This is because the multiplications required to perform the exponentiation generally require the outcome of previous multiplications.

So what you will probably see is that 1-4 GPU threads (1 probably most common) will be used to implement modular exponentiation. The rest of the speedup must come from executing a lot of RSA calculations in parallel. This would be useful for instance when a lot of server authentications are required for parallel TLS handshakes.

Parallel operation could be very efficient for creating RSA keys as well. Looking for primes is embarrassingly parallel, and creating RSA keys of 8Ki size and over takes plenty of time even on the fastest CPU's. Unfortunately that doesn't mean much in the end; generally RSA keys are long term keys so there are few use cases where the - possibly huge - speedup would be useful.



Note that I found quite a few CUDA related RSA papers that simply implement RSA for very small sizes of $N$. These should be thought of as exercises rather than real implementations of RSA. This is not always clearly mentioned in the readme files or papers.