marcvincenti / bitp0wn

Algorithms to re-compute a private key, to fake signatures and some other funny things with Bitcoin.
106 stars 63 forks source link

miscellaneous/double.py problem #9

Open forumfinanc opened 3 years ago

forumfinanc commented 3 years ago

Hi! Realy interesting project! But faild to launch miscellaneous/double.py Tryed python3 and got this Traceback (most recent call last): File "miscellaneousdouble.py", line 250, in C1 = cuberoot((d1 + modular_sqrt(40824 * Q2[0]3 + 142884, P)) inv(2, P), P) File "miscellaneousdouble.py", line 74, in modular_sqrt if legendre_symbol(a, p) != 1: File "miscellaneousdouble.py", line 52, in legendre_symbol ls = (pow(a, ((p - 1) / 2), p)) TypeError: pow() 3rd argument not allowed unless all arguments are integers Tryed python2 and got this Traceback (most recent call last): File "miscellaneousdouble.py", line 250, in C1 = cuberoot((d1 + modular_sqrt(40824 Q2[0]3 + 142884, P)) * inv(2, P), P) File "miscellaneousdouble.py", line 38, in cuberoot assert pow(root,3,p) == a%p AssertionError How can i fix this?

forumfinanc commented 3 years ago

Hi! Realy interesting project! But faild to launch miscellaneous/double.py Tryed python3 and got this Traceback (most recent call last): File "miscellaneousdouble.py", line 250, in C1 = cuberoot((d1 + modular_sqrt(40824 * Q2[0]3 + 142884, P)) inv(2, P), P) File "miscellaneousdouble.py", line 74, in modular_sqrt if legendre_symbol(a, p) != 1: File "miscellaneousdouble.py", line 52, in legendre_symbol ls = (pow(a, ((p - 1) / 2), p)) TypeError: pow() 3rd argument not allowed unless all arguments are integers Tryed python2 and got this Traceback (most recent call last): File "miscellaneousdouble.py", line 250, in C1 = cuberoot((d1 + modular_sqrt(40824 Q2[0]3 + 142884, P)) * inv(2, P), P) File "miscellaneousdouble.py", line 38, in cuberoot assert pow(root,3,p) == a%p AssertionError How can i fix this?

Noname400 commented 2 years ago

потому что есть случайная генерация и равенство не проходит