PGP signature on literal data packet I read from PGP spec RFC 1991, section 6.1 (August 1996):

The exclusion of the other fields ensures that detached signatures are exactly the same as attached signatures prefixed to the message. Detached signatures are calculated on a separate file that has none of the literal data packet header fields.

Can anyone explain this a little bit?
Suppose I got an email message, PGP would convert the msg as &quot;literal data packet&quot;, and then sign on it. The signature could be stored in other place (i.e. detached). but the signature will be same as storing the signature with the msg, i.e. &quot;attached signatures prefixed to the message&quot;.
Do I get it right?
You got it right.
Email consists of several components:
A &quot;From:&quot; address, a list of recipient addresses (To, CC, BCC), several headers used for correctly routing the email to its destination, a &quot;subject&quot; message, and a &quot;body&quot; message (which includes attachments). You likely want to guarantee the integrity of all of these, and the secrecy of at least the subject and the body.
PGP only deals with the body. Nothing else is kept secret, and nothing else is authenticated. It considers everything else (including the &quot;subject&quot; message) to be &quot;data packet header fields&quot;.
This means that a PGP signature of an email message will still validate when the subject is altered, the recipient is different, the sender is different, or other headers change. EG if you forward an email and change the subject line to start with &quot;FW: &quot; you'll be the sender, the new recipient will replace the original in the &quot;To&quot; field, the rest of the headers will differ, but the signature will remain valid.
Likewise if an attacker modifies the &quot;From&quot; to trick you into thinking someone else sent the message, changes the subject, or just wants to read the subject or correlate who is talking to whom, they can.
Unfortunately there's no way to fix these vulnerabilities without breaking backwards compatibility with unencrypted email. I therefore recommend avoiding email encryption, and using a system designed for security to begin with such as Matrix or Signal.