ietf-openpgp
[Top] [All Lists]

[openpgp] Alternative to Base64

2016-07-18 13:49:12
As we discussed after the meeting,

* Yes Base64 sucks

* Yes alleged 'binary' transport SMTP also sucketh because dimwits insert
CRLFs to wrap lines.

There is an alternative that could be used, yenc is widely implemented on
USENET.

http://www.yenc.org/yenc-draft.1.3.txt :

 1. Fetch a character from the input stream.
 2. Increment the character's ASCII value by 42, modulo 256
 3. If the result is a critical character (as defined in the previous
    section), write the escape character to the output stream and increment
    character's ASCII value by 64, modulo 256.
 4. Output the character to the output stream.
 5. Repeat from start.

Critical characters include the following:

ASCII 00h (NULL)
ASCII 0Ah (LF)
ASCII 0Dh (CR)
ASCII 3Dh (=)


It ain't perfect but it is about 98% efficient and we need not
necessarily do that exact scheme.
_______________________________________________
openpgp mailing list
openpgp(_at_)ietf(_dot_)org
https://www.ietf.org/mailman/listinfo/openpgp
<Prev in Thread] Current Thread [Next in Thread>