문제

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