-
Notifications
You must be signed in to change notification settings - Fork 326
Closed as not planned
Labels
Description
When calling:
generatorPoint = ecdsa.ellipticcurve.PointJacobi(SECP256k1, secp256k1_generator_x, secp256k1_generator_y, 1, secp256k1_group_order, True)
sig = ecdsa.ecdsa.Signature(r, s)
pubkey1, pubkey2 = sig.recover_public_keys(message, generatorPoint)
I get the error:
Traceback (most recent call last):
File "sig2pubkey.py", line 100, in <module>
pubkey1, pubkey2 = sig.recover_public_keys(message, generatorPoint)
File "~/.local/lib/python3.10/site-packages/ecdsa/ecdsa.py", line 113, in recover_public_keys
pow(x, 3, curve.p()) + (curve.a() * x) + curve.b()
AttributeError: 'Curve' object has no attribute 'p'
Indeed the Curve
object does not have a p
attribute, but it does contain an ecdsa/ellipticcurve/CurveFp()
object (named curve_secp256k1
in my case) which has a p
attribute.
Could this be a bug? If not I'd be v grateful for any tips on how to fix my own code!