Skip to content

gosop sign --as text produces incompatible signatures over a message with only carriage return #48

Description

@dkg

If i use gosop to sign a message that contains only \r in text-mode, it produces a signature that gosop can verify, but no other OpenPGP implementation can verify:

0 dkg@bob:~$ gosop generate-key x > x.key
0 dkg@bob:~$ gosop extract-cert < x.key > x.cert
0 dkg@bob:~$ printf '\r' > msg.txt
0 dkg@bob:~$ gosop sign --as=text x.key < msg.txt > msg.txt.sig
0 dkg@bob:~$ gosop verify msg.txt.sig x.cert  < msg.txt
2025-10-15T19:42:23Z 8E1CB2A13D6A72BD11ABD6D24B3D22B72F20BAC4 8E1CB2A13D6A72BD11ABD6D24B3D22B72F20BAC4 mode:text
0 dkg@bob:~$ for sop in pgpainless-cli sopv-gpgv rsopv sqopv; do $sop verify msg.txt.sig x.cert < msg.txt
> done
No verifiable signature found.
ERROR:root:SOP Error NO_SIGNATURE (3): No Valid Signature found
           No acceptable signatures found
           No acceptable signatures found
3 dkg@bob:~$ 

version info:

0 dkg@bob:~$ gosop version --extended
gosop 1.1.0
GopenPGP 3.2.0
Compiled using go1.24.4
0 dkg@bob:~$ 

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions