Skip to content

GitLab

    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    • Menu
    Projects Groups Snippets
  • Get a free trial
  • Sign up
  • Login
  • Sign in / Register
  • R rfc4880bis
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 41
    • Issues 41
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 17
    • Merge requests 17
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • openpgp-wg
  • rfc4880bis
  • Issues
  • #49
Closed
Open
Created Oct 13, 2021 by Justus Winter@teythoonMaintainer

v5 binary and text signatures include literal data packet's metadata, that is inadvisable and impossible in general

In an attempt to cover the metadata (format, filename, and timestamp) of literal data packets, v5 signatures hash this information (see https://openpgp-wg.gitlab.io/rfc4880bis/#name-computing-signatures):

- A V5 signature hashes the packet body starting from its first field, the version number, through the end of the hashed subpacket data and a final extra trailer.
  Thus, the hashed fields are:
[...]
  - Only for document signatures (type 0x00 or 0x01) the following three data items are hashed here:

    - the one-octet content format,

    - the file name as a string (one octet length, followed by the file name),

    - a four-octet number that indicates a date,

I don't think that this is advisable because it breaks the symmetry between signed messages and detached signatures. Previously, it was possible to "detach" a signature from a signed message yielding a data file with a detached signature, and vice-versa.

Further, I don't think that it is possible in general. First, what should be hashed when producing a detached signature? A file has no content format, the file name can change easily making the signature incredibly brittle, what date should be used (mtime, atime, ctime), do we really want the signature to break if the timestamp changes?

Second, if we consider signing OpenPGP messages, the signer may not have access to that metadata. OpenPGP supports encrypt-then-sign (see https://openpgp-wg.gitlab.io/rfc4880bis/#name-openpgp-messages), so the signer may only have access to the encrypted message, and cannot know the literal data packet's metadata.

Assignee
Assign to
Time tracking