ea0d7be5960b58d24694a6dff5599d9d73c84fdc
[debian/amanda] / man / xml-source / amcrypt-ossl-asym.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='amcrypt-asym-ossl.8'>
11
12 <refmeta>
13   <refentrytitle>amcrypt-ossl-asym</refentrytitle>
14   <manvolnum>8</manvolnum>
15 &rmi.source;
16 &rmi.version;
17 &rmi.manual.8;
18 </refmeta>
19 <refnamediv>
20   <refname>amcrypt-ossl-asym</refname>
21   <refpurpose>crypt program for &A; asymmetric data encryption using OpenSSL</refpurpose>
22 </refnamediv>
23 <refentryinfo>
24 &author.ktill;
25 </refentryinfo>
26 <!-- body begins here -->
27 <refsynopsisdiv>
28   <cmdsynopsis>
29     <command>amcrypt-ossl-asym</command>    
30     <arg choice="opt">-d</arg>
31   </cmdsynopsis>
32 </refsynopsisdiv>
33 <refsect1>
34   <title>DESCRIPTION</title>
35   <para>
36     &amcryptosslasym; uses <emphasis remap='B'>OpenSSL</emphasis> to
37     encrypt and decrypt data. OpenSSL is available from <ulink
38     url="http://www.openssl.org/">www.openssl.org</ulink>. OpenSSL
39     offers a wide variety of cipher choices (&amcryptosslasym; defaults
40     to 256-bit AES) and can use hardware cryptographic accelerators on
41     several platforms.
42   </para>
43   <para>
44     &amcryptosslasym; will search for the OpenSSL program in the following
45     directories: /bin:/usr/bin:/usr/local/bin:/usr/ssl/bin:/usr/local/ssl/bin.
46   </para>
47 </refsect1>
48 <refsect1>
49   <title>GENERATING PUBLIC AND PRIVATE KEYS</title>
50   <para>
51     RSA keys can be generated with the standard OpenSSL commands, e.g.:
52   </para>
53   <programlisting>
54 $ cd /var/lib/amanda
55 $ openssl genrsa -aes128 -out backup-privkey.pem 1024
56 Generating RSA private key, 1024 bit long modulus
57 [...]
58 Enter pass phrase for backup-privkey.pem: <emphasis remap='I'>ENTER YOUR PASS PHRASE</emphasis>
59 Verifying - Enter pass phrase for backup-key.pem: <emphasis remap='I'>ENTER YOUR PASS PHRASE</emphasis>
60
61 $ openssl rsa -in backup-privkey.pem -pubout -out backup-pubkey.pem
62 Enter pass phrase for backup-privkey.pem: <emphasis remap='I'>ENTER YOUR PASS PHRASE</emphasis>
63 Writing RSA key
64
65 </programlisting>
66   <para>
67     To generate a private key without a passphrase, omit the
68     <option>-aes128</option> option. See
69     <citerefentry><refentrytitle>openssl_genrsa</refentrytitle><manvolnum>1</manvolnum></citerefentry>
70     for more key generation options.
71   </para>
72   <para>
73     Note that it is always possible to generate the public key from the
74     private key.
75   </para>
76 </refsect1>
77 <refsect1>
78   <title>KEY AND PASSPHRASE MANAGEMENT</title>
79   <para>
80     &amcryptosslasym; uses the <emphasis remap='I'>public key</emphasis>
81     to encrypt data. The security of the data does not depend on the
82     confidentiality of the public key. The <emphasis remap='I'>private
83     key</emphasis> is used to decrypt data, and must be protected.
84     Encrypted backup data cannot be recovered without the private key.
85     The private key may optionally be encrypted with a passphrase.
86   </para>
87   <para>
88     While the public key must be online at all times to perorm backups,
89     the private key and optional passphrase are only needed to restore
90     data. It is recommended that the latter be stored offline all other
91     times. For example, you could keep the private key on removable media,
92     and copy it into place for a restore; or you could keep the private
93     key online, encrypted with a passphrase that is present only for a
94     restore.
95   </para>
96   <para>
97     OpenSSL's key derivation routines use a salt to guard against
98     dictionary attacks on the pass phrase; still it is important to pick
99     a pass phrase that is hard to guess. The Diceware method (see <ulink
100     url="http://www.diceware.com/">www.diceware.com</ulink>) can
101     be used to create passphrases that are difficult to guess and easy to
102     remember.
103   </para>
104 </refsect1>
105 <refsect1>
106   <title>FILES</title>
107   <variablelist remap='TP'>
108     <varlistentry>
109       <term>/var/lib/amanda/backup-privkey.pem</term>
110       <listitem>
111         <para>
112           File containing the RSA private key. It should not be readable
113           by any user other than the &A; user.
114         </para>
115       </listitem>
116     </varlistentry>
117     <varlistentry>
118       <term>/var/lib/amanda/backup-pubkey.pem</term>
119       <listitem>
120         <para>
121           File containing the RSA public key.
122         </para>
123       </listitem>
124     </varlistentry>
125     <varlistentry>
126       <term>/var/lib/amanda/.am_passphrase</term>
127       <listitem>
128         <para>
129           File containing the passphrase. It should not be readable by
130           any user other than the &A; user.
131         </para>
132       </listitem>
133     </varlistentry>
134   </variablelist>
135 </refsect1>
136
137 <refsect1>
138   <title>SEE ALSO</title>
139   <para>
140     <citerefentry>
141       <refentrytitle>amanda</refentrytitle>
142       <manvolnum>8</manvolnum>
143     </citerefentry>,
144     <citerefentry>
145       <refentrytitle>amanda.conf</refentrytitle>
146       <manvolnum>5</manvolnum>
147     </citerefentry>,
148     <citerefentry>
149       <refentrytitle>openssl</refentrytitle>
150       <manvolnum>1</manvolnum>
151     </citerefentry>,
152     <citerefentry>
153       <refentrytitle>amcrypt-ossl</refentrytitle>
154       <manvolnum>8</manvolnum>
155     </citerefentry>,
156     <ulink url="http://wiki.zmanda.com"/>
157   </para>
158 </refsect1>
159
160 </refentry>