8

In this answer I found out that Ripple uses a different base58 alphabet from Bitcoin. There aren't many materials on what that alphabet is, but I managed to find this reference:

The base58 dictionary for ripple is: rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz

I am wondering - why is Ripple's alphabet so bizarre in comparison to Bitcoin's base58 alphabet:

123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz

I understand that for some branding reasons one would want to put "r" as a letter for 0 and use 0 as network byte for Ripple (thus making every address start with "r"), but the same could've been accomplished by simply shifting the alphabet like so:

rstuvwxyz123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopq

What is the logic behind the odd alphabet letter order?

ThePiachu
  • 42,931
  • 25
  • 138
  • 347

1 Answers1

8

I don't know about the rest of the string but I think the leading bytes are ordered that way to make the types of "addresses" be human reconizable.

From a quick look at the source I think the leading characters, rpshnaf map like so:

  • r = public Ripple address
  • p = node private
  • s = Ripple secret
  • h = ?
  • n = node public
  • a = address family generator or seed ?
  • f = address family generator or seed ?

Of these, wallet owners have seen the r* and s* "addresses" and those running ripple will be have seen the n* and p* ones.

dchapes
  • 1,755
  • 1
  • 12
  • 24