Imported Upstream version 2.5.1
[debian/amanda] / man / amcrypt-ossl-asym.8
1 .\"Generated by db2man.xsl. Don't modify this, modify the source.
2 .de Sh \" Subsection
3 .br
4 .if t .Sp
5 .ne 5
6 .PP
7 \fB\\$1\fR
8 .PP
9 ..
10 .de Sp \" Vertical space (when we can't use .PP)
11 .if t .sp .5v
12 .if n .sp
13 ..
14 .de Ip \" List item
15 .br
16 .ie \\n(.$>=3 .ne \\$3
17 .el .ne 3
18 .IP "\\$1" \\$2
19 ..
20 .TH "AMCRYPT-OSSL-ASYM" 8 "" "" ""
21 .SH "NAME"
22 amcrypt-ossl-asym - crypt program for Amanda asymmetric data encryption using OpenSSL
23 .SH "SYNOPSIS"
24 .HP 18
25 \fBamcrypt-ossl-asym\fR [-d]
26 .SH "DESCRIPTION"
27 .PP
28 \fBamcrypt-ossl-asym\fR
29 uses
30 \fBOpenSSL\fR
31 to encrypt and decrypt data. OpenSSL is available from
32 www.openssl.org. OpenSSL offers a wide variety of cipher choices (
33 \fBamcrypt-ossl-asym\fR
34 defaults to 256-bit AES) and can use hardware cryptographic accelerators on several platforms.
35 .PP
36 \fBamcrypt-ossl-asym\fR
37 will search for the OpenSSL program in the following directories: /bin:/usr/bin:/usr/local/bin:/usr/ssl/bin:/usr/local/ssl/bin.
38 .SH "GENERATING PUBLIC AND PRIVATE KEYS"
39 .PP
40 RSA keys can be generated with the standard OpenSSL commands, e.g.:
41 .nf
42
43 $ cd /var/lib/amanda
44 $ openssl genrsa -aes128 -out backup-privkey.pem 1024
45 Generating RSA private key, 1024 bit long modulus
46 [...]
47 Enter pass phrase for backup-privkey.pem: \fBENTER YOUR PASS PHRASE\fR
48 Verifying - Enter pass phrase for backup-key.pem: \fBENTER YOUR PASS PHRASE\fR
49
50 $ openssl rsa -in backup-privkey.pem -pubout -out backup-pubkey.pem
51 Enter pass phrase for backup-privkey.pem: \fBENTER YOUR PASS PHRASE\fR
52 Writing RSA key
53
54 .fi
55 .PP
56 To generate a private key without a passphrase, omit the
57 \fB-aes128\fR
58 option. See
59 \fBopenssl_genrsa\fR(1)
60 for more key generation options.
61 .PP
62 Note that it is always possible to generate the public key from the private key.
63 .SH "KEY AND PASSPHRASE MANAGEMENT"
64 .PP
65 \fBamcrypt-ossl-asym\fR
66 uses the
67 \fBpublic key\fR
68 to encrypt data. The security of the data does not depend on the confidentiality of the public key. The
69 \fBprivate key\fR
70 is used to decrypt data, and must be protected. Encrypted backup data cannot be recovered without the private key. The private key may optionally be encrypted with a passphrase.
71 .PP
72 While the public key must be online at all times to perorm backups, the private key and optional passphrase are only needed to restore data. It is recommended that the latter be stored offline all other times. For example, you could keep the private key on removable media, and copy it into place for a restore; or you could keep the private key online, encrypted with a passphrase that is present only for a restore.
73 .PP
74 OpenSSL's key derivation routines use a salt to guard against dictionary attacks on the pass phrase; still it is important to pick a pass phrase that is hard to guess. The Diceware method (see
75 www.diceware.com) can be used to create passphrases that are difficult to guess and easy to remember.
76 .SH "FILES"
77 .TP
78 /var/lib/amanda/backup-privkey.pem
79 File containing the RSA private key. It should not be readable by any user other than the
80 \fBAmanda\fR
81 user.
82 .TP
83 /var/lib/amanda/backup-pubkey.pem
84 File containing the RSA public key.
85 .TP
86 /var/lib/amanda/.am_passphrase
87 File containing the passphrase. It should not be readable by any user other than the
88 \fBAmanda\fR
89 user.
90 .SH "SEE ALSO"
91 .PP
92 \fBamanda\fR(8),
93 \fBamanda.conf\fR(5),
94 \fBopenssl\fR(1),
95 \fBamcrypt-ossl\fR(8)
96