I use the NTL library to implement RSA cryptanalysis. But I often run into some problems regarding type mismatch / incompatibility.
For instance -
I need an RR value of type n ^ ((h-1.0) / (h * k-1.0)), where n is type ZZ , and h and k are int. The total metric is float or double. I tried ^, pow (works only for RR base), power (works only for long exponent). In the end, I did n, h, k for all RR types to use pow, but is there really a way to do this?
How to make (p (x)) ^ k, where p (x) is some polynomial? I had to use the mul function in a loop k times. Also how to initialize a polynomial? It looks like it can take something like a python list from stdin, but I can not install it like in the program. So,
ZZX p; p = [1 2 3]
or
p = ZZX([1 2 3])
does not work. I had to use SetCoeff to set each coefficient individually.
These are just two instances that I remember right now. I encountered too many inconveniences. Iirc, we canβt even multiply ZZ and RR.
Sapta source share