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

Bug report: base58 encoding ignored heading zero bytes #380

Closed
ghost opened this issue Oct 10, 2018 · 1 comment
Closed

Bug report: base58 encoding ignored heading zero bytes #380

ghost opened this issue Oct 10, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented Oct 10, 2018

Summary

base58 encoding for [0x00, 0x12, 0x34] is same as [0x12, 0x34]

Example

https://gchq.github.io/CyberChef/#recipe=From_Hex('None')To_Base58('123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz')&input=MDAxMjM0

https://gchq.github.io/CyberChef/#recipe=From_Hex('None')To_Base58('123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz')&input=MTIzNA

>>> base58.b58encode("001234".decode('hex'))
'12PM'
>>> base58.b58encode("1234".decode('hex'))
'2PM'
@n1474335
Copy link
Member

n1474335 commented Nov 6, 2018

Fixed in #403. Thanks to @bwhitn.

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

No branches or pull requests

1 participant