]> CyberLeo.Net >> Repos - FreeBSD/releng/9.3.git/blob - contrib/bind9/bin/dnssec/dnssec-keyfromlabel.docbook
Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.
[FreeBSD/releng/9.3.git] / contrib / bind9 / bin / dnssec / dnssec-keyfromlabel.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) 2008-2012  Internet Systems Consortium, Inc. ("ISC")
6  -
7  - Permission to use, copy, modify, and/or distribute this software for any
8  - purpose with or without fee is hereby granted, provided that the above
9  - copyright notice and this permission notice appear in all copies.
10  -
11  - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
12  - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
13  - AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
14  - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15  - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
16  - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  - PERFORMANCE OF THIS SOFTWARE.
18 -->
19
20 <!-- $Id: dnssec-keyfromlabel.docbook,v 1.21 2011/03/17 01:40:34 each Exp $ -->
21 <refentry id="man.dnssec-keyfromlabel">
22   <refentryinfo>
23     <date>February 8, 2008</date>
24   </refentryinfo>
25
26   <refmeta>
27     <refentrytitle><application>dnssec-keyfromlabel</application></refentrytitle>
28     <manvolnum>8</manvolnum>
29     <refmiscinfo>BIND9</refmiscinfo>
30   </refmeta>
31
32   <refnamediv>
33     <refname><application>dnssec-keyfromlabel</application></refname>
34     <refpurpose>DNSSEC key generation tool</refpurpose>
35   </refnamediv>
36
37   <docinfo>
38     <copyright>
39       <year>2008</year>
40       <year>2009</year>
41       <year>2010</year>
42       <year>2011</year>
43       <year>2012</year>
44       <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
45     </copyright>
46   </docinfo>
47
48   <refsynopsisdiv>
49     <cmdsynopsis>
50       <command>dnssec-keyfromlabel</command>
51       <arg choice="req">-l <replaceable class="parameter">label</replaceable></arg>
52       <arg><option>-3</option></arg>
53       <arg><option>-a <replaceable class="parameter">algorithm</replaceable></option></arg>
54       <arg><option>-A <replaceable class="parameter">date/offset</replaceable></option></arg>
55       <arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
56       <arg><option>-D <replaceable class="parameter">date/offset</replaceable></option></arg>
57       <arg><option>-E <replaceable class="parameter">engine</replaceable></option></arg>
58       <arg><option>-f <replaceable class="parameter">flag</replaceable></option></arg>
59       <arg><option>-G</option></arg>
60       <arg><option>-I <replaceable class="parameter">date/offset</replaceable></option></arg>
61       <arg><option>-k</option></arg>
62       <arg><option>-K <replaceable class="parameter">directory</replaceable></option></arg>
63       <arg><option>-L <replaceable class="parameter">ttl</replaceable></option></arg>
64       <arg><option>-n <replaceable class="parameter">nametype</replaceable></option></arg>
65       <arg><option>-P <replaceable class="parameter">date/offset</replaceable></option></arg>
66       <arg><option>-p <replaceable class="parameter">protocol</replaceable></option></arg>
67       <arg><option>-R <replaceable class="parameter">date/offset</replaceable></option></arg>
68       <arg><option>-t <replaceable class="parameter">type</replaceable></option></arg>
69       <arg><option>-v <replaceable class="parameter">level</replaceable></option></arg>
70       <arg><option>-y</option></arg>
71       <arg choice="req">name</arg>
72     </cmdsynopsis>
73   </refsynopsisdiv>
74
75   <refsect1>
76     <title>DESCRIPTION</title>
77     <para><command>dnssec-keyfromlabel</command>
78       gets keys with the given label from a crypto hardware and builds
79       key files for DNSSEC (Secure DNS), as defined in RFC 2535
80       and RFC 4034.  
81     </para>
82     <para>
83       The <option>name</option> of the key is specified on the command
84       line.  This must match the name of the zone for which the key is
85       being generated.
86     </para>
87   </refsect1>
88
89   <refsect1>
90     <title>OPTIONS</title>
91
92     <variablelist>
93       <varlistentry>
94         <term>-a <replaceable class="parameter">algorithm</replaceable></term>
95         <listitem>
96           <para>
97             Selects the cryptographic algorithm.  The value of
98             <option>algorithm</option> must be one of RSAMD5, RSASHA1,
99             DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECCGOST,
100             ECDSAP256SHA256 or ECDSAP384SHA384.
101             These values are case insensitive.
102           </para>
103           <para>
104             If no algorithm is specified, then RSASHA1 will be used by
105             default, unless the <option>-3</option> option is specified,
106             in which case NSEC3RSASHA1 will be used instead.  (If
107             <option>-3</option> is used and an algorithm is specified,
108             that algorithm will be checked for compatibility with NSEC3.)
109           </para>
110           <para>
111             Note 1: that for DNSSEC, RSASHA1 is a mandatory to implement
112             algorithm, and DSA is recommended.
113           </para>
114           <para>
115             Note 2: DH automatically sets the -k flag.
116           </para>
117         </listitem>
118       </varlistentry>
119
120       <varlistentry>
121         <term>-3</term>
122         <listitem>
123           <para>
124             Use an NSEC3-capable algorithm to generate a DNSSEC key.
125             If this option is used and no algorithm is explicitly
126             set on the command line, NSEC3RSASHA1 will be used by
127             default.
128           </para>
129         </listitem>
130       </varlistentry>
131
132       <varlistentry>
133         <term>-E <replaceable class="parameter">engine</replaceable></term>
134         <listitem>
135           <para>
136             Specifies the name of the crypto hardware (OpenSSL engine).
137             When compiled with PKCS#11 support it defaults to "pkcs11".
138           </para>
139         </listitem>
140       </varlistentry>
141
142       <varlistentry>
143         <term>-l <replaceable class="parameter">label</replaceable></term>
144         <listitem>
145           <para>
146             Specifies the label of the key pair in the crypto hardware.
147             The label may be preceded by an optional OpenSSL engine name,
148             separated by a colon, as in "pkcs11:keylabel".
149           </para>
150         </listitem>
151       </varlistentry>
152
153       <varlistentry>
154         <term>-n <replaceable class="parameter">nametype</replaceable></term>
155         <listitem>
156           <para>
157             Specifies the owner type of the key.  The value of
158             <option>nametype</option> must either be ZONE (for a DNSSEC
159             zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with
160             a host (KEY)),
161             USER (for a key associated with a user(KEY)) or OTHER (DNSKEY).
162             These values are case insensitive.
163           </para>
164         </listitem>
165       </varlistentry>
166
167       <varlistentry>
168         <term>-C</term>
169         <listitem>
170           <para>
171             Compatibility mode:  generates an old-style key, without
172             any metadata.  By default, <command>dnssec-keyfromlabel</command>
173             will include the key's creation date in the metadata stored
174             with the private key, and other dates may be set there as well
175             (publication date, activation date, etc).  Keys that include
176             this data may be incompatible with older versions of BIND; the
177             <option>-C</option> option suppresses them.
178           </para>
179         </listitem>
180       </varlistentry>
181
182       <varlistentry>
183         <term>-c <replaceable class="parameter">class</replaceable></term>
184         <listitem>
185           <para>
186             Indicates that the DNS record containing the key should have
187             the specified class.  If not specified, class IN is used.
188           </para>
189         </listitem>
190       </varlistentry>
191
192       <varlistentry>
193         <term>-f <replaceable class="parameter">flag</replaceable></term>
194         <listitem>
195           <para>
196             Set the specified flag in the flag field of the KEY/DNSKEY record.
197             The only recognized flags are KSK (Key Signing Key) and REVOKE.
198           </para>
199         </listitem>
200       </varlistentry>
201
202       <varlistentry>
203         <term>-G</term>
204         <listitem>
205           <para>
206             Generate a key, but do not publish it or sign with it.  This
207             option is incompatible with -P and -A.
208           </para>
209         </listitem>
210       </varlistentry>
211
212       <varlistentry>
213         <term>-h</term>
214         <listitem>
215           <para>
216             Prints a short summary of the options and arguments to
217             <command>dnssec-keyfromlabel</command>.
218           </para>
219         </listitem>
220       </varlistentry>
221
222       <varlistentry>
223         <term>-K <replaceable class="parameter">directory</replaceable></term>
224         <listitem>
225           <para>
226             Sets the directory in which the key files are to be written.
227           </para>
228         </listitem>
229       </varlistentry>
230
231       <varlistentry>
232         <term>-k</term>
233         <listitem>
234           <para>
235             Generate KEY records rather than DNSKEY records.
236           </para>
237         </listitem>
238       </varlistentry>
239
240       <varlistentry>
241         <term>-L <replaceable class="parameter">ttl</replaceable></term>
242         <listitem>
243           <para>
244             Sets the default TTL to use for this key when it is converted
245             into a DNSKEY RR.  If the key is imported into a zone,
246             this is the TTL that will be used for it, unless there was
247             already a DNSKEY RRset in place, in which case the existing TTL
248             would take precedence.  Setting the default TTL to
249             <literal>0</literal> or <literal>none</literal> removes it.
250           </para>
251         </listitem>
252       </varlistentry>
253
254       <varlistentry>
255         <term>-p <replaceable class="parameter">protocol</replaceable></term>
256         <listitem>
257           <para>
258             Sets the protocol value for the key.  The protocol
259             is a number between 0 and 255.  The default is 3 (DNSSEC).
260             Other possible values for this argument are listed in
261             RFC 2535 and its successors.
262           </para>
263         </listitem>
264       </varlistentry>
265
266       <varlistentry>
267         <term>-t <replaceable class="parameter">type</replaceable></term>
268         <listitem>
269           <para>
270             Indicates the use of the key.  <option>type</option> must be
271             one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF.  The default
272             is AUTHCONF.  AUTH refers to the ability to authenticate
273             data, and CONF the ability to encrypt data.
274           </para>
275         </listitem>
276       </varlistentry>
277
278       <varlistentry>
279         <term>-v <replaceable class="parameter">level</replaceable></term>
280         <listitem>
281           <para>
282             Sets the debugging level.
283           </para>
284         </listitem>
285       </varlistentry>
286
287       <varlistentry>
288         <term>-y</term>
289         <listitem>
290           <para>
291             Allows DNSSEC key files to be generated even if the key ID
292             would collide with that of an existing key, in the event of
293             either key being revoked.  (This is only safe to use if you
294             are sure you won't be using RFC 5011 trust anchor maintenance
295             with either of the keys involved.)
296           </para>
297         </listitem>
298       </varlistentry>
299
300     </variablelist>
301   </refsect1>
302
303   <refsect1>
304     <title>TIMING OPTIONS</title>
305
306     <para>
307       Dates can be expressed in the format YYYYMMDD or YYYYMMDDHHMMSS.
308       If the argument begins with a '+' or '-', it is interpreted as
309       an offset from the present time.  For convenience, if such an offset
310       is followed by one of the suffixes 'y', 'mo', 'w', 'd', 'h', or 'mi',
311       then the offset is computed in years (defined as 365 24-hour days,
312       ignoring leap years), months (defined as 30 24-hour days), weeks,
313       days, hours, or minutes, respectively.  Without a suffix, the offset
314       is computed in seconds.
315     </para>
316
317     <variablelist>
318       <varlistentry>
319         <term>-P <replaceable class="parameter">date/offset</replaceable></term>
320         <listitem>
321           <para>
322             Sets the date on which a key is to be published to the zone.
323             After that date, the key will be included in the zone but will
324             not be used to sign it.  If not set, and if the -G option has
325             not been used, the default is "now".
326           </para>
327         </listitem>
328       </varlistentry>
329
330       <varlistentry>
331         <term>-A <replaceable class="parameter">date/offset</replaceable></term>
332         <listitem>
333           <para>
334             Sets the date on which the key is to be activated.  After that
335             date, the key will be included in the zone and used to sign
336             it.  If not set, and if the -G option has not been used, the
337             default is "now".
338           </para>
339         </listitem>
340       </varlistentry>
341
342       <varlistentry>
343         <term>-R <replaceable class="parameter">date/offset</replaceable></term>
344         <listitem>
345           <para>
346             Sets the date on which the key is to be revoked.  After that
347             date, the key will be flagged as revoked.  It will be included
348             in the zone and will be used to sign it.
349           </para>
350         </listitem>
351       </varlistentry>
352
353       <varlistentry>
354         <term>-I <replaceable class="parameter">date/offset</replaceable></term>
355         <listitem>
356           <para>
357             Sets the date on which the key is to be retired.  After that
358             date, the key will still be included in the zone, but it
359             will not be used to sign it.
360           </para>
361         </listitem>
362       </varlistentry>
363
364       <varlistentry>
365         <term>-D <replaceable class="parameter">date/offset</replaceable></term>
366         <listitem>
367           <para>
368             Sets the date on which the key is to be deleted.  After that
369             date, the key will no longer be included in the zone.  (It
370             may remain in the key repository, however.)
371           </para>
372         </listitem>
373       </varlistentry>
374     </variablelist>
375   </refsect1>
376
377   <refsect1>
378     <title>GENERATED KEY FILES</title>
379     <para>
380       When <command>dnssec-keyfromlabel</command> completes
381       successfully,
382       it prints a string of the form <filename>Knnnn.+aaa+iiiii</filename>
383       to the standard output.  This is an identification string for
384       the key files it has generated.
385     </para>
386     <itemizedlist>
387       <listitem>
388         <para><filename>nnnn</filename> is the key name.
389         </para>
390       </listitem>
391       <listitem>
392         <para><filename>aaa</filename> is the numeric representation
393           of the algorithm.
394         </para>
395       </listitem>
396       <listitem>
397         <para><filename>iiiii</filename> is the key identifier (or
398           footprint).
399         </para>
400       </listitem>
401     </itemizedlist>
402     <para><command>dnssec-keyfromlabel</command> 
403       creates two files, with names based
404       on the printed string.  <filename>Knnnn.+aaa+iiiii.key</filename>
405       contains the public key, and
406       <filename>Knnnn.+aaa+iiiii.private</filename> contains the
407       private key.
408     </para>
409     <para>
410       The <filename>.key</filename> file contains a DNS KEY record
411       that
412       can be inserted into a zone file (directly or with a $INCLUDE
413       statement).
414     </para>
415     <para>
416       The <filename>.private</filename> file contains
417       algorithm-specific
418       fields.  For obvious security reasons, this file does not have
419       general read permission.
420     </para>
421   </refsect1>
422
423   <refsect1>
424     <title>SEE ALSO</title>
425     <para><citerefentry>
426         <refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
427       </citerefentry>,
428       <citerefentry>
429         <refentrytitle>dnssec-signzone</refentrytitle><manvolnum>8</manvolnum>
430       </citerefentry>,
431       <citetitle>BIND 9 Administrator Reference Manual</citetitle>,
432       <citetitle>RFC 4034</citetitle>.
433     </para>
434   </refsect1>
435
436   <refsect1>
437     <title>AUTHOR</title>
438     <para><corpauthor>Internet Systems Consortium</corpauthor>
439     </para>
440   </refsect1>
441
442 </refentry><!--
443  - Local variables:
444  - mode: sgml
445  - End:
446 -->