(epg--status-NOTATION_NAME): New function.
[elisp/epg.git] / README
1 * What's this?
2
3 EasyPG is a GnuPG interface for Emacs.  It has two aspects: convenient
4 tools which allow to use GnuPG from Emacs (EasyPG Assistant), and a
5 fully functional interface library to GnuPG (EasyPG Library.)
6
7 * Requirements
8
9 ** GNU Emacs 21.4 or XEmacs 21.4
10
11 ** GnuPG 1.4.3
12
13 * Quick start
14
15 ** Installation
16
17   $ ./configure
18   $ sudo make install
19
20 Add the following line to your ~/.emacs
21
22   (require 'epa-setup)
23
24 Then you can browse your keyring by `M-x epa-list-keys'.  In addition,
25 you can do some cryptographic operations on dired.
26
27   M-x dired
28   (mark some files)
29   : e (or M-x epa-dired-do-encrypt)
30   (select recipients by 'm' and click [OK])
31
32 * MUA Integration
33
34 The EasyPG Library can be used in combination with various MUA (Mail
35 User Agents.)
36
37 ** CVS version of Gnus
38
39 CVS version of Gnus supports EasyPG natively.  To use, simply put the
40 following line into your ~/.emacs.
41
42   (setq mml2015-use 'epg)
43
44 Other options which affect on the binding are
45
46   mml2015-signers
47   mml2015-encrypt-to-self
48   mml2015-cache-passphrase
49   mml2015-passphrase-cache-expiry
50   mml2015-verbose
51
52 NOTE: You don't need pgg-epg.el in this case.
53
54 ** PGG based MUA
55
56 PGG is outdated PGP library used by old Gnus (<= v5.11), MH-E, etc.
57
58 There is a PGG backend written EasyPG called pgg-epg.el.  However,
59 EasyPG API is a superset of PGG and pgg-epg.el provides nothing but
60 compatibility with PGG.
61
62 Limitations of PGG
63
64 - PGG doesn't have a user interface to select keys for typical
65   cryptographic operations
66 - PGG can't handle messages signed with multiple keys correctly
67 - PGG trusts any keys for encryption
68
69 ** SEMI based MUA
70
71 SEMI is the MIME library used by Wanderlust, cmail, T-gnus, etc.
72
73 There is an EasyPG capable SEMI library called EMIKO-EasyPG.  It can
74 be downloaded from the same site of the EasyPG distribution point.
75
76 * Security
77
78 There are security pitfalls around Emacs.  EasyPG is written with
79 avoiding them.
80
81 ** Passphrase may leak to a temporary file.
82
83 The function call-process-region writes data in region to a temporary
84 file. If your PGP library used this function, your passphrases would
85 leak to the filesystem.
86
87 The EasyPG Library does not use call-process-region to communicate
88 with a gpg subprocess.
89
90 ** Passphrase may be stolen from a core file.
91
92 If Emacs crashes and dumps core, Lisp strings in memory are also
93 dumped within the core file. read-passwd function clears passphrase
94 strings by (fillarray string 0) to avoid this risk. However, Emacs
95 performs compaction in gc_sweep phase. If GC happens before fillarray,
96 passphrase strings may be moved elsewhere in memory. Therefore,
97 passphrase caching in elisp is generally a bad idea.
98
99 The EasyPG Library dares to disable passphrase caching. Fortunately,
100 there is more secure way to cache passphrases - use gpg-agent.