Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A bug in pubkey_format #11

Open
DhunterAO opened this issue Jan 13, 2018 · 0 comments
Open

A bug in pubkey_format #11

DhunterAO opened this issue Jan 13, 2018 · 0 comments

Comments

@DhunterAO
Copy link

Thank for your work on Keylib, but I meet some trouble when I want to generate PubKey from PrivateKey which is generated successfully.
I traced the bug and found it was about the length of pubkey, but I dont know which step is wrong, could you please help me? I really appreciate it.

the bug information is as followed:

private_key = ECPrivateKey()
private_key.to_hex()
'87afe6f0592829b21ad1a1571c4da84046cf6633356c609221ba2ee2d1c4211901'
private_key.to_wif()
'L1mU9f3yFPeVfNYrrzZs8tGxGiqUEnF3VxwUKLYLTgH6RtFBsfaf'
public_key = private_key.public_key()

Traceback (most recent call last):
File "", line 1, in
File "//keylib/private_key.py", line 92, in public_key
bin_public_key_string = compress(bin_public_key_string)
File "/
/keylib/key_formatting.py", line 337, in compress
f = get_pubkey_format(pubkey)
File "/*/keylib/key_formatting.py", line 266, in get_pubkey_format
raise Exception("Pubkey not in recognized format")
Exception: Pubkey not in recognized format

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant