message: Signing and encryption
2.7.1 Signing and encrypting commands
-------------------------------------
Instructing MML to perform security operations on a MIME part is done
using the ‘C-c C-m s’ key map for signing and the ‘C-c C-m c’ key map
for encryption, as follows.
‘C-c C-m s s’
Digitally sign current message using S/MIME.
‘C-c C-m s o’
Digitally sign current message using PGP.
‘C-c C-m s p’
Digitally sign current message using PGP/MIME.
‘C-c C-m c s’
Digitally encrypt current message using S/MIME.
‘C-c C-m c o’
Digitally encrypt current message using PGP.
‘C-c C-m c p’
Digitally encrypt current message using PGP/MIME.
‘C-c C-m C-n’
Remove security related MML tags from message.
These commands do not immediately sign or encrypt the message, they
merely insert the proper MML secure tag to instruct the MML engine to
perform that operation when the message is actually sent. They may
perform other operations too, such as locating and retrieving a S/MIME
certificate of the person you wish to send encrypted mail to. When the
mml parsing engine converts your MML into a properly encoded MIME
message, the secure tag will be replaced with either a part or a
multipart tag. If your message contains other mml parts, a multipart
tag will be used; if no other parts are present in your message a single
part tag will be used. This way, message mode will do the Right Thing
(TM) with signed/encrypted multipart messages.
Since signing and especially encryption often is used when sensitive
information is sent, you may want to have some way to ensure that your
mail is actually signed or encrypted. After invoking the above
sign/encrypt commands, it is possible to preview the raw article by
using ‘C-u C-c RET P’ (‘mml-preview’). Then you can verify that your
long rant about what your ex-significant other or whomever actually did
with that funny looking person at that strange party the other night,
actually will be sent encrypted.
_Note!_ Neither PGP/MIME nor S/MIME encrypt/signs RFC822 headers.
They only operate on the MIME object. Keep this in mind before sending
mail with a sensitive Subject line.
By default, when encrypting a message, Gnus will use the
“signencrypt” mode, which means the message is both signed and
encrypted. If you would like to disable this for a particular message,
give the ‘mml-secure-message-encrypt-*’ command a prefix argument, e.g.,
‘C-u C-c C-m c p’.
Actually using the security commands above is not very difficult. At
least not compared with making sure all involved programs talk with each
other properly. Thus, we now describe what external libraries or
programs are required to make things work, and some small general hints.