I am trying to implement RSA in Python but I want to run the intensive calculations on the GPU. I have successfully implemented my own modulo expoentiation running in PyOpenCL, but I max out on six digit integers for both the base and exponent. Larger numbers than that and the GPU crashes.

I need to create an array of very large integer values in numpy and send them along to the PyOpenCL code, and do both multiplication and modulo operations with the large integers on the GPU.

Has anyone done anything similar before? Googling cuda and bigint doesn't give any good results. :(

有帮助吗?

解决方案

BigInt as arbitrary precision int (see: http://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic)?

If that is the case, you need an arbitrary precision library for Opencl/Cuda.

Quick googling shows for example: http://www.hpcs.cs.tsukuba.ac.jp/~nakayama/cump/

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top