]> CyberLeo.Net >> Repos - FreeBSD/releng/7.2.git/blob - contrib/bind9/bin/dnssec/dnssec-keygen.docbook
Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.
[FreeBSD/releng/7.2.git] / contrib / bind9 / bin / dnssec / dnssec-keygen.docbook
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 "&#8212;">]>
4 <!--
5  - Copyright (C) 2004, 2005, 2007, 2008  Internet Systems Consortium, Inc. ("ISC")
6  - Copyright (C) 2000-2003  Internet Software Consortium.
7  -
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.
11  -
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.
19 -->
20
21 <!-- $Id: dnssec-keygen.docbook,v 1.7.18.13 2008/10/15 23:46:06 tbox Exp $ -->
22 <refentry id="man.dnssec-keygen">
23   <refentryinfo>
24     <date>June 30, 2000</date>
25   </refentryinfo>
26
27   <refmeta>
28     <refentrytitle><application>dnssec-keygen</application></refentrytitle>
29     <manvolnum>8</manvolnum>
30     <refmiscinfo>BIND9</refmiscinfo>
31   </refmeta>
32
33   <refnamediv>
34     <refname><application>dnssec-keygen</application></refname>
35     <refpurpose>DNSSEC key generation tool</refpurpose>
36   </refnamediv>
37
38   <docinfo>
39     <copyright>
40       <year>2004</year>
41       <year>2005</year>
42       <year>2007</year>
43       <year>2008</year>
44       <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
45     </copyright>
46     <copyright>
47       <year>2000</year>
48       <year>2001</year>
49       <year>2002</year>
50       <year>2003</year>
51       <holder>Internet Software Consortium.</holder>
52     </copyright>
53   </docinfo>
54
55   <refsynopsisdiv>
56     <cmdsynopsis>
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>
73     </cmdsynopsis>
74   </refsynopsisdiv>
75
76   <refsect1>
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.
82     </para>
83   </refsect1>
84
85   <refsect1>
86     <title>OPTIONS</title>
87
88     <variablelist>
89       <varlistentry>
90         <term>-a <replaceable class="parameter">algorithm</replaceable></term>
91         <listitem>
92           <para>
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
96             are case insensitive.
97           </para>
98           <para>
99             Note 1: that for DNSSEC, RSASHA1 is a mandatory to implement
100             algorithm,
101             and DSA is recommended.  For TSIG, HMAC-MD5 is mandatory.
102           </para>
103           <para>
104             Note 2: HMAC-MD5 and DH automatically set the -k flag.
105           </para>
106         </listitem>
107       </varlistentry>
108
109       <varlistentry>
110         <term>-b <replaceable class="parameter">keysize</replaceable></term>
111         <listitem>
112           <para>
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
115             between
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.
120           </para>
121         </listitem>
122       </varlistentry>
123
124       <varlistentry>
125         <term>-n <replaceable class="parameter">nametype</replaceable></term>
126         <listitem>
127           <para>
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
131             a host (KEY)),
132             USER (for a key associated with a user(KEY)) or OTHER (DNSKEY).
133             These values are
134             case insensitive.
135           </para>
136         </listitem>
137       </varlistentry>
138
139       <varlistentry>
140         <term>-c <replaceable class="parameter">class</replaceable></term>
141         <listitem>
142           <para>
143             Indicates that the DNS record containing the key should have
144             the specified class.  If not specified, class IN is used.
145           </para>
146         </listitem>
147       </varlistentry>
148
149       <varlistentry>
150         <term>-e</term>
151         <listitem>
152           <para>
153             If generating an RSAMD5/RSASHA1 key, use a large exponent.
154           </para>
155         </listitem>
156       </varlistentry>
157
158       <varlistentry>
159         <term>-f <replaceable class="parameter">flag</replaceable></term>
160         <listitem>
161           <para>
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.
164           </para>
165         </listitem>
166       </varlistentry>
167
168       <varlistentry>
169         <term>-g <replaceable class="parameter">generator</replaceable></term>
170         <listitem>
171           <para>
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.
176           </para>
177         </listitem>
178       </varlistentry>
179
180       <varlistentry>
181         <term>-h</term>
182         <listitem>
183           <para>
184             Prints a short summary of the options and arguments to
185             <command>dnssec-keygen</command>.
186           </para>
187         </listitem>
188       </varlistentry>
189
190       <varlistentry>
191         <term>-k</term>
192         <listitem>
193           <para>
194             Generate KEY records rather than DNSKEY records.
195           </para>
196         </listitem>
197       </varlistentry>
198
199       <varlistentry>
200         <term>-p <replaceable class="parameter">protocol</replaceable></term>
201         <listitem>
202           <para>
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.
207           </para>
208         </listitem>
209       </varlistentry>
210
211       <varlistentry>
212         <term>-r <replaceable class="parameter">randomdev</replaceable></term>
213         <listitem>
214           <para>
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>
219             specifies
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.
224           </para>
225         </listitem>
226       </varlistentry>
227
228       <varlistentry>
229         <term>-s <replaceable class="parameter">strength</replaceable></term>
230         <listitem>
231           <para>
232             Specifies the strength value of the key.  The strength is
233             a number between 0 and 15, and currently has no defined
234             purpose in DNSSEC.
235           </para>
236         </listitem>
237       </varlistentry>
238
239       <varlistentry>
240         <term>-t <replaceable class="parameter">type</replaceable></term>
241         <listitem>
242           <para>
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.
247           </para>
248         </listitem>
249       </varlistentry>
250
251       <varlistentry>
252         <term>-v <replaceable class="parameter">level</replaceable></term>
253         <listitem>
254           <para>
255             Sets the debugging level.
256           </para>
257         </listitem>
258       </varlistentry>
259
260     </variablelist>
261   </refsect1>
262
263   <refsect1>
264     <title>GENERATED KEYS</title>
265     <para>
266       When <command>dnssec-keygen</command> completes
267       successfully,
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.
271     </para>
272     <itemizedlist>
273       <listitem>
274         <para><filename>nnnn</filename> is the key name.
275         </para>
276       </listitem>
277       <listitem>
278         <para><filename>aaa</filename> is the numeric representation
279           of the
280           algorithm.
281         </para>
282       </listitem>
283       <listitem>
284         <para><filename>iiiii</filename> is the key identifier (or
285           footprint).
286         </para>
287       </listitem>
288     </itemizedlist>
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
294       private
295       key.
296     </para>
297     <para>
298       The <filename>.key</filename> file contains a DNS KEY record
299       that
300       can be inserted into a zone file (directly or with a $INCLUDE
301       statement).
302     </para>
303     <para>
304       The <filename>.private</filename> file contains
305       algorithm-specific
306       fields.  For obvious security reasons, this file does not have
307       general read permission.
308     </para>
309     <para>
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.
313     </para>
314   </refsect1>
315
316   <refsect1>
317     <title>EXAMPLE</title>
318     <para>
319       To generate a 768-bit DSA key for the domain
320       <userinput>example.com</userinput>, the following command would be
321       issued:
322     </para>
323     <para><userinput>dnssec-keygen -a DSA -b 768 -n ZONE example.com</userinput>
324     </para>
325     <para>
326       The command would print a string of the form:
327     </para>
328     <para><userinput>Kexample.com.+003+26160</userinput>
329     </para>
330     <para>
331       In this example, <command>dnssec-keygen</command> creates
332       the files <filename>Kexample.com.+003+26160.key</filename>
333       and
334       <filename>Kexample.com.+003+26160.private</filename>.
335     </para>
336   </refsect1>
337
338   <refsect1>
339     <title>SEE ALSO</title>
340     <para><citerefentry>
341         <refentrytitle>dnssec-signzone</refentrytitle><manvolnum>8</manvolnum>
342       </citerefentry>,
343       <citetitle>BIND 9 Administrator Reference Manual</citetitle>,
344       <citetitle>RFC 2539</citetitle>,
345       <citetitle>RFC 2845</citetitle>,
346       <citetitle>RFC 4033</citetitle>.
347     </para>
348   </refsect1>
349
350   <refsect1>
351     <title>AUTHOR</title>
352     <para><corpauthor>Internet Systems Consortium</corpauthor>
353     </para>
354   </refsect1>
355
356 </refentry><!--
357  - Local variables:
358  - mode: sgml
359  - End:
360 -->