Initial Commit
[packages] / xemacs-packages / easypg / README
1 * What's this?
2
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
6 Library).
7
8 * Features
9
10 The EasyPG Assistant provides the following features:
11
12 - Keyring browser.
13 - Cryptographic operations on regions.
14 - Cryptographic operations on files.
15 - Dired integration.
16 - Encryption/decryption of *.gpg files.
17
18 The EasyPG Library provides the following features:
19
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
23
24 * Requirements
25
26 ** GNU Emacs 21.4, XEmacs 21.4, or later
27
28 ** GnuPG 1.4.3 or later
29    Earlier versions are supported but not recommended.
30
31 * Quick start
32
33 ** Installation
34
35   $ ./configure
36   $ sudo make install
37
38 Add the following line to your ~/.emacs
39
40   (require 'epa-setup)
41
42 Restart emacs and type `M-x epa- TAB', and you will see a lot of
43 commands available.  For example,
44
45 - To browse your keyring, type `M-x epa-list-keys'
46 - To create a cleartext signature of the region, type `M-x epa-sign-region'
47
48 You can also do some cryptographic operations from dired.
49
50   M-x dired
51   (mark some files)
52   : e (or M-x epa-dired-do-encrypt)
53   (select recipients by 'm' and click [OK])
54
55 * MUA Integration
56
57 The EasyPG Library can be used in combination with various MUA (Mail
58 User Agents).
59
60 ** CVS version of Gnus
61
62 CVS version of Gnus uses EasyPG by default.  To make sure of that,
63 check mml2015-use set to 'epg.  Other options which affect on the
64 EasyPG are
65
66   mml2015-signers
67   mml2015-encrypt-to-self
68   mml2015-cache-passphrase
69   mml2015-passphrase-cache-expiry
70   mml2015-verbose
71
72 NOTE: You don't need pgg-epg.el in this case.
73
74 ** PGG based MUA
75
76 PGG is outdated PGP library used by old Gnus (<= v5.11), MH-E, etc.
77
78 There is a PGG backend written using EasyPG called pgg-epg.el.
79 However, EasyPG API is a superset of PGG and pgg-epg.el provides
80 nothing but compatibility with PGG.
81
82 *** Limitations of PGG
83
84 As I noted "PGG is outdated PGP library" above, PGG has several
85 limitations.  For example
86
87 - PGG can't handle a message signed with multiple keys.
88 - PGG can't prompt a user which key is being used.
89 - PGG can't create a binary PGP messages.
90 - PGG doesn't provide a way to select keys per cryptographic operation.
91 - PGG ignores GnuPG's trust metrics.
92
93 ** SEMI based MUA
94
95 SEMI is the MIME library used by Wanderlust, cmail, T-gnus, etc.
96
97 There is an EasyPG capable SEMI library called EMIKO-EasyPG.  It can
98 be downloaded from the same site of the EasyPG distribution point.
99
100 * Security
101
102 There are security pitfalls around Emacs.  EasyPG is written with
103 avoiding them.
104
105 ** Passphrase may leak to a temporary file.
106
107 The function call-process-region writes data in region to a temporary
108 file. If your PGP library used this function, your passphrases would
109 leak to the filesystem.
110
111 The EasyPG Library does not use call-process-region to communicate
112 with a gpg subprocess.
113
114 ** Passphrase may be stolen from a core file.
115
116 If Emacs crashes and dumps core, Lisp strings in memory are also
117 dumped within the core file. read-passwd function clears passphrase
118 strings by (fillarray string 0) to avoid this risk. However, Emacs
119 performs compaction in gc_sweep phase. If GC happens before fillarray,
120 passphrase strings may be moved elsewhere in memory. Therefore,
121 passphrase caching in elisp is generally a bad idea.
122
123 The EasyPG Library dares to disable passphrase caching. Fortunately,
124 there is more secure way to cache passphrases - use gpg-agent.