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"
5 <!-- entities files to use -->
6 <!ENTITY % global_entities SYSTEM 'global.entities'>
10 <refentry id='amgpgcrypt.8'>
12 <refentrytitle>amgpgcrypt</refentrytitle>
13 <manvolnum>8</manvolnum>
19 <refname>amgpgcrypt</refname>
20 <refpurpose>reference crypt program for Amanda public-key data encryption</refpurpose>
25 <!-- body begins here -->
28 <command>amgpgcrypt</command> to be called by Amanda only
32 <refsect1><title>DESCRIPTION</title>
34 calls <emphasis remap='B'>gpg</emphasis> to perform public-key data encryption
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
40 &amgpgcrypt; uses the public key to encrypt the Amanda data
41 and uses the private key to decrypt the Amanda backup data. Thus, passphrase is only
42 required at the time of data restore.</para>
46 <refsect1><title>Key and Passphrase</title>
47 <para>&amgpgcrypt; uses the private key to decrypt Amanda 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
55 <refsect1><title>How to create encryption keys and Passphrase for amgpgcrypt</title>
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>
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.
69 Please select what kind of key you want:
70 (1) DSA and ElGamal (default)
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
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)"
95 Real name: amandabackup
97 Comment: gpg keys for amandabackup
98 You selected this USER-ID:
99 "amandabackup (gpg keys for amandabackup)"
101 Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? o
102 You need a Passphrase to protect your secret key.
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.
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.
114 public and secret key created and signed.
115 key marked as ultimately trusted.
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]
125 <refsect1><title>Files</title>
126 <variablelist remap='TP'>
128 <term><option>$AMANDA_HOME/.gnupg/pubring.gpg</option></term>
130 <para>The public key. &amgpgcrypt; encrypt data with this public key along with the
131 cipher algorithm.</para>
136 <term><option>$AMANDA_HOME/.gnupg/secring.gpg</option></term>
138 <para>The private/secret key. It's only needed during amrecover/amrestore. Store
139 and protect it properly during other time.</para>
144 <term><option>$AMANDA_HOME/.am_passphrase</option></term>
146 <para>The passphrase. It's only needed during amrecover/amrestore. Store
147 and protect it properly during other time.</para>
156 <refsect1><title>BUGS</title>
157 <para>Amanda has problem with gpg mdc(modification detection code) in the binary
158 mode. &amgpgcrypt; calls gpg with mdc disabled</para>
162 <manref name="amanda.conf" vol="5"/>,
163 <manref name="amcrypt" vol="8"/>,
164 <manref name="amrestore" vol="8"/>,
165 <manref name="gpg" vol="1"/>