94c993c8a9bc2021c53b3475d312a025daa0b03c
[debian/amanda] / man / amgpgcrypt.8
1 .\"     Title: amgpgcrypt
2 .\"    Author: Kevin Till <kevin.till@zmanda.com>
3 .\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/>
4 .\"      Date: 01/22/2009
5 .\"    Manual: System Administration Commands
6 .\"    Source: Amanda 2.6.1
7 .\"  Language: English
8 .\"
9 .TH "AMGPGCRYPT" "8" "01/22/2009" "Amanda 2\&.6\&.1" "System Administration Commands"
10 .\" -----------------------------------------------------------------
11 .\" * (re)Define some macros
12 .\" -----------------------------------------------------------------
13 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14 .\" toupper - uppercase a string (locale-aware)
15 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16 .de toupper
17 .tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
18 \\$*
19 .tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
20 ..
21 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22 .\" SH-xref - format a cross-reference to an SH section
23 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24 .de SH-xref
25 .ie n \{\
26 .\}
27 .toupper \\$*
28 .el \{\
29 \\$*
30 .\}
31 ..
32 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33 .\" SH - level-one heading that works better for non-TTY output
34 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35 .de1 SH
36 .\" put an extra blank line of space above the head in non-TTY output
37 .if t \{\
38 .sp 1
39 .\}
40 .sp \\n[PD]u
41 .nr an-level 1
42 .set-an-margin
43 .nr an-prevailing-indent \\n[IN]
44 .fi
45 .in \\n[an-margin]u
46 .ti 0
47 .HTML-TAG ".NH \\n[an-level]"
48 .it 1 an-trap
49 .nr an-no-space-flag 1
50 .nr an-break-flag 1
51 \." make the size of the head bigger
52 .ps +3
53 .ft B
54 .ne (2v + 1u)
55 .ie n \{\
56 .\" if n (TTY output), use uppercase
57 .toupper \\$*
58 .\}
59 .el \{\
60 .nr an-break-flag 0
61 .\" if not n (not TTY), use normal case (not uppercase)
62 \\$1
63 .in \\n[an-margin]u
64 .ti 0
65 .\" if not n (not TTY), put a border/line under subheading
66 .sp -.6
67 \l'\n(.lu'
68 .\}
69 ..
70 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 .\" SS - level-two heading that works better for non-TTY output
72 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
73 .de1 SS
74 .sp \\n[PD]u
75 .nr an-level 1
76 .set-an-margin
77 .nr an-prevailing-indent \\n[IN]
78 .fi
79 .in \\n[IN]u
80 .ti \\n[SN]u
81 .it 1 an-trap
82 .nr an-no-space-flag 1
83 .nr an-break-flag 1
84 .ps \\n[PS-SS]u
85 \." make the size of the head bigger
86 .ps +2
87 .ft B
88 .ne (2v + 1u)
89 .if \\n[.$] \&\\$*
90 ..
91 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
92 .\" BB/BE - put background/screen (filled box) around block of text
93 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
94 .de BB
95 .if t \{\
96 .sp -.5
97 .br
98 .in +2n
99 .ll -2n
100 .gcolor red
101 .di BX
102 .\}
103 ..
104 .de EB
105 .if t \{\
106 .if "\\$2"adjust-for-leading-newline" \{\
107 .sp -1
108 .\}
109 .br
110 .di
111 .in
112 .ll
113 .gcolor
114 .nr BW \\n(.lu-\\n(.i
115 .nr BH \\n(dn+.5v
116 .ne \\n(BHu+.5v
117 .ie "\\$2"adjust-for-leading-newline" \{\
118 \M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
119 .\}
120 .el \{\
121 \M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
122 .\}
123 .in 0
124 .sp -.5v
125 .nf
126 .BX
127 .in
128 .sp .5v
129 .fi
130 .\}
131 ..
132 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
133 .\" BM/EM - put colored marker in margin next to block of text
134 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
135 .de BM
136 .if t \{\
137 .br
138 .ll -2n
139 .gcolor red
140 .di BX
141 .\}
142 ..
143 .de EM
144 .if t \{\
145 .br
146 .di
147 .ll
148 .gcolor
149 .nr BH \\n(dn
150 .ne \\n(BHu
151 \M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[]
152 .in 0
153 .nf
154 .BX
155 .in
156 .fi
157 .\}
158 ..
159 .\" -----------------------------------------------------------------
160 .\" * set default formatting
161 .\" -----------------------------------------------------------------
162 .\" disable hyphenation
163 .nh
164 .\" disable justification (adjust text to left margin only)
165 .ad l
166 .\" -----------------------------------------------------------------
167 .\" * MAIN CONTENT STARTS HERE *
168 .\" -----------------------------------------------------------------
169 .SH "Name"
170 amgpgcrypt \- reference crypt program for \fIAmanda\fR public\-key data encryption
171 .SH "Synopsis"
172 .fam C
173 .HP \w'\fBamgpgcrypt\fR\ 'u
174 \fBamgpgcrypt\fR  to be called by \fIAmanda\fR only 
175 .fam
176 .SH "DESCRIPTION"
177 .PP
178
179 \fBamgpgcrypt\fR
180 calls
181 \fBgpg\fR
182 to perform public\-key data encryption on
183 \fIAmanda\fR
184 backup\&.
185 \fBamgpgcrypt\fR
186 will search for the gpg program in the following directories: /usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin
187 .PP
188
189 \fBamgpgcrypt\fR
190 sets GNUPGHOME to $AMANDA_HOME/\&.gnupg where gpg will look for the gpg keys\&.
191 \fBamgpgcrypt\fR
192 uses the public key to encrypt the
193 \fIAmanda\fR
194 data and uses the private key to decrypt the
195 \fIAmanda\fR
196 backup data\&. Thus, passphrase is only required at the time of data restore\&.
197 .SH "Key and Passphrase"
198 .PP
199
200 \fBamgpgcrypt\fR
201 uses the private key to decrypt
202 \fIAmanda\fR
203 backup data\&.
204
205 It is very important to store, manage and  protect the key and the passphrase
206 properly\&. Encrypted backup data can \fBonly\fR be recovered with the correct key and
207 passphrase\&.
208 .SH "How to create encryption keys and Passphrase for amgpgcrypt"
209 .PP
210 Store the passphrase that you used in following "gpg \-\-gen\-key" command inside the home\-directory of the AMANDA\-user($amanda_user) and protect it with proper permissions:
211
212    echo my_secret_passphrase > ~$amanda_user/\&.am_passphrase
213    chown $amanda_user:disk ~$amanda_user/\&.am_passphrase
214    chmod 700 ~$amanda_user/\&.am_passphrase
215 .PP
216 Run "gpg \-\-gen\-key"\&. Below is an example:
217 .nf
218 $ gpg \-\-gen\-key
219 gpg (GnuPG) 1\&.2\&.6; Copyright (C) 2004 Free Software Foundation, Inc\&.
220 This program comes with ABSOLUTELY NO WARRANTY\&.
221 This is free software, and you are welcome to redistribute it
222 under certain conditions\&. See the file COPYING for details\&.
223
224 Please select what kind of key you want:
225    (1) DSA and ElGamal (default)
226    (2) DSA (sign only)
227    (4) RSA (sign only)
228 Your selection? 1
229 DSA keypair will have 1024 bits\&.
230 About to generate a new ELG\-E keypair\&.
231               minimum keysize is  768 bits
232               default keysize is 1024 bits
233     highest suggested keysize is 2048 bits
234 What keysize do you want? (1024)
235 Requested keysize is 1024 bits
236 Please specify how long the key should be valid\&.
237          0 = key does not expire
238       (n)  = key expires in n days
239       (n)w = key expires in n weeks
240       (n)m = key expires in n months
241       (n)y = key expires in n years
242 Key is valid for? (0) 6m
243 Key expires at Sun 06 Aug 2006 03:51:25 PM PDT
244 Is this correct (y/n)? y
245
246 You need a User\-ID to identify your key; the software constructs the user id
247 from Real Name, Comment and Email Address in this form:
248     "Heinrich Heine (Der Dichter) (heinrichh@duesseldorf\&.de)"
249
250 Real name: amandabackup
251 Email address:
252 Comment: gpg keys for amandabackup
253 You selected this USER\-ID:
254     "amandabackup (gpg keys for amandabackup)"
255
256 Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? o
257 You need a Passphrase to protect your secret key\&.
258
259 We need to generate a lot of random bytes\&. It is a good idea to perform
260 some other action (type on the keyboard, move the mouse, utilize the
261 disks) during the prime generation; this gives the random number
262 generator a better chance to gain enough entropy\&.
263
264 We need to generate a lot of random bytes\&. It is a good idea to perform
265 some other action (type on the keyboard, move the mouse, utilize the
266 disks) during the prime generation; this gives the random number
267 generator a better chance to gain enough entropy\&.
268
269 public and secret key created and signed\&.
270 key marked as ultimately trusted\&.
271
272 pub  1024D/4417A8CB 2006\-02\-07 amandabackup (gpg keys for amandabackup)
273      Key fingerprint = 139C 6369 44FC 7F1A 655C  E5E9 7EAA 515A 4417 A8CB
274 sub  1024g/8C3A6A78 2006\-02\-07 [expires: 2006\-08\-06]
275 .fi
276 .SH "Files"
277 .PP
278 \fB$AMANDA_HOME/\&.gnupg/pubring\&.gpg\fR
279 .RS 4
280 The public key\&.
281 \fBamgpgcrypt\fR
282 encrypt data with this public key along with the cipher algorithm\&.
283 .RE
284 .PP
285 \fB$AMANDA_HOME/\&.gnupg/secring\&.gpg\fR
286 .RS 4
287 The private/secret key\&. It\'s only needed during amrecover/amrestore\&. Store and protect it properly during other time\&.
288 .RE
289 .PP
290 \fB$AMANDA_HOME/\&.am_passphrase\fR
291 .RS 4
292 The passphrase\&. It\'s only needed during amrecover/amrestore\&. Store and protect it properly during other time\&.
293 .RE
294 .SH "BUGS"
295 .PP
296 \fIAmanda\fR
297 has problem with gpg mdc(modification detection code) in the binary mode\&.
298 \fBamgpgcrypt\fR
299 calls gpg with mdc disabled
300 .SH "SEE ALSO"
301 .PP
302
303 \fBamanda\fR(8),
304 \fBamanda.conf\fR(5),
305 \fBamcrypt\fR(8),
306 \fBamrestore\fR(8),
307 \fBgpg\fR(1),
308 : http://wiki.zmanda.com
309 .SH "Author"
310 .PP
311 \fBKevin Till\fR <\&kevin\&.till@zmanda\&.com\&>
312 .RS 4
313 Zmanda, Inc\&. (\FChttp://www\&.zmanda\&.com\F[])
314 .RE