Tool to encrypt / convert with base 58 composed of alphanumeric characters except 0,O,I,l to avoid reading errors.

Base 58 - dCode

Tag(s) : Arithmetics, Character Encoding

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!

A suggestion ? a feedback ? a bug ? an idea ? *Write to dCode*!

Base 58 is an encoding system that converts binary data into a character string consisting of a specific set of 58 characters. In particular, base 58 generally uses the 62 alphanumeric characters (26 lowercase letters + 26 uppercase letters + 10 digits) but removing `0` (zero), `O` (uppercase letter o), `I` (letter i uppercase) and `l` (lowercase letter L) in order to limit potential reading errors (by a human or a machine).

The base 58 was created to code large integer numbers, like any base in arithmetic, it uses symbols for the digits. In base 58, by default, the 58 symbols are `123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz`

The correspondance table for Base58 is

Index | Base58 | Index | Base58 | Index | Base58 | Index | Base58 |
---|---|---|---|---|---|---|---|

0 | 1 | 1 | 2 | 2 | 3 | 3 | 4 |

4 | 5 | 5 | 6 | 6 | 7 | 7 | 8 |

8 | 9 | 9 | A | 10 | B | 11 | C |

12 | D | 13 | E | 14 | F | 15 | G |

16 | H | 17 | J | 18 | K | 19 | L |

20 | M | 21 | N | 22 | P | 23 | Q |

24 | R | 25 | S | 26 | T | 27 | U |

28 | V | 29 | W | 30 | X | 31 | Y |

32 | Z | 33 | a | 34 | b | 35 | c |

36 | d | 37 | e | 38 | f | 39 | g |

40 | h | 41 | i | 42 | j | 43 | k |

44 | m | 45 | n | 46 | o | 47 | p |

48 | q | 49 | r | 50 | s | 51 | t |

52 | u | 53 | v | 54 | w | 55 | x |

56 | y | 57 | z |

Encryption of a number is done by performing a change of basis.

__Example:__ $ 1234_{10} = 21 \times 58^1 + 16 = \{21,16\}_{58} $ or `NH` using the symbols of base 58 (the 21st symbol is an `N` and the 16th symbol is an `H`).

To encrypt a message, it is necessary to first convert it into a large number, using an encoding table such as ASCII or Unicode.

The decryption of Base 58 consists of a conversion of the message considered into base 58.

If the expected result is a number then convert base 58 to base 10 to obtain an integer.

__Example:__ The message in base 58 `38` corresponds to the calculation $ 2 \times 58 + 7 = 123 $ or `123` in base 10.

If the expected result is a message, then convert the base 58 to binary or hexadecimal and use the desired coding table (ASCII or Unicode) to obtain a plain message.

The message is composed of at most 58 distinct characters, and must not contain a digit `0` (zero), nor a letter `I` (capital i), nor a letter `O` (capital o) or letter `l` (lowercase L).

Base58 is commonly used in crypto applications, cryptocurrency wallet addresses (Bitcoin or Ripple) or URLs.

Any reference to Bitcoin or its inventor Satoshi Nakamoto or to any other cryptocurrency like Ripple is a clue.

The symbol alphabet used to code base 58 may be completely different from `123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz`.

A classic variant is `123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ` (uppercase and lowercase inverted, used by Flickr) but many other alphabets, including deranged alphabets can be used.

Base58Check is an algorithm used by the Bitcoin Blockchain for BTC addresses which is based on Base58 adding modifiers such as a version number and a checksum.

dCode retains ownership of the "Base 58" source code. Except explicit open source licence (indicated Creative Commons / free), the "Base 58" algorithm, the applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or the "Base 58" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and all data download, script, or API access for "Base 58" are not public, same for offline use on PC, mobile, tablet, iPhone or Android app!

Reminder : dCode is free to use.

The copy-paste of the page "Base 58" or any of its results, is allowed (even for commercial purposes) as long as you credit dCode!

Exporting results as a .csv or .txt file is free by clicking on the *export* icon

Cite as source (bibliography):

*Base 58* on dCode.fr [online website], retrieved on 2024-10-05,

58,base,bitcoin,satoshi,nakamoto,ripple,btc,xrp

https://www.dcode.fr/base-58-cipher

© 2024 dCode — El 'kit de herramientas' definitivo para resolver todos los juegos/acertijos/geocaching/CTF.

Feedback