Reputation: 1
Helllo,
I would like to use this code to generate/recover my private key, I'm using Python 3.6 and installed ecdsa package but how should I edit the code with my public key?
I'm quite new to python, tried some things but I get the following errors..
NameError: name 'addr' is not defined
TypeError: 'NoneType' object is not iterable
IndentationError: unexpected indent (<-- I have many of this error)
Do I need anything else to download and install?
I'd appreciate for any kind of help!
Upvotes: 0
Views: 1888
Reputation: 4002
how should I edit the code with my public key?
You can't.
Private keys cannot be generated from public keys. This is absolutely fundamental to public key cryptography.
I get the following errors..
...
NameError: name 'addr' is not defined
You must define or initialize addr
before using it.
TypeError: 'NoneType' object is not iterable
See TypeError: 'NoneType' object is not iterable in Python
IndentationError: unexpected indent
Python depends on indentation as part of its syntax, for example indentation is used to define blocks where other languages might use {
and }
or begin
and end
.
If you have too much or too little indentation it alters the meaning of the code and may not make any sense. You must pay careful attention to indentation when using Python.
In particular, I suspect that if you set tab-spacing to other than 8 and irregularly mix tabs with spaces in indentation, you will have problems.
Upvotes: 1