I am using the NTL library for a RSA cryptanalysis implementation. But I am running into some problems frequently regarding type mismatch/incompatibility.
Eg-
I need
RR
type value of n^((h-1.0)/(h*k-1.0)) where n is typeZZ
, and h and k are int. The overall exponent is float or double. I tried ^ , pow (works only forRR
base), power (works only for long exponent). I eventually made n,h,k all of type RR to use pow, but is that really the way to do it?How to do (p(x))^k where p(x) is some polynomial? I had to use mul function in a loop k times. Also how to initialize a polynomial? It seems it can take something like a python list from stdin, yet I can't set it like that within the program. So,
ZZX p; p = [1 2 3]
or
p = ZZX([1 2 3])
doesn't work. I had to use
SetCoeff
to set each coefficient individually.
These are just 2 instances I remember right now. I have encountered too many inconveniences.
Iirc, we can't even multiply ZZ and RR.