Calculating very large exponents in python

后端 未结 3 1790
挽巷
挽巷 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:50

    I'm not quite sure you appreciate the sheer magnitude of what you're asking Python to do. Raising something to a power x where x is 256 bits long, is doing the equivalent of 2**256 multiplications, or 115792089237316195423570985008687907853269984665640564039457584007913129639936 multiplications. As you can imagine, this may take some time. And space, which I guarantee you don't have enough of.

提交回复
热议问题