RFC 4648 [1] defines two encodings for base 64:

§ 4. Base 64 Encoding: the familiar [A-Za-z0-9+/]; and
§ 5. Base 64 Encoding with URL and Filename Safe Alphabet: [A-Za-z0-9-_]

For the latter it says:

> This encoding may be referred to as "base64url".  This encoding
> should not be regarded as the same as the "base64" encoding and
> should not be referred to as only "base64".  Unless clarified
> otherwise, "base64" refers to the base 64 in the previous section.

So "base64" should always refer to the classic version, and "base64url" to the 
'safe' version.
Of course, whether people are aware and stick to this is another matter; though 
I'd like to think it should usually be obvious which version is required.


[1] https://www.rfc-editor.org/rfc/rfc4648.txt

________________________________
From: Standards <standards-boun...@xmpp.org> on behalf of Sam Whited 
<s...@samwhited.com>
Sent: 01 April 2019 15:36
To: standards@xmpp.org
Subject: Re: [Standards] NEW: XEP-0418 (DNS Queries over XMPP (DoX))

On Sat, Mar 30, 2019, at 15:51, Jonas Schäfer wrote:
> Version 0.1.0 of XEP-0418 (DNS Queries over XMPP (DoX)) has been
> released.

The DNS request and response are encoded like so:

> The body MUST be encoded with base64 RFC 4648 [5]. Padding characters
> for base64 MUST NOT be included.

But there's no mention off what alphabet is used. I'm assuming this is
the standard one (as opposed to the URL/filename safe one), but I always
feel like this should be explicitly stated when base64 is used.

—Sam
_______________________________________________
Standards mailing list
Info: https://mail.jabber.org/mailman/listinfo/standards
Unsubscribe: standards-unsubscr...@xmpp.org
_______________________________________________

Reply via email to