vbuterin / pybitcointools

SImple, common-sense Bitcoin-themed Python ECC library
1.3k stars 860 forks source link

WARNING!!! Incorrect Compressed Public Key and Compressed Bitcoin Address #180

Open k0tkin opened 7 years ago

k0tkin commented 7 years ago

compressed public key stored in 264 bits (66 hex digits)

For number 99 (private_key = bitcoin.sha256(b'99')) I receive this:

0383dfa2168a7b668641ed42ac5fcc4059a7206bb3f44043d46917a25b649a16 instead of: 030083dfa2168a7b668641ed42ac5fcc4059a7206bb3f44043d46917a25b649a16

that two zero at the beginning is missing

And for number 77: pybitcointools result: Compressed Public Key (hex) is: 0245dc1aea709e25d262e1afd00704fa53c9fef46946d3906ebeee75b318786a6

Right answer: 02045dc1aea709e25d262e1afd00704fa53c9fef46946d3906ebeee75b318786a6

another zero at the beginning is missing