OSDN Git Service

Update.
[epg/epg.git] / 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
30 * Quick start
31
32 ** Installation
33
34   $ ./configure
35   $ sudo make install
36
37 Add the following line to your ~/.emacs
38
39   (require 'epa-setup)
40
41 Restart emacs and type `M-x epa- TAB', and you will see a lot of
42 commands available.  For example,
43
44 - To browse your keyring, type `M-x epa-list-keys'
45 - To create a cleartext signature of the region, type `M-x epa-sign-region'.
46
47 You can also do some cryptographic operations from dired.
48
49   M-x dired
50   (mark some files)
51   : e (or M-x epa-dired-do-encrypt)
52   (select recipients by 'm' and click [OK])
53
54 * MUA Integration
55
56 The EasyPG Library can be used in combination with various MUA (Mail
57 User Agents).
58
59 ** CVS version of Gnus
60
61 CVS version of Gnus uses EasyPG by default.  To make sure of that,
62 check mml2015-use set to 'epg.  Other options which affect on the
63 EasyPG are
64
65   mml2015-signers
66   mml2015-encrypt-to-self
67   mml2015-cache-passphrase
68   mml2015-passphrase-cache-expiry
69   mml2015-verbose
70
71 NOTE: You don't need pgg-epg.el in this case.
72
73 ** PGG based MUA
74
75 PGG is outdated PGP library used by old Gnus (<= v5.11), MH-E, etc.
76
77 There is a PGG backend written EasyPG called pgg-epg.el.  However,
78 EasyPG API is a superset of PGG and pgg-epg.el provides nothing but
79 compatibility with PGG.
80
81 Limitations of PGG
82
83 - PGG doesn't have a user interface to select keys for typical
84   cryptographic operations
85 - PGG can't handle messages signed with multiple keys correctly
86 - PGG trusts any keys for encryption
87
88 ** SEMI based MUA
89
90 SEMI is the MIME library used by Wanderlust, cmail, T-gnus, etc.
91
92 There is an EasyPG capable SEMI library called EMIKO-EasyPG.  It can
93 be downloaded from the same site of the EasyPG distribution point.
94
95 * Security
96
97 There are security pitfalls around Emacs.  EasyPG is written with
98 avoiding them.
99
100 ** Passphrase may leak to a temporary file.
101
102 The function call-process-region writes data in region to a temporary
103 file. If your PGP library used this function, your passphrases would
104 leak to the filesystem.
105
106 The EasyPG Library does not use call-process-region to communicate
107 with a gpg subprocess.
108
109 ** Passphrase may be stolen from a core file.
110
111 If Emacs crashes and dumps core, Lisp strings in memory are also
112 dumped within the core file. read-passwd function clears passphrase
113 strings by (fillarray string 0) to avoid this risk. However, Emacs
114 performs compaction in gc_sweep phase. If GC happens before fillarray,
115 passphrase strings may be moved elsewhere in memory. Therefore,
116 passphrase caching in elisp is generally a bad idea.
117
118 The EasyPG Library dares to disable passphrase caching. Fortunately,
119 there is more secure way to cache passphrases - use gpg-agent.