Using GPGTools on macOS, I signed a message that looks like this:

- List Item
  - Inner List Item

The signed message looks like this:

Hash: SHA256

- - List Item
  - Inner List Item

Any line that starts with a dash (not indented) gets prepended with -␠ in the signed message. Why does GPG do that?


GPG does that because OpenPGP standard (RFC 4880) requires it:

Dash-escaped cleartext is the ordinary cleartext where every line starting with a dash '-' (0x2D) is prefixed by the sequence dash '-' (0x2D) and space ' ' (0x20). This prevents the parser from recognizing armor headers of the cleartext itself. An implementation MAY dash-escape any line, SHOULD dash-escape lines commencing "From" followed by a space, and MUST dash-escape any line commencing in a dash. The message digest is computed using the cleartext itself, not the dash-escaped form.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.