]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - contrib/bind9/bin/dnssec/dnssec-keygen.8
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / contrib / bind9 / bin / dnssec / dnssec-keygen.8
1 .\" Copyright (C) 2004, 2005, 2007-2010 Internet Systems Consortium, Inc. ("ISC")
2 .\" Copyright (C) 2000-2003 Internet Software Consortium.
3 .\" 
4 .\" Permission to use, copy, modify, and/or 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.40.44.4 2010/01/16 01:55:32 tbox Exp $
17 .\"
18 .hy 0
19 .ad l
20 .\"     Title: dnssec\-keygen
21 .\"    Author: 
22 .\" Generator: DocBook XSL Stylesheets v1.71.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 4034. It can also generate keys for use with TSIG (Transaction Signatures), as defined in RFC 2845.
41 .PP
42 The
43 \fBname\fR
44 of the key is specified on the command line. For DNSSEC keys, this must match the name of the zone for which the key is being generated.
45 .SH "OPTIONS"
46 .PP
47 \-a \fIalgorithm\fR
48 .RS 4
49 Selects the cryptographic algorithm. For DNSSEC keys, the value of
50 \fBalgorithm\fR
51 must be one of RSAMD5, RSASHA1, DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256 or RSASHA512. For TSIG/TKEY, the value must be DH (Diffie Hellman), HMAC\-MD5, HMAC\-SHA1, HMAC\-SHA224, HMAC\-SHA256, HMAC\-SHA384, or HMAC\-SHA512. These values are case insensitive.
52 .sp
53 Note 1: that for DNSSEC, RSASHA1 is a mandatory to implement algorithm, and DSA is recommended. For TSIG, HMAC\-MD5 is mandatory.
54 .sp
55 Note 2: HMAC\-MD5 and DH automatically set the \-k flag.
56 .RE
57 .PP
58 \-b \fIkeysize\fR
59 .RS 4
60 Specifies the number of bits in the key. The choice of key size depends on the algorithm used. RSA 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 keys must be between 1 and 512 bits.
61 .RE
62 .PP
63 \-n \fInametype\fR
64 .RS 4
65 Specifies the owner type of the key. The value of
66 \fBnametype\fR
67 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. Defaults to ZONE for DNSKEY generation.
68 .RE
69 .PP
70 \-c \fIclass\fR
71 .RS 4
72 Indicates that the DNS record containing the key should have the specified class. If not specified, class IN is used.
73 .RE
74 .PP
75 \-e
76 .RS 4
77 If generating an RSAMD5/RSASHA1 key, use a large exponent.
78 .RE
79 .PP
80 \-f \fIflag\fR
81 .RS 4
82 Set the specified flag in the flag field of the KEY/DNSKEY record. The only recognized flag is KSK (Key Signing Key) DNSKEY.
83 .RE
84 .PP
85 \-g \fIgenerator\fR
86 .RS 4
87 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.
88 .RE
89 .PP
90 \-h
91 .RS 4
92 Prints a short summary of the options and arguments to
93 \fBdnssec\-keygen\fR.
94 .RE
95 .PP
96 \-k
97 .RS 4
98 Generate KEY records rather than DNSKEY records.
99 .RE
100 .PP
101 \-p \fIprotocol\fR
102 .RS 4
103 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.
104 .RE
105 .PP
106 \-r \fIrandomdev\fR
107 .RS 4
108 Specifies the source of randomness. If the operating system does not provide a
109 \fI/dev/random\fR
110 or equivalent device, the default source of randomness is keyboard input.
111 \fIrandomdev\fR
112 specifies the name of a character device or file containing random data to be used instead of the default. The special value
113 \fIkeyboard\fR
114 indicates that keyboard input should be used.
115 .RE
116 .PP
117 \-s \fIstrength\fR
118 .RS 4
119 Specifies the strength value of the key. The strength is a number between 0 and 15, and currently has no defined purpose in DNSSEC.
120 .RE
121 .PP
122 \-t \fItype\fR
123 .RS 4
124 Indicates the use of the key.
125 \fBtype\fR
126 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.
127 .RE
128 .PP
129 \-v \fIlevel\fR
130 .RS 4
131 Sets the debugging level.
132 .RE
133 .SH "GENERATED KEYS"
134 .PP
135 When
136 \fBdnssec\-keygen\fR
137 completes successfully, it prints a string of the form
138 \fIKnnnn.+aaa+iiiii\fR
139 to the standard output. This is an identification string for the key it has generated.
140 .TP 4
141 \(bu
142 \fInnnn\fR
143 is the key name.
144 .TP 4
145 \(bu
146 \fIaaa\fR
147 is the numeric representation of the algorithm.
148 .TP 4
149 \(bu
150 \fIiiiii\fR
151 is the key identifier (or footprint).
152 .PP
153 \fBdnssec\-keygen\fR
154 creates two files, with names based on the printed string.
155 \fIKnnnn.+aaa+iiiii.key\fR
156 contains the public key, and
157 \fIKnnnn.+aaa+iiiii.private\fR
158 contains the private key.
159 .PP
160 The
161 \fI.key\fR
162 file contains a DNS KEY record that can be inserted into a zone file (directly or with a $INCLUDE statement).
163 .PP
164 The
165 \fI.private\fR
166 file contains algorithm\-specific fields. For obvious security reasons, this file does not have general read permission.
167 .PP
168 Both
169 \fI.key\fR
170 and
171 \fI.private\fR
172 files are generated for symmetric encryption algorithms such as HMAC\-MD5, even though the public and private key are equivalent.
173 .SH "EXAMPLE"
174 .PP
175 To generate a 768\-bit DSA key for the domain
176 \fBexample.com\fR, the following command would be issued:
177 .PP
178 \fBdnssec\-keygen \-a DSA \-b 768 \-n ZONE example.com\fR
179 .PP
180 The command would print a string of the form:
181 .PP
182 \fBKexample.com.+003+26160\fR
183 .PP
184 In this example,
185 \fBdnssec\-keygen\fR
186 creates the files
187 \fIKexample.com.+003+26160.key\fR
188 and
189 \fIKexample.com.+003+26160.private\fR.
190 .SH "SEE ALSO"
191 .PP
192 \fBdnssec\-signzone\fR(8),
193 BIND 9 Administrator Reference Manual,
194 RFC 2539,
195 RFC 2845,
196 RFC 4034.
197 .SH "AUTHOR"
198 .PP
199 Internet Systems Consortium
200 .SH "COPYRIGHT"
201 Copyright \(co 2004, 2005, 2007\-2010 Internet Systems Consortium, Inc. ("ISC")
202 .br
203 Copyright \(co 2000\-2003 Internet Software Consortium.
204 .br