gchq / CyberChef

The Cyber Swiss Army Knife - a web app for encryption, encoding, compression and data analysis

Home Page:https://gchq.github.io/CyberChef

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug report: Base58 wrong conversion

wackazong opened this issue · comments

Describe the bug
The base58 implementation is producing incorrect results.

To Reproduce

  1. Go to '...'
  2. The result must be 16 times "1", not 17 times
  3. Compare with the invert operation which is also wrong: https://gchq.github.io/CyberChef/#recipe=From_Base58('123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz',true)To_Decimal('Space',false)&input=MTExMTExMTExMTExMTExMQ
  4. This gives me back 18 bytes, not 16 bytes.

Expected behaviour
Correct base58 string generation