b8da64b133acf5fabf2d53d60c694293b8cf6a2a
[debian/amanda] / man / xml-source / amgpgcrypt.8.xml
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3                    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
4 [
5   <!-- entities files to use -->
6   <!ENTITY % global_entities SYSTEM '../entities/global.entities'>
7   %global_entities;
8 ]>
9
10 <refentry id='amgpgcrypt.8'>
11 <refmeta>
12 <refentrytitle>amgpgcrypt</refentrytitle>
13 <manvolnum>8</manvolnum>
14 &rmi.source;
15 &rmi.version;
16 &rmi.manual.8;
17 </refmeta>
18 <refnamediv>
19 <refname>amgpgcrypt</refname>
20 <refpurpose>reference crypt program for &A; public-key data encryption</refpurpose>
21 </refnamediv>
22 <refentryinfo>
23 &author.ktill;
24 </refentryinfo>
25 <!-- body begins here -->
26 <refsynopsisdiv>
27 <cmdsynopsis>
28   <command>amgpgcrypt</command>  to be called by &A; only 
29 </cmdsynopsis>
30 </refsynopsisdiv>
31
32 <refsect1><title>DESCRIPTION</title>
33 <para>&amgpgcrypt;
34 calls <emphasis remap='B'>gpg</emphasis> to perform public-key data encryption
35 on &A; backup.
36 &amgpgcrypt; will search for the gpg program in the following directories:
37 /usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin</para>
38 <para>&amgpgcrypt; sets GNUPGHOME to $AMANDA_HOME/.gnupg where gpg will look for the
39 gpg keys.
40 &amgpgcrypt; uses the public key to encrypt the &A; data
41 and uses the private key to decrypt the &A; backup data. Thus, passphrase is only
42 required at the time of data restore.</para> 
43 </refsect1>
44
45
46 <refsect1><title>Key and Passphrase</title>
47 <para>&amgpgcrypt; uses the  private key to decrypt &A; backup data.</para>
48 It is very important to store, manage and  protect the key and the passphrase
49 properly. Encrypted backup data can <emphasis remap='B'>only</emphasis> be recovered with the correct key and
50 passphrase.
51 </refsect1>
52
53
54
55 <refsect1><title>How to create encryption keys and Passphrase for amgpgcrypt</title>
56
57 <para>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:</para>
58    echo my_secret_passphrase > ~$amanda_user/.am_passphrase
59    chown $amanda_user:disk ~$amanda_user/.am_passphrase
60    chmod 700 ~$amanda_user/.am_passphrase
61 <para> Run "gpg --gen-key". Below is an example:</para>
62 <programlisting>
63 $ gpg --gen-key
64 gpg (GnuPG) 1.2.6; Copyright (C) 2004 Free Software Foundation, Inc.
65 This program comes with ABSOLUTELY NO WARRANTY.
66 This is free software, and you are welcome to redistribute it
67 under certain conditions. See the file COPYING for details.
68
69 Please select what kind of key you want:
70    (1) DSA and ElGamal (default)
71    (2) DSA (sign only)
72    (4) RSA (sign only)
73 Your selection? 1
74 DSA keypair will have 1024 bits.
75 About to generate a new ELG-E keypair.
76               minimum keysize is  768 bits
77               default keysize is 1024 bits
78     highest suggested keysize is 2048 bits
79 What keysize do you want? (1024)
80 Requested keysize is 1024 bits
81 Please specify how long the key should be valid.
82          0 = key does not expire
83       (n)  = key expires in n days
84       (n)w = key expires in n weeks
85       (n)m = key expires in n months
86       (n)y = key expires in n years
87 Key is valid for? (0) 6m
88 Key expires at Sun 06 Aug 2006 03:51:25 PM PDT
89 Is this correct (y/n)? y
90
91 You need a User-ID to identify your key; the software constructs the user id
92 from Real Name, Comment and Email Address in this form:
93     "Heinrich Heine (Der Dichter) (heinrichh@duesseldorf.de)"
94
95 Real name: amandabackup
96 Email address:
97 Comment: gpg keys for amandabackup
98 You selected this USER-ID:
99     "amandabackup (gpg keys for amandabackup)"
100
101 Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? o
102 You need a Passphrase to protect your secret key.
103
104 We need to generate a lot of random bytes. It is a good idea to perform
105 some other action (type on the keyboard, move the mouse, utilize the
106 disks) during the prime generation; this gives the random number
107 generator a better chance to gain enough entropy.
108
109 We need to generate a lot of random bytes. It is a good idea to perform
110 some other action (type on the keyboard, move the mouse, utilize the
111 disks) during the prime generation; this gives the random number
112 generator a better chance to gain enough entropy.
113
114 public and secret key created and signed.
115 key marked as ultimately trusted.
116
117 pub  1024D/4417A8CB 2006-02-07 amandabackup (gpg keys for amandabackup)
118      Key fingerprint = 139C 6369 44FC 7F1A 655C  E5E9 7EAA 515A 4417 A8CB
119 sub  1024g/8C3A6A78 2006-02-07 [expires: 2006-08-06]
120
121 </programlisting>
122 </refsect1>
123
124
125 <refsect1><title>Files</title>
126 <variablelist remap='TP'>
127  <varlistentry>
128  <term><option>$AMANDA_HOME/.gnupg/pubring.gpg</option></term>
129   <listitem>
130 <para>The public key. &amgpgcrypt; encrypt data with this public key along with the
131 cipher algorithm.</para>
132   </listitem>
133   </varlistentry>
134
135  <varlistentry>
136  <term><option>$AMANDA_HOME/.gnupg/secring.gpg</option></term>
137   <listitem>
138 <para>The private/secret key. It's only needed during amrecover/amrestore. Store
139 and protect it properly during other time.</para>
140   </listitem>
141   </varlistentry>
142
143  <varlistentry>
144  <term><option>$AMANDA_HOME/.am_passphrase</option></term>
145   <listitem>
146 <para>The passphrase. It's only needed during amrecover/amrestore. Store
147 and protect it properly during other time.</para>
148   </listitem>
149   </varlistentry>
150
151
152 </variablelist>
153 </refsect1>
154
155
156 <refsect1><title>BUGS</title>
157 <para>&A; has problem with gpg mdc(modification detection code) in the binary
158 mode. &amgpgcrypt; calls gpg with mdc disabled</para>
159 </refsect1>
160
161 <refsect1><title>SEE ALSO</title>
162 <para>
163   <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
164   <citerefentry><refentrytitle>amanda.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
165   <citerefentry><refentrytitle>amcrypt</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
166   <citerefentry><refentrytitle>amrestore</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
167   <citerefentry><refentrytitle>gpg</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
168   <ulink url="http://wiki.zmanda.com"/>
169 </para>
170 </refsect1>
171 </refentry>
172