036744893557fa7e6c7c87e504f3a3977e567672
[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 ** Transparent file encryption utility
20
21 EasyPG provides transparent file encryption utility similar to
22 crypt++, alpaca.el, hedgehog.  To try this feature, add the following
23 line to your ~/.emacs and C-x C-f ~/test.txt.gpg.
24
25 (require 'epg-file)
26
27 ** Gnus/PGG backend
28
29 EasyPG provides an implementation of the backend interface of
30 Gnus/PGG.  To use EasyPG instead of pgg-gpg, install pgg-epg.el and
31 add the following line to your ~/.gnus.
32
33 (setq pgg-scheme 'epg)
34
35 * Advantages over other competitors
36
37 There are many competitors of EasyPG such as Mailcrypt, PGG, gpg.el,
38 etc.  EasyPG has some advantages over them.
39
40 ** EasyPG avoides potential security flaws of Emacs.
41
42 *** `call-process-region' writes data in region to temporary files.
43
44 `call-process-region' writes data in region to temporary files.  PGG
45 and gpg.el use `call-process-region' to communicate with a gpg
46 subprocess.  Your passphrases leak to the filesystem!
47
48 *** There is no way to clear strings safely.
49
50 If Emacs crashed and dumps core, passphrase strings in memory are also
51 dumped within the core file.  `read-passwd' function clears passphrase
52 strings by `(fillarray string 0)'.  However, Emacs performs compaction
53 in gc_sweep phase.  If GC happens before `fillarray', passphrase
54 strings may be moved elsewhere in memory.  It is recommended that as
55 soon as you are done with passphrase you should clear it manually.
56 However, PGG and gpg.el can keep passphrase strings in cache for a
57 while and this behavior is their default!
58
59 ** GnuPG features are directly accessible from Emacs
60
61 Other competitors provide only specific features of GnuPG since they
62 still support PGP 2.*, 5.*, 6.*.  As the name indicates, EasyPG is
63 inspired by GPGME (GnuPG Made Easy), and the library interface is
64 close to GPGME.  With EasyPG you can benefit from a lot of features of
65 GnuPG.