Subject: Literal+Literal

From: David Shaw <[email-masked]>
Date: Thu, 21 Jul 2005 18:03:08 -0400

A while back (2003), I noticed a inconsistency in the draft.  The
problem was one of those fiddly grammar things: some text in the draft
said that multiple literal packets in a row were legal, and some other
text said that it wasn't.  For example, in that draft,
COMPRESSED(literal+literal) was legal in section 5.6, and illegal in
10.2.

To resolve that, I suggested that we simply change 10.2 (the grammar
section) to allow literal+literal.  That's how the draft reads now.
Several people have commented that this is raising more problems than
it is solving, and they're right.  Literal+literal raises a whole
collection of issues with how to hash the data in a construction like
onepass+literal+literal+sig.  It also requires parsers to be more
complex (though at least the parsers in PGP and GPG always worked this
way).

I'd like to change the text to fix this, and solve this problem a
different way: rather than resolve the inconsistency by making
literal+literal legal everywhere, better to resolve the inconsistency
by making literal+literal illegal everywhere.

The specific changes would be:

Section 5.6 (Compressed Data Packet) - change "literal data packets"
to "a literal data packet".

Section 5.7 (Symmetrically Encrypted Data Packet) - change "literal
data packets" to "a literal data packet".

Section 5.13 (Sym. Encrypted Integrity Protected Data Packet) - change
"literal data packets or compressed data packets" to "a literal data
packet or compressed data packet".

Then in section 10.2, revert from this:

    Literal Message :- Literal Data Packet |
                      Literal Message, Literal Data Packet.

to this:

    Literal Message :- Literal Data Packet

David