data61 / cuda-fixnum

Extended-precision modular arithmetic library that targets CUDA.
Other
41 stars 28 forks source link

Investigate specialised mulmod for base*cuml in modexp #62

Open unzvfu opened 5 years ago

unzvfu commented 5 years ago

In the modular exponentiation algorithms, there are repeated mulmods of the form A <- A.g where g is the base and A is the intermediate value of the modexp. Since g is fixed for over all such mulmods, it might be possible to find a better representation of g and an associated specialised mulmod algorithm to speed up those mulmods.

unzvfu commented 4 years ago

Follow up at https://github.com/unzvfu/cuda-fixnum/issues/35.