secp256k1 icon indicating copy to clipboard operation
secp256k1 copied to clipboard

Pypy3 issue with hash160 address

Open telekall opened this issue 2 years ago • 4 comments

Hi there: Quick question. I am using this library with pypy3 and seems to work fine with compress and uncompress btc address. But when try something like that: mykey = int(key,16) hash160 = ice.privatekey_to_h160(0, True, mykey).hex() print(hash160) I just got only 40 zeros = 0000000000000000000000000000000000000000 Can you spot a solution, thanks!

telekall avatar Apr 18 '22 23:04 telekall

Can you tell me what was the key for which it is happening. Or is it a secret ??

iceland2k14 avatar Apr 21 '22 16:04 iceland2k14

hi, The key is just a decimal number like :18446744073709551616. Again, works fine with pure python, but with pypy3 just got a bunch of zeros.

telekall avatar Apr 21 '22 16:04 telekall

pypy and pypy3 doesn't support ctypes and finite fields operations. And pure python with ctypes is faster, than pypy.

If you want use pypy, use this with pure python scripts or with cffi.

pianist-coder avatar May 18 '22 08:05 pianist-coder

Hi there: Quick question. I am using this library with pypy3 and seems to work fine with compress and uncompress btc address. But when try something like that: mykey = int(key,16) hash160 = ice.privatekey_to_h160(0, True, mykey).hex() print(hash160) I just got only 40 zeros = 0000000000000000000000000000000000000000 Can you spot a solution, thanks!

pypy no work with DLL !

Grayesso avatar Jul 17 '22 11:07 Grayesso