Skip to content

x/crypto/openpgp: Encrypt writes signature at the end #16707

@emersion

Description

@emersion

openpgp.Encrypt writes the signature packet after the encrypted key and the symmetrically encrypted packet. According to the RFC, an OpenPGP signed message is either a signature packet followed by a message or a one-pass signed message (https://tools.ietf.org/html/rfc4880#section-11.3).

Thus, this implementation is violating the RFC by writing the message followed by the signature (no one-pass). To fix it, a one-pass signature packet (https://tools.ietf.org/html/rfc4880#section-5.4) should be written before the encrypted message.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions