ietf-openpgp
[Top] [All Lists]

Re: Packets sequences

2004-03-10 01:23:10


-------- Original Message --------
From: poiboy
To: hmujtaba(_at_)forumsys(_dot_)com
Subject: Re: Packets sequences
Date: Wed, 10 Mar 2004 03:34:15 +0000

Just to be sure that I understand this properly, does this mean that an
encrypted message can contain a variable length sequence of literal data
packets and/or compressed data packets, e.g, is this sequence possible?

Encrypted data packet = {literal data packet1, compressed data packet1,
literal data packet2}, where the compressed data packet1 can itself hold
a sequence of literal data packets. 

I think the answer leans toward "no" - but take this with a grain of salt since
I'm not qualified to comment on the intent of the draft.

From 10.2.:

    OpenPGP Message :- Encrypted Message | Signed Message |
                       Compressed Message | Literal Message.

    Compressed Message :- Compressed Data Packet.

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

    In addition, decrypting a Symmetrically Encrypted Data Packet or a
    Symmetrically Encrypted Integrity Protected Data Packet as well as
    decompressing a Compressed Data packet must yield **a valid OpenPGP
    Message**. (emphasis added)

The question seems to focus on whether 'a valid OpenPGP message' (above) means
"one and only one OpenPGP message" or "only valid OpenPGP messages." For
implementation purposes, I'm guessing that the first interpretation best
describes what happens in practice:

    ENCRYPTED( LITERAL )
    ENCRYPTED( LITERAL, LITERAL, LITERAL )
    ENCRYPTED( COMPRESSED( LITERAL ) )
    ENCRYPTED( COMPRESSED( LITERAL, LITERAL, LITERAL ) )

In other words, compressed messages don't share the same "level" with any other
message (including another compressed message) and compressed messages "wrap"
only a single message at a time (granting that a list of literal packets
comprise a single literal message). FWIW, my implementation accepts a list of
any sort of messages in the encrypted body (which could lead to really funky
output) but will only create encrypted messages as ENC(CMP(MSG)) or
ENC(MSG).

Aloha,
poiboy


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