7084cb5bbf413fdd0e5eaa4fac9376a0ce26ff19
[elisp/epg.git] / README
1 * What's this?
2
3 EasyPG is yet another GnuPG interface for Emacs.  It consists of three
4 parts: transparent file encryption utility, Gnus/PGG backend, and
5 elisp library to interact with GnuPG.
6
7 * Requirements
8
9 ** GNU Emacs 21.4 or later
10
11 ** XEmacs 21.4 or later
12
13 ** GnuPG 1.4.3 or later
14
15 ** Gnus 5.10.8 or later (optional)
16
17 * Quick start
18
19 ** Installation
20
21 $ ./configure
22 $ sudo make install
23
24 ** Transparent file encryption utility
25
26 EasyPG provides transparent file encryption utility similar to
27 crypt++, alpaca.el, hedgehog.  To try this, add the following line to
28 your ~/.emacs and C-x C-f ~/test.txt.gpg.
29
30 (require 'epf)
31
32 ** Gnus/PGG backend
33
34 EasyPG provides an implementation of the backend interface of
35 Gnus/PGG.  To use EasyPG instead of pgg-gpg, install pgg-epg.el and
36 add the following line to your ~/.gnus.
37
38 (setq pgg-scheme 'epg)
39
40 * Advantages over other competitors
41
42 There are many competitors of EasyPG such as Mailcrypt, Gnus/PGG,
43 gpg.el, etc.  EasyPG has some advantages over them.
44
45 ** EasyPG avoides potential security flaws of Emacs
46
47 See "Security consideration" section.
48
49 ** GnuPG features are directly accessible from Emacs
50
51 Other competitors provide only specific features of GnuPG since they
52 still support PGP 2.*, 5.*, 6.*.  As the name indicates, EasyPG is
53 inspired by GPGME (GnuPG Made Easy), and the library interface is
54 close to GPGME.  With EasyPG you can benefit from a lot of features of
55 GnuPG.
56
57 * Security consideration
58
59 ** `call-process-region' writes data in region to a temporary file
60
61 `call-process-region' writes data in region to a temporary file.
62 EasyPG does *not* use `call-process-region' to communicate with a gpg
63 subprocess.
64
65 ** `(fillarray string 0)' is not enough to clear passphrases
66
67 If Emacs crashed and dumps core, passphrase strings in memory are also
68 dumped within the core file.  `read-passwd' function clears passphrase
69 strings by `(fillarray string 0)'.  However, Emacs performs compaction
70 in gc_sweep phase.  If GC happens before `fillarray', passphrase
71 strings may be moved elsewhere in memory.
72
73 Fortunately, there is gpg-agent to cache passphrases in more secure
74 way, so EasyPG dares *not* to cache passphrase.  Elisp programs can
75 set `epg-context-passphrase-callback' to cache user's passphrases.
76