Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

When I clearsign a document in PGP, it adds a “dash-space” to several of my lines. Why?

0
10 Posted

When I clearsign a document in PGP, it adds a “dash-space” to several of my lines. Why?

0

PGP does this because of the “—–BEGIN PGP MESSAGE—–” (and related) headers it uses to mark the beginning of PGP messages. To keep it from getting confused, it tacks a “- ” to the beginning of every line in the regular text which has a dash at the start. It strips the extra dash and space when you check the message’s signature, and writes the original text to the output. This also happens with several lines that start with “special” phrases, such as “From”, because those lines are otherwise escaped by mail programs, as required by the mail standard. This would change the body of the mail and thereby invalidate the signature. If you use PGP/MIME type signatures, the signature is presented as an attachement to receivers that do not have PGP. For signing files, the accepted method is to use a seperate signature file.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.