Efficient (HUGE) prime modulus

Paul Rubin http
Mon Nov 19 17:41:15 CET 2007

blaine <frikker at gmail.com> writes:
>     A = (G ** a) % P # G^a mod P

Think of how large the intermediate result G**a will be.  That should
explain why it's taking so long.  So figure out what Java's modPow
function must be doing, and write something similar.  Or, see the
docs for python's built-in pow function.

More information about the Python-list mailing list