W3C home > Mailing lists > Public > xml-dist-app@w3.org > July 2001

Re: base64 encoding

From: Rich Salz <rsalz@zolera.com>
Date: Thu, 12 Jul 2001 23:41:52 -0400
Message-ID: <3B4E6E00.384BB7FB@zolera.com>
To: David Fallside <fallside@us.ibm.com>
CC: xml-dist-app@w3.org
> 1) A strict reading of RFC 2045 (Base64) is that if the "=" character
> appears in a base64 encoded message, it must be in the last position or the
> last position and the next-to-last position, and the number of characters
> in the message (including any "=" character) must be a multiple of 4. Given
> this reading, should these rules be enforced as part of XML Schema lexical
> validation?

I don't see why you qualify it as a "strict" reading.  The paragraph at
the end of page 25 is quite explicit.  The only flexibility allowed is
that a base64 *decoder* may use the presence of an equal sign as a quick
terminator.  Encoders must do the padding.

As far as breaking code, Python, OpenSSL, and (according to my quick
reading), OpenLDAP all require the padding.

> 2) Should there be a canonical form for XML Schema's base64 encoding?

I would put it as a MAY that base64 start with a newline, insert a
newline after every 76 chars.  That's like your #2, but adding an
initial newline.

> and/or (2)-- especially if you have implementation experience with base64
> encodings and SOAP

I have a SOAP implementation in python that we'll be releasing as open
source very soon.  As you might expect, it requires the padding. :)

> -- please send your comments to this list. The XML

Thanks for asking.
	/r$


-- 
Zolera Systems, Securing web services (XML, SOAP, Signatures,
Encryption)
http://www.zolera.com
Received on Thursday, 12 July 2001 23:40:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:59:02 GMT