1 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3 [<!ENTITY mdash "—">]>
5 - Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
6 - Copyright (C) 2000-2003 Internet Software Consortium.
8 - Permission to use, copy, modify, and/or distribute this software for any
9 - purpose with or without fee is hereby granted, provided that the above
10 - copyright notice and this permission notice appear in all copies.
12 - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
13 - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
14 - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
15 - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
16 - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
17 - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
18 - PERFORMANCE OF THIS SOFTWARE.
21 <!-- $Id: dnssec-keygen.docbook,v 1.7.18.13 2008/10/15 23:46:06 tbox Exp $ -->
22 <refentry id="man.dnssec-keygen">
24 <date>June 30, 2000</date>
28 <refentrytitle><application>dnssec-keygen</application></refentrytitle>
29 <manvolnum>8</manvolnum>
30 <refmiscinfo>BIND9</refmiscinfo>
34 <refname><application>dnssec-keygen</application></refname>
35 <refpurpose>DNSSEC key generation tool</refpurpose>
44 <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
51 <holder>Internet Software Consortium.</holder>
57 <command>dnssec-keygen</command>
58 <arg choice="req">-a <replaceable class="parameter">algorithm</replaceable></arg>
59 <arg choice="req">-b <replaceable class="parameter">keysize</replaceable></arg>
60 <arg choice="req">-n <replaceable class="parameter">nametype</replaceable></arg>
61 <arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
62 <arg><option>-e</option></arg>
63 <arg><option>-f <replaceable class="parameter">flag</replaceable></option></arg>
64 <arg><option>-g <replaceable class="parameter">generator</replaceable></option></arg>
65 <arg><option>-h</option></arg>
66 <arg><option>-k</option></arg>
67 <arg><option>-p <replaceable class="parameter">protocol</replaceable></option></arg>
68 <arg><option>-r <replaceable class="parameter">randomdev</replaceable></option></arg>
69 <arg><option>-s <replaceable class="parameter">strength</replaceable></option></arg>
70 <arg><option>-t <replaceable class="parameter">type</replaceable></option></arg>
71 <arg><option>-v <replaceable class="parameter">level</replaceable></option></arg>
72 <arg choice="req">name</arg>
77 <title>DESCRIPTION</title>
78 <para><command>dnssec-keygen</command>
79 generates keys for DNSSEC (Secure DNS), as defined in RFC 2535
80 and RFC 4034. It can also generate keys for use with
81 TSIG (Transaction Signatures), as defined in RFC 2845.
86 <title>OPTIONS</title>
90 <term>-a <replaceable class="parameter">algorithm</replaceable></term>
93 Selects the cryptographic algorithm. The value of
94 <option>algorithm</option> must be one of RSAMD5 (RSA) or RSASHA1,
95 DSA, DH (Diffie Hellman), or HMAC-MD5. These values
99 Note 1: that for DNSSEC, RSASHA1 is a mandatory to implement
101 and DSA is recommended. For TSIG, HMAC-MD5 is mandatory.
104 Note 2: HMAC-MD5 and DH automatically set the -k flag.
110 <term>-b <replaceable class="parameter">keysize</replaceable></term>
113 Specifies the number of bits in the key. The choice of key
114 size depends on the algorithm used. RSAMD5 / RSASHA1 keys must be
116 512 and 2048 bits. Diffie Hellman keys must be between
117 128 and 4096 bits. DSA keys must be between 512 and 1024
118 bits and an exact multiple of 64. HMAC-MD5 keys must be
119 between 1 and 512 bits.
125 <term>-n <replaceable class="parameter">nametype</replaceable></term>
128 Specifies the owner type of the key. The value of
129 <option>nametype</option> must either be ZONE (for a DNSSEC
130 zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with
132 USER (for a key associated with a user(KEY)) or OTHER (DNSKEY).
140 <term>-c <replaceable class="parameter">class</replaceable></term>
143 Indicates that the DNS record containing the key should have
144 the specified class. If not specified, class IN is used.
153 If generating an RSAMD5/RSASHA1 key, use a large exponent.
159 <term>-f <replaceable class="parameter">flag</replaceable></term>
162 Set the specified flag in the flag field of the KEY/DNSKEY record.
163 The only recognized flag is KSK (Key Signing Key) DNSKEY.
169 <term>-g <replaceable class="parameter">generator</replaceable></term>
172 If generating a Diffie Hellman key, use this generator.
173 Allowed values are 2 and 5. If no generator
174 is specified, a known prime from RFC 2539 will be used
175 if possible; otherwise the default is 2.
184 Prints a short summary of the options and arguments to
185 <command>dnssec-keygen</command>.
194 Generate KEY records rather than DNSKEY records.
200 <term>-p <replaceable class="parameter">protocol</replaceable></term>
203 Sets the protocol value for the generated key. The protocol
204 is a number between 0 and 255. The default is 3 (DNSSEC).
205 Other possible values for this argument are listed in
206 RFC 2535 and its successors.
212 <term>-r <replaceable class="parameter">randomdev</replaceable></term>
215 Specifies the source of randomness. If the operating
216 system does not provide a <filename>/dev/random</filename>
217 or equivalent device, the default source of randomness
218 is keyboard input. <filename>randomdev</filename>
220 the name of a character device or file containing random
221 data to be used instead of the default. The special value
222 <filename>keyboard</filename> indicates that keyboard
223 input should be used.
229 <term>-s <replaceable class="parameter">strength</replaceable></term>
232 Specifies the strength value of the key. The strength is
233 a number between 0 and 15, and currently has no defined
240 <term>-t <replaceable class="parameter">type</replaceable></term>
243 Indicates the use of the key. <option>type</option> must be
244 one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF. The default
245 is AUTHCONF. AUTH refers to the ability to authenticate
246 data, and CONF the ability to encrypt data.
252 <term>-v <replaceable class="parameter">level</replaceable></term>
255 Sets the debugging level.
264 <title>GENERATED KEYS</title>
266 When <command>dnssec-keygen</command> completes
268 it prints a string of the form <filename>Knnnn.+aaa+iiiii</filename>
269 to the standard output. This is an identification string for
270 the key it has generated.
274 <para><filename>nnnn</filename> is the key name.
278 <para><filename>aaa</filename> is the numeric representation
284 <para><filename>iiiii</filename> is the key identifier (or
289 <para><command>dnssec-keygen</command>
290 creates two files, with names based
291 on the printed string. <filename>Knnnn.+aaa+iiiii.key</filename>
292 contains the public key, and
293 <filename>Knnnn.+aaa+iiiii.private</filename> contains the
298 The <filename>.key</filename> file contains a DNS KEY record
300 can be inserted into a zone file (directly or with a $INCLUDE
304 The <filename>.private</filename> file contains
306 fields. For obvious security reasons, this file does not have
307 general read permission.
310 Both <filename>.key</filename> and <filename>.private</filename>
311 files are generated for symmetric encryption algorithms such as
312 HMAC-MD5, even though the public and private key are equivalent.
317 <title>EXAMPLE</title>
319 To generate a 768-bit DSA key for the domain
320 <userinput>example.com</userinput>, the following command would be
323 <para><userinput>dnssec-keygen -a DSA -b 768 -n ZONE example.com</userinput>
326 The command would print a string of the form:
328 <para><userinput>Kexample.com.+003+26160</userinput>
331 In this example, <command>dnssec-keygen</command> creates
332 the files <filename>Kexample.com.+003+26160.key</filename>
334 <filename>Kexample.com.+003+26160.private</filename>.
339 <title>SEE ALSO</title>
341 <refentrytitle>dnssec-signzone</refentrytitle><manvolnum>8</manvolnum>
343 <citetitle>BIND 9 Administrator Reference Manual</citetitle>,
344 <citetitle>RFC 2539</citetitle>,
345 <citetitle>RFC 2845</citetitle>,
346 <citetitle>RFC 4033</citetitle>.
351 <title>AUTHOR</title>
352 <para><corpauthor>Internet Systems Consortium</corpauthor>