The Base45 Data Encoding
draft-faltstrom-base45-04

Document Type Active Internet-Draft (individual)
Authors Patrik Fältström  , Fredrik Ljunggren  , Dirk-Willem van Gulik 
Last updated 2021-04-03
Stream (None)
Intended RFC status (None)
Formats plain text xml pdf htmlized (tools) htmlized bibtex
Stream Stream state (No stream defined)
Consensus Boilerplate Unknown
RFC Editor Note (None)
IESG IESG state I-D Exists
Telechat date
Responsible AD (None)
Send notices to (None)
Network Working Group                                       P. Faltstrom
Internet-Draft                                                    Netnod
Intended status: Standards Track                            F. Ljunggren
Expires: October 5, 2021                                           Kirei
                                                            D. van Gulik
                                                              Webweaving
                                                          April 03, 2021

                        The Base45 Data Encoding
                       draft-faltstrom-base45-04

Abstract

   This document describes the base 45 encoding scheme which is built
   upon the base 64, base 32 and base 16 encoding schemes.

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 October 5, 2021.

Copyright Notice

   Copyright (c) 2021 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.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Faltstrom, et al.        Expires October 5, 2021                [Page 1]
Internet-Draft                   Base45                       April 2021

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Conventions Used in This Document . . . . . . . . . . . . . .   2
   3.  Interpretation of Encoded Data  . . . . . . . . . . . . . . .   2
   4.  The Base 45 Encoding  . . . . . . . . . . . . . . . . . . . .   2
     4.1.  When to use Base45  . . . . . . . . . . . . . . . . . . .   3
     4.2.  The alphabet used in Base45 . . . . . . . . . . . . . . .   3
     4.3.  Encoding example  . . . . . . . . . . . . . . . . . . . .   3
     4.4.  Decoding example  . . . . . . . . . . . . . . . . . . . .   4
   5.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   4
   6.  Security Considerations . . . . . . . . . . . . . . . . . . .   4
   7.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .   5
   8.  Normative References  . . . . . . . . . . . . . . . . . . . .   5
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .   5

1.  Introduction

   When using QR or Aztec codes a different encoding scheme is needed
   than the already established base 64, base 32 and base 16 encoding
   schemes that are described in RFC 4648 [RFC4648].  The difference
   from those and base 45 is the key table and that the padding with '='
   is not required.

2.  Conventions Used in This Document

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in RFC 2119 [RFC2119].

3.  Interpretation of Encoded Data

   Encoded data is to be interpreted as described in RFC 4648 [RFC4648]
   with the exception that a different alphabet is selected.

4.  The Base 45 Encoding

   A 45-character subset of US-ASCII is used, the 45 characters that can
   be used in a QR or Aztec code.  If we look at Base 64, it encodes 3
   bytes in 4 characters.  Base 45 encodes 2 bytes in 3 characters.

   The two bytes [A, B] are turned into [C, D, E] where (A*256) + B = C
   + (D*45) + (E*45*45).  The values C, D and E are then looked up in
   Table 1 to produce a three character string and the reverse when
   decoding.

Faltstrom, et al.        Expires October 5, 2021                [Page 2]
Internet-Draft                   Base45                       April 2021

   If the number of octets are not dividable by two, the last remaining
   byte is represented by two characters.  [A] is turned into [C, D]
   where A = C + (D*45).

4.1.  When to use Base45

   If binary data is to be stored in a QR-Code one possible way is to
   use the Alphanumeric encoding that uses 11 bits for 2 characters as
   defined in section 7.3.4 in ISO/IEC 18004:2015 [ISO18004].  The ECI
Show full document text