[openpgp] Re: Analysis document

Daniel Kahn Gillmor <[email protected]>
Newsgroups gmane.ietf.openpgp
Message-ID <[email protected]>
On Wed 2025-07-09 10:13:14 +0200, Falko Strenzke wrote:
> Daniel Huigens wrote:
>> There is also a proposal to address this 
>> <https://andrewgdotcom.gitlab.io/draft-gallagher-openpgp-literal-metadata>, 
>> though not adopted yet.
>
> The proposal seems fine.

Without my chair hat on, but as an implementer and maintainer, i'll to
say that i don't think this is a great proposal.

It has an unnecessary degree of freedom (hashed vs. verbatim).  Why
should someone implement one or the other when sending?  Why must
receivers be able to handle both?

Secondly, i'm not convinced that the metadata fields supplied here are
particularly useful.  Among other problems:

 - There is no clear interpretation of the octet string of the
   "filename" -- is it UTF-8?  does it use / for path separators?  what if
   it contains a NULL char?

 - The timestamp is just one second resolution, and its range caps out
   at the OpenPGP limit in 2106-02-07 (1970-01-01 + 2^32 seconds).
   Modern filesystems offer much higher resolution (e.g., ext4 offers
   nanosecond timestamps) and wider range.

 - No other metadata is possible (e.g. what about MIME type?
   filesystem ownership or permissions? extended attributes?)

Clearly, it's there to echo the fields in the literal data packet, but
those fields share the same inadequacies.  But the most important
security outcome of this draft is that receiving implementation MUST
ignore the baked in metadata information on its own; either ignore it
entirely, or ignore it in favor of this new metadata field.

But if we're saying we want to introduce a new metadata format, then we
should learn from all the other archival formats (e.g. tar, pax, cpio,
PKZIP), which don't have those ineadequacies.

But at that point, why bother?  Just sign or encrypt one of those
archive formats directly, and leave it out of the OpenPGP layer!

Please, also note that the only API for OpenPGP which is implemented by
multiple OpenPGP implementations today is "SOP", the Stateless OpenPGP
interface.  On the producing side, SOP offers no way to set the literal
data packet's metadata fields for filename or timestamp.  The "format"
can be set between "u" and "b", based on "--as={text|binary}" arguments
for "sop encrypt" and "sop sign".  On the consuming side, SOP offers no
visibility into the literal data packet's metadata fields at all.

           --dkg

_______________________________________________
openpgp mailing list -- [email protected]
To unsubscribe send an email to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.