3 EasyPG is an all-in-one GnuPG interface for Emacs. It has two
4 aspects: convenient tools which allow to use GnuPG from Emacs (EasyPG
5 Assistant), and a fully functional interface library to GnuPG (EasyPG
10 The EasyPG Assistant provides the following features:
13 - Cryptographic operations on regions.
14 - Cryptographic operations on files.
16 - Encryption/decryption of *.gpg files.
18 The EasyPG Library provides the following features:
20 - The API covers most functions of GnuPG like GPGME.
21 - S/MIME support using gpgsm.
22 - Designed to avoid potential security pitfalls around Emacs
26 ** GNU Emacs 21.4, XEmacs 21.4, or later
28 ** GnuPG 1.4.3 or later
29 If you are using earlier versions, you will need to specify
30 --disable-gpg-test when ./configure.
39 Add the following line to your ~/.emacs
43 Restart emacs and type `M-x epa- TAB', and you will see a lot of
44 commands available. For example,
46 - To browse your keyring, type `M-x epa-list-keys'
47 - To create a cleartext signature of the region, type `M-x epa-sign-region'.
49 You can also do some cryptographic operations from dired.
53 : e (or M-x epa-dired-do-encrypt)
54 (select recipients by 'm' and click [OK])
58 The EasyPG Library can be used in combination with various MUA (Mail
61 ** CVS version of Gnus
63 CVS version of Gnus uses EasyPG by default. To make sure of that,
64 check mml2015-use set to 'epg. Other options which affect on the
68 mml2015-encrypt-to-self
69 mml2015-cache-passphrase
70 mml2015-passphrase-cache-expiry
73 NOTE: You don't need pgg-epg.el in this case.
77 PGG is outdated PGP library used by old Gnus (<= v5.11), MH-E, etc.
79 There is a PGG backend written using EasyPG called pgg-epg.el.
80 However, EasyPG API is a superset of PGG and pgg-epg.el provides
81 nothing but compatibility with PGG.
83 *** Limitations of PGG
85 As I noted "PGG is outdated PGP library" above, PGG has several
86 limitations. For example
88 - PGG can't handle a message signed with multiple keys.
89 - PGG can't prompt a user which key is being used.
90 - PGG can't create a binary PGP messages.
91 - PGG doesn't provide a way to select keys per cryptographic operation.
92 - PGG ignores GnuPG's trust metrics.
96 SEMI is the MIME library used by Wanderlust, cmail, T-gnus, etc.
98 There is an EasyPG capable SEMI library called EMIKO-EasyPG. It can
99 be downloaded from the same site of the EasyPG distribution point.
103 There are security pitfalls around Emacs. EasyPG is written with
106 ** Passphrase may leak to a temporary file.
108 The function call-process-region writes data in region to a temporary
109 file. If your PGP library used this function, your passphrases would
110 leak to the filesystem.
112 The EasyPG Library does not use call-process-region to communicate
113 with a gpg subprocess.
115 ** Passphrase may be stolen from a core file.
117 If Emacs crashes and dumps core, Lisp strings in memory are also
118 dumped within the core file. read-passwd function clears passphrase
119 strings by (fillarray string 0) to avoid this risk. However, Emacs
120 performs compaction in gc_sweep phase. If GC happens before fillarray,
121 passphrase strings may be moved elsewhere in memory. Therefore,
122 passphrase caching in elisp is generally a bad idea.
124 The EasyPG Library dares to disable passphrase caching. Fortunately,
125 there is more secure way to cache passphrases - use gpg-agent.