Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference betweeen RFC 3548 and RFC 4648

Tags:

base64

I am translating some Python code to C++. Parts of the code use base 64 encoding.

The Python code uses RFC 3548 encoding, but the C++ library I am using only has RFC 4648.

I understand that RFC 4648 obsolete RFC 3548, but I could not find out where they differ. I also wrote a program in Python and one in C++ to encode the same plain-text file, and they produce the same output.

So for base 64 encoding, what are the differences between RFC 3548 and 4648?

like image 400
Aydin Gerek Avatar asked Jun 18 '16 04:06

Aydin Gerek


People also ask

What RFC 4648?

Josefsson Request for Comments: 4648 SJD Obsoletes: 3548 October 2006 Category: Standards Track The Base16, Base32, and Base64 Data Encodings Status of This Memo This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements.

What is base64 encoding and decoding?

Base64 is a group of similar binary-to-text encoding schemes that represent binary data in an ASCII string format by translating it into a radix-64 representation. The term Base64 originates from a specific MIME content transfer encoding.

How do I know if a string is base64 encoded?

In base64 encoding, the character set is [A-Z, a-z, 0-9, and + /] . If the rest length is less than 4, the string is padded with '=' characters. ^([A-Za-z0-9+/]{4})* means the string starts with 0 or more base64 groups.

What is base 64 encoding used for?

Base64 is a binary to text encoding scheme that is generally used to transfer content-based messages over the Internet. It works by dividing every three bits of binary data into six bit units. The newly created data is represented in a 64-radix numeral system and as seven-bit ASCII text.


1 Answers

Executive summary: the text of the standard has changed in minor ways without changing the behavior it describes.

Details:

The IETF page for RFC 4648 contains a link to a diff from RFC 3548 to RFC 4648. Looking over the diff, I see that apparently all of the changes before part 11 (ISO C99 Implementation of Base64) are non-functional grammatical changes.

Part 11 is changed to provide a link to an external implementation rather than providing an implementation inline because “The code could not be included in this RFC for procedural reasons (RFC 3978 section 5.4).” The specific reason is that the C implementation in RFC 3548 included a copyright notice different than the one allowed by RFC 3978.

After that, there are more grammatical changes, some references have been updated, and the copyright, disclaimer, and acknowledgements have been updated.

like image 102
rob mayoff Avatar answered Sep 21 '22 17:09

rob mayoff



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!