1

I'm trying to master the basics of cryptography behind ethereum etc, mean very basics. trying to calculate the Pub Key via basic Pub = Priv * Generator Poing G in python, so basically

from ecdsa.curves import SECP256k1
from ecdsa.ellipticcurve import Point

g=0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798
priv = 0x02424ed24a02b71b24db7475a9f877ca886486c0a7cc245235eddd1938222cac


privG = hex(priv * g)
print(privG)    

and every time I get an incorrect value for the public key. could someone please tell me how to do this correctly in python?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.