Calculating very large exponents in python

后端 未结 3 1788
挽巷
挽巷 2020-12-19 08:17

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 <

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-19 08:41

    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.

提交回复
热议问题