qubd / mini_ecdsa

Elliptic curve tools, ECDSA, and ECDSA attacks.
The Unlicense
37 stars 21 forks source link

Hello, tell me please how to launch your file? #2

Closed adfghhfd closed 6 years ago

adfghhfd commented 6 years ago

I'm writing to the Linux console -> python appears

Next I tried to import your file as a module import mini_ecdsa and after that he tried to enter C = CurveOverFp (2, 0, 1, 7) but produces an error, as I understand it was not imported the file, how to run it correctly? Sorry, I'm new to Python

qubd commented 6 years ago

If you import a module that way, you need to specify the module's name when calling functions.

>>> import mini_ecdsa
>>> C = mini_ecdsa.CurveOverFp(2, 0, 1, 7)

If you want to interact with the module as I did in the README, you can enter

>>> execfile('mini_ecdsa.py')

in the python console instead of importing it. This way everything in the README should work exactly as it's shown there.

adfghhfd commented 6 years ago

Thank you very much!

qubd commented 6 years ago

No problem. =)