Calculating very large exponents in python
- by miraclesoul
Dear All,
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
g = 256 bit number
x = 256 bit number
Python hangs at this point, i have read alot of forums, threads etcc but only come to the conclusion that python hangs, as its hard for it to process such large numbers.
any idea how can it be done? any two line piece of code, any library, anything that can be done.(ALSO PLEASE I AM A NEW PYTHON USER AND THIS IS FIRST TIME I DID PROGRAMMING IN IT, SO NO COMPLEX METHODS ...HOPE YOU UNDERSTAND :s)