The Base58 Encoding Scheme
draft-msporny-base58-02
Internet Engineering Task Force S. Nakamoto
Internet-Draft Bitcoin
Intended status: Informational M. Sporny
Expires: May 4, 2021 Digital Bazaar
October 31, 2020
The Base58 Encoding Scheme
draft-msporny-base58-02
Abstract
This document specifies the base 58 encoding scheme, including an
introduction to the benefits of the approach, the encoding and
decoding algorithm, alternative alphabets, and security
considerations.
Status of This Memo
This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
This Internet-Draft will expire on May 4, 2021.
Copyright Notice
Copyright (c) 2020 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document.
Nakamoto & Sporny Expires May 4, 2021 [Page 1]
Internet-Draft Base58 Encoding October 2020
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3
2. The Base58 Alphabet . . . . . . . . . . . . . . . . . . . . . 3
3. The Base58 Encoding Algorithm . . . . . . . . . . . . . . . . 4
4. The Base58 Decoding Algorithm . . . . . . . . . . . . . . . . 5
5. Test Vectors . . . . . . . . . . . . . . . . . . . . . . . . 6
6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 6
7. Security Considerations . . . . . . . . . . . . . . . . . . . 6
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 6
1. Introduction
When trasmitting data, it can be useful to encode the data in a way
that survives lower fidelity transmission mechanisms. For example,
encoding data using a human alphabet in a way that a person can
visually confirm the encoded data can be more beneficial than
encoding it in binary form. The Base58 encoding scheme is similar to
the Base64 encoding scheme in that it can translate any binary data
to a text string. It is different from Base64 in that the conversion
alphabet has been carefully picked to work well in environments where
a person, such as a developer or support technician, might need to
visually confirm the information with low error rates.
Base58 is designed with a number of usability characteristics in mind
that Base64 does not consider. First, similar looking letters are
omitted such as 0 (zero), O (capital o), I (capital i) and l (lower
case L). Doing so eliminates the possibility of a human being
mistaking similar characters for the wrong character. Second, the
non-alphanumeric characters + (plus), = (equals), and / (slash) are
omitted to make it possible to use Base58 values in all modern file
systems and URL schemes without the need for further system-specific
encoding schemes. Third, by using only alphanumeric characters, easy
double-click or double tap selection is possible in modern computer
interfaces. Fourth, social messaging systems do not line break on
alphanumeric strings making it easier to e-mail or message Base58
values when debugging systems. Fifth, unlike Base64, there is no
byte padding making many Base58 values smaller (on average) or the
same size as Base64 values for values up to 64 bytes, and less than
2% larger for larger values. Finally, Base64 has eleven encoding
variations that lead to confusion among developers on which variety
of Base64 to use. This specification asserts that there is just one
simple encoding mechanism for Base58, making implementations and
developer interactions simpler.
While Base58 does have a number of beneficial usability features, it
is not always a good choice for an encoding format. For example,
Nakamoto & Sporny Expires May 4, 2021 [Page 2]
Show full document text