Merge from vendor branch LIBARCHIVE:
[dragonfly.git] / contrib / bind-9.3 / bin / dnssec / dnssec-keygen.8
1 .\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
2 .\" Copyright (C) 2000-2003 Internet Software Consortium.
3 .\" 
4 .\" Permission to use, copy, modify, and distribute this software for any
5 .\" purpose with or without fee is hereby granted, provided that the above
6 .\" copyright notice and this permission notice appear in all copies.
7 .\" 
8 .\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
9 .\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10 .\" AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
11 .\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12 .\" LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
13 .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14 .\" PERFORMANCE OF THIS SOFTWARE.
15 .\"
16 .\" $Id: dnssec-keygen.8,v 1.19.12.10 2006/06/29 13:02:30 marka Exp $
17 .\"
18 .hy 0
19 .ad l
20 .\"     Title: dnssec\-keygen
21 .\"    Author: 
22 .\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
23 .\"      Date: June 30, 2000
24 .\"    Manual: BIND9
25 .\"    Source: BIND9
26 .\"
27 .TH "DNSSEC\-KEYGEN" "8" "June 30, 2000" "BIND9" "BIND9"
28 .\" disable hyphenation
29 .nh
30 .\" disable justification (adjust text to left margin only)
31 .ad l
32 .SH "NAME"
33 dnssec\-keygen \- DNSSEC key generation tool
34 .SH "SYNOPSIS"
35 .HP 14
36 \fBdnssec\-keygen\fR {\-a\ \fIalgorithm\fR} {\-b\ \fIkeysize\fR} {\-n\ \fInametype\fR} [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-e\fR] [\fB\-f\ \fR\fB\fIflag\fR\fR] [\fB\-g\ \fR\fB\fIgenerator\fR\fR] [\fB\-h\fR] [\fB\-k\fR] [\fB\-p\ \fR\fB\fIprotocol\fR\fR] [\fB\-r\ \fR\fB\fIrandomdev\fR\fR] [\fB\-s\ \fR\fB\fIstrength\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] {name}
37 .SH "DESCRIPTION"
38 .PP
39 \fBdnssec\-keygen\fR
40 generates keys for DNSSEC (Secure DNS), as defined in RFC 2535 and RFC <TBA\\>. It can also generate keys for use with TSIG (Transaction Signatures), as defined in RFC 2845.
41 .SH "OPTIONS"
42 .TP 3n
43 \-a \fIalgorithm\fR
44 Selects the cryptographic algorithm. The value of
45 \fBalgorithm\fR
46 must be one of RSAMD5 (RSA) or RSASHA1, DSA, DH (Diffie Hellman), or HMAC\-MD5. These values are case insensitive.
47 .sp
48 Note 1: that for DNSSEC, RSASHA1 is a mandatory to implement algorithm, and DSA is recommended. For TSIG, HMAC\-MD5 is mandatory.
49 .sp
50 Note 2: HMAC\-MD5 and DH automatically set the \-k flag.
51 .TP 3n
52 \-b \fIkeysize\fR
53 Specifies the number of bits in the key. The choice of key size depends on the algorithm used. RSAMD5 / RSASHA1 keys must be between 512 and 2048 bits. Diffie Hellman keys must be between 128 and 4096 bits. DSA keys must be between 512 and 1024 bits and an exact multiple of 64. HMAC\-MD5 keys must be between 1 and 512 bits.
54 .TP 3n
55 \-n \fInametype\fR
56 Specifies the owner type of the key. The value of
57 \fBnametype\fR
58 must either be ZONE (for a DNSSEC zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with a host (KEY)), USER (for a key associated with a user(KEY)) or OTHER (DNSKEY). These values are case insensitive.
59 .TP 3n
60 \-c \fIclass\fR
61 Indicates that the DNS record containing the key should have the specified class. If not specified, class IN is used.
62 .TP 3n
63 \-e
64 If generating an RSAMD5/RSASHA1 key, use a large exponent.
65 .TP 3n
66 \-f \fIflag\fR
67 Set the specified flag in the flag field of the KEY/DNSKEY record. The only recognized flag is KSK (Key Signing Key) DNSKEY.
68 .TP 3n
69 \-g \fIgenerator\fR
70 If generating a Diffie Hellman key, use this generator. Allowed values are 2 and 5. If no generator is specified, a known prime from RFC 2539 will be used if possible; otherwise the default is 2.
71 .TP 3n
72 \-h
73 Prints a short summary of the options and arguments to
74 \fBdnssec\-keygen\fR.
75 .TP 3n
76 \-k
77 Generate KEY records rather than DNSKEY records.
78 .TP 3n
79 \-p \fIprotocol\fR
80 Sets the protocol value for the generated key. The protocol is a number between 0 and 255. The default is 3 (DNSSEC). Other possible values for this argument are listed in RFC 2535 and its successors.
81 .TP 3n
82 \-r \fIrandomdev\fR
83 Specifies the source of randomness. If the operating system does not provide a
84 \fI/dev/random\fR
85 or equivalent device, the default source of randomness is keyboard input.
86 \fIrandomdev\fR
87 specifies the name of a character device or file containing random data to be used instead of the default. The special value
88 \fIkeyboard\fR
89 indicates that keyboard input should be used.
90 .TP 3n
91 \-s \fIstrength\fR
92 Specifies the strength value of the key. The strength is a number between 0 and 15, and currently has no defined purpose in DNSSEC.
93 .TP 3n
94 \-t \fItype\fR
95 Indicates the use of the key.
96 \fBtype\fR
97 must be one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF. The default is AUTHCONF. AUTH refers to the ability to authenticate data, and CONF the ability to encrypt data.
98 .TP 3n
99 \-v \fIlevel\fR
100 Sets the debugging level.
101 .SH "GENERATED KEYS"
102 .PP
103 When
104 \fBdnssec\-keygen\fR
105 completes successfully, it prints a string of the form
106 \fIKnnnn.+aaa+iiiii\fR
107 to the standard output. This is an identification string for the key it has generated.
108 .TP 3n
109 \(bu
110 \fInnnn\fR
111 is the key name.
112 .TP 3n
113 \(bu
114 \fIaaa\fR
115 is the numeric representation of the algorithm.
116 .TP 3n
117 \(bu
118 \fIiiiii\fR
119 is the key identifier (or footprint).
120 .sp
121 .RE
122 .PP
123 \fBdnssec\-keygen\fR
124 creates two file, with names based on the printed string.
125 \fIKnnnn.+aaa+iiiii.key\fR
126 contains the public key, and
127 \fIKnnnn.+aaa+iiiii.private\fR
128 contains the private key.
129 .PP
130 The
131 \fI.key\fR
132 file contains a DNS KEY record that can be inserted into a zone file (directly or with a $INCLUDE statement).
133 .PP
134 The
135 \fI.private\fR
136 file contains algorithm specific fields. For obvious security reasons, this file does not have general read permission.
137 .PP
138 Both
139 \fI.key\fR
140 and
141 \fI.private\fR
142 files are generated for symmetric encryption algorithm such as HMAC\-MD5, even though the public and private key are equivalent.
143 .SH "EXAMPLE"
144 .PP
145 To generate a 768\-bit DSA key for the domain
146 \fBexample.com\fR, the following command would be issued:
147 .PP
148 \fBdnssec\-keygen \-a DSA \-b 768 \-n ZONE example.com\fR
149 .PP
150 The command would print a string of the form:
151 .PP
152 \fBKexample.com.+003+26160\fR
153 .PP
154 In this example,
155 \fBdnssec\-keygen\fR
156 creates the files
157 \fIKexample.com.+003+26160.key\fR
158 and
159 \fIKexample.com.+003+26160.private\fR
160 .SH "SEE ALSO"
161 .PP
162 \fBdnssec\-signzone\fR(8),
163 BIND 9 Administrator Reference Manual,
164 RFC 2535,
165 RFC 2845,
166 RFC 2539.
167 .SH "AUTHOR"
168 .PP
169 Internet Systems Consortium
170 .SH "COPYRIGHT"
171 Copyright \(co 2004, 2005 Internet Systems Consortium, Inc. ("ISC")