Base32

Base32 describes a method for encoding binary data into a string that consists of only 32 different ASCII characters ( plus an additional 33 characters as leaders at the end of data). Compared to the related method Base64 it is suitable for data formats in which does not distinguish between uppercase and lowercase letters.

Basic principle

RFC 3548 describes the encoding of binary files as follows: Five 8-bit bytes ( a total of 40 -bit words ) to be divided into eight 5-bit groups. Each of these groups corresponds to a number between 0 and 31 These figures are converted and output from the following conversion table in " printable ASCII characters ." If not a complete 40 -bit block more can be formed at the end, this block will be padded with zero bytes, and the 5 -bit groups, which consist only of dummy bits, encoded with = to indicate to the decoder how many stuffing bits are added.

And encoding

As Base64 is used in the machine-to -machine communication, Base32 -like codes are often used in areas where they are read and input by humans. There are various encodings in use, which aim to minimize the risk of confusion between similar-looking characters and exclude specific for individual characters, which are believed to be misunderstood, by the use. Therefore, a table translation of Base32 numbers is performed on coded character usually.

Base32 RFC 3548 / RFC 4648

The numbers 0 and 1 are not used since written reproduction of a likelihood of confusion with the letters O and I is.

Base32hex according to RFC 4648

RFC 3548 has been superseded by RFC 4648, which introduces a further encoding. This used - similar to the hexadecimal system - for the values ​​0 through 9, the decimal digits. The values ​​10 to 31 are represented by the letters A to V. This leaves, as in hexadecimal, received the order of the encoded values ​​in lexicographical order.

This encoding is used among other things in DNSSEC.

Additional coding alphabets

In video games, level codes and passwords are often presented in a modified Base32 encoding. The encoding alphabets used are not standardized. Often digits and consonants are used to generate possible, no "talking" passwords.

ZRTP uses its own encoding, which has also been optimized to avoid misunderstandings in verbal play ( about via telephone).

Examples

For encoding the value of 0

Example encoding for the string " AB " (equivalent in Ascii coding the values ​​65 u.66 )

106938
de