ietf-openpgp
[Top] [All Lists]

Re: Bad Armour Headers

2006-01-05 10:43:23

David Shaw wrote:
On Thu, Jan 05, 2006 at 04:15:41PM +0100, Daniel A. Nagy wrote:
On Thu, Jan 05, 2006 at 02:28:20PM +0000, Ben Laurie wrote:
draft 15 says:

"    The format of an Armor Header is that of a key-value pair.  A colon
    (':' 0x38) and a single space (0x20) separate the key and value.
    OpenPGP should consider improperly formatted Armor Headers to be
    corruption of the ASCII Armor. "

However, I see improperly formatted headers because of word wrapping.
There doesn't appear to be a way to wrap a long line, so I must reject
these as badly formatted (not that other implementations do, it seems).

This seems less than optimal.
Armor headers are very similar to MIME headers. In MIME, the solution is
that non-empty lines are appended to the previous line, if they begin with a
whitespace. This transformation can be used in OpenPGP too. In order to
prevent arbitrary wraps, the length of actual lines should be maximized in
64 characters, with longer lines broken in the above described fashion (with
a whitespace in the beginnig of the trailing part).

This would give a valid encoding for long header lines, but does not
fix the problem at hand.  Word wrapping would still result in broken
armor as word wrapping wouldn't know to put whitespace before the
lines it reformats.

Word wrapping would not occur because the lines would be short enough to
avoid it.

-- 
http://www.apache-ssl.org/ben.html       http://www.thebunker.net/

"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff

<Prev in Thread] Current Thread [Next in Thread>