Currently i am simulating my cryptographic scheme to test it. I have developed the code but i am stuck at one point.
I am trying to take: g**x
where <
It's not hanging, it's just processing. It will eventually give you the answer, provided it doesn't run out of memory first.
I haven't heard of the result of such a process being used in cryptography though; usually it's the modulus of said power that matters. If it's the same in your case then you can just use the 3-argument form of pow() instead.