]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/blob - contrib/bind9/bin/dnssec/dnssec-keyfromlabel.docbook
Update BIND to 9.9.6-P1
[FreeBSD/stable/9.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, 2014  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 <refentry id="man.dnssec-keyfromlabel">
21   <refentryinfo>
22     <date>February 27, 2014</date>
23   </refentryinfo>
24
25   <refmeta>
26     <refentrytitle><application>dnssec-keyfromlabel</application></refentrytitle>
27     <manvolnum>8</manvolnum>
28     <refmiscinfo>BIND9</refmiscinfo>
29   </refmeta>
30
31   <refnamediv>
32     <refname><application>dnssec-keyfromlabel</application></refname>
33     <refpurpose>DNSSEC key generation tool</refpurpose>
34   </refnamediv>
35
36   <docinfo>
37     <copyright>
38       <year>2008</year>
39       <year>2009</year>
40       <year>2010</year>
41       <year>2011</year>
42       <year>2012</year>
43       <year>2014</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>-i <replaceable class="parameter">interval</replaceable></option></arg>
62       <arg><option>-k</option></arg>
63       <arg><option>-K <replaceable class="parameter">directory</replaceable></option></arg>
64       <arg><option>-L <replaceable class="parameter">ttl</replaceable></option></arg>
65       <arg><option>-n <replaceable class="parameter">nametype</replaceable></option></arg>
66       <arg><option>-P <replaceable class="parameter">date/offset</replaceable></option></arg>
67       <arg><option>-p <replaceable class="parameter">protocol</replaceable></option></arg>
68       <arg><option>-R <replaceable class="parameter">date/offset</replaceable></option></arg>
69       <arg><option>-S <replaceable class="parameter">key</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><option>-V</option></arg>
73       <arg><option>-y</option></arg>
74       <arg choice="req">name</arg>
75     </cmdsynopsis>
76   </refsynopsisdiv>
77
78   <refsect1>
79     <title>DESCRIPTION</title>
80     <para><command>dnssec-keyfromlabel</command>
81       generates a key pair of files that referencing a key object stored
82       in a cryptographic hardware service module (HSM).  The private key
83       file can be used for DNSSEC signing of zone data as if it were a
84       conventional signing key created by <command>dnssec-keygen</command>,
85       but the key material is stored within the HSM, and the actual signing
86       takes place there.
87     </para>
88     <para>
89       The <option>name</option> of the key is specified on the command
90       line.  This must match the name of the zone for which the key is
91       being generated.
92     </para>
93   </refsect1>
94
95   <refsect1>
96     <title>OPTIONS</title>
97
98     <variablelist>
99       <varlistentry>
100         <term>-a <replaceable class="parameter">algorithm</replaceable></term>
101         <listitem>
102           <para>
103             Selects the cryptographic algorithm.  The value of
104             <option>algorithm</option> must be one of RSAMD5, RSASHA1,
105             DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECCGOST,
106             ECDSAP256SHA256 or ECDSAP384SHA384.
107             These values are case insensitive.
108           </para>
109           <para>
110             If no algorithm is specified, then RSASHA1 will be used by
111             default, unless the <option>-3</option> option is specified,
112             in which case NSEC3RSASHA1 will be used instead.  (If
113             <option>-3</option> is used and an algorithm is specified,
114             that algorithm will be checked for compatibility with NSEC3.)
115           </para>
116           <para>
117             Note 1: that for DNSSEC, RSASHA1 is a mandatory to implement
118             algorithm, and DSA is recommended.
119           </para>
120           <para>
121             Note 2: DH automatically sets the -k flag.
122           </para>
123         </listitem>
124       </varlistentry>
125
126       <varlistentry>
127         <term>-3</term>
128         <listitem>
129           <para>
130             Use an NSEC3-capable algorithm to generate a DNSSEC key.
131             If this option is used and no algorithm is explicitly
132             set on the command line, NSEC3RSASHA1 will be used by
133             default.
134           </para>
135         </listitem>
136       </varlistentry>
137
138       <varlistentry>
139         <term>-E <replaceable class="parameter">engine</replaceable></term>
140         <listitem>
141           <para>
142             Specifies the name of the crypto hardware (OpenSSL engine).
143             When compiled with PKCS#11 support it defaults to "pkcs11".
144           </para>
145         </listitem>
146       </varlistentry>
147
148       <varlistentry>
149         <term>-l <replaceable class="parameter">label</replaceable></term>
150         <listitem>
151           <para>
152             Specifies the label of the key pair in the crypto hardware.
153             The label may be preceded by an optional OpenSSL engine name,
154             separated by a colon, as in "pkcs11:keylabel".
155           </para>
156         </listitem>
157       </varlistentry>
158
159       <varlistentry>
160         <term>-n <replaceable class="parameter">nametype</replaceable></term>
161         <listitem>
162           <para>
163             Specifies the owner type of the key.  The value of
164             <option>nametype</option> must either be ZONE (for a DNSSEC
165             zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with
166             a host (KEY)),
167             USER (for a key associated with a user(KEY)) or OTHER (DNSKEY).
168             These values are case insensitive.
169           </para>
170         </listitem>
171       </varlistentry>
172
173       <varlistentry>
174         <term>-C</term>
175         <listitem>
176           <para>
177             Compatibility mode:  generates an old-style key, without
178             any metadata.  By default, <command>dnssec-keyfromlabel</command>
179             will include the key's creation date in the metadata stored
180             with the private key, and other dates may be set there as well
181             (publication date, activation date, etc).  Keys that include
182             this data may be incompatible with older versions of BIND; the
183             <option>-C</option> option suppresses them.
184           </para>
185         </listitem>
186       </varlistentry>
187
188       <varlistentry>
189         <term>-c <replaceable class="parameter">class</replaceable></term>
190         <listitem>
191           <para>
192             Indicates that the DNS record containing the key should have
193             the specified class.  If not specified, class IN is used.
194           </para>
195         </listitem>
196       </varlistentry>
197
198       <varlistentry>
199         <term>-f <replaceable class="parameter">flag</replaceable></term>
200         <listitem>
201           <para>
202             Set the specified flag in the flag field of the KEY/DNSKEY record.
203             The only recognized flags are KSK (Key Signing Key) and REVOKE.
204           </para>
205         </listitem>
206       </varlistentry>
207
208       <varlistentry>
209         <term>-G</term>
210         <listitem>
211           <para>
212             Generate a key, but do not publish it or sign with it.  This
213             option is incompatible with -P and -A.
214           </para>
215         </listitem>
216       </varlistentry>
217
218       <varlistentry>
219         <term>-h</term>
220         <listitem>
221           <para>
222             Prints a short summary of the options and arguments to
223             <command>dnssec-keyfromlabel</command>.
224           </para>
225         </listitem>
226       </varlistentry>
227
228       <varlistentry>
229         <term>-K <replaceable class="parameter">directory</replaceable></term>
230         <listitem>
231           <para>
232             Sets the directory in which the key files are to be written.
233           </para>
234         </listitem>
235       </varlistentry>
236
237       <varlistentry>
238         <term>-k</term>
239         <listitem>
240           <para>
241             Generate KEY records rather than DNSKEY records.
242           </para>
243         </listitem>
244       </varlistentry>
245
246       <varlistentry>
247         <term>-L <replaceable class="parameter">ttl</replaceable></term>
248         <listitem>
249           <para>
250             Sets the default TTL to use for this key when it is converted
251             into a DNSKEY RR.  If the key is imported into a zone,
252             this is the TTL that will be used for it, unless there was
253             already a DNSKEY RRset in place, in which case the existing TTL
254             would take precedence.  Setting the default TTL to
255             <literal>0</literal> or <literal>none</literal> removes it.
256           </para>
257         </listitem>
258       </varlistentry>
259
260       <varlistentry>
261         <term>-p <replaceable class="parameter">protocol</replaceable></term>
262         <listitem>
263           <para>
264             Sets the protocol value for the key.  The protocol
265             is a number between 0 and 255.  The default is 3 (DNSSEC).
266             Other possible values for this argument are listed in
267             RFC 2535 and its successors.
268           </para>
269         </listitem>
270       </varlistentry>
271
272       <varlistentry>
273         <term>-S <replaceable class="parameter">key</replaceable></term>
274         <listitem>
275           <para>
276             Generate a key as an explicit successor to an existing key.
277             The name, algorithm, size, and type of the key will be set
278             to match the predecessor. The activation date of the new
279             key will be set to the inactivation date of the existing
280             one. The publication date will be set to the activation
281             date minus the prepublication interval, which defaults to
282             30 days.
283           </para>
284         </listitem>
285       </varlistentry>
286
287       <varlistentry>
288         <term>-t <replaceable class="parameter">type</replaceable></term>
289         <listitem>
290           <para>
291             Indicates the use of the key.  <option>type</option> must be
292             one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF.  The default
293             is AUTHCONF.  AUTH refers to the ability to authenticate
294             data, and CONF the ability to encrypt data.
295           </para>
296         </listitem>
297       </varlistentry>
298
299       <varlistentry>
300         <term>-v <replaceable class="parameter">level</replaceable></term>
301         <listitem>
302           <para>
303             Sets the debugging level.
304           </para>
305         </listitem>
306       </varlistentry>
307
308       <varlistentry>
309         <term>-V</term>
310         <listitem>
311           <para>
312             Prints version information.
313           </para>
314         </listitem>
315       </varlistentry>
316
317       <varlistentry>
318         <term>-y</term>
319         <listitem>
320           <para>
321             Allows DNSSEC key files to be generated even if the key ID
322             would collide with that of an existing key, in the event of
323             either key being revoked.  (This is only safe to use if you
324             are sure you won't be using RFC 5011 trust anchor maintenance
325             with either of the keys involved.)
326           </para>
327         </listitem>
328       </varlistentry>
329
330     </variablelist>
331   </refsect1>
332
333   <refsect1>
334     <title>TIMING OPTIONS</title>
335
336     <para>
337       Dates can be expressed in the format YYYYMMDD or YYYYMMDDHHMMSS.
338       If the argument begins with a '+' or '-', it is interpreted as
339       an offset from the present time.  For convenience, if such an offset
340       is followed by one of the suffixes 'y', 'mo', 'w', 'd', 'h', or 'mi',
341       then the offset is computed in years (defined as 365 24-hour days,
342       ignoring leap years), months (defined as 30 24-hour days), weeks,
343       days, hours, or minutes, respectively.  Without a suffix, the offset
344       is computed in seconds.  To explicitly prevent a date from being
345       set, use 'none' or 'never'.
346     </para>
347
348     <variablelist>
349       <varlistentry>
350         <term>-P <replaceable class="parameter">date/offset</replaceable></term>
351         <listitem>
352           <para>
353             Sets the date on which a key is to be published to the zone.
354             After that date, the key will be included in the zone but will
355             not be used to sign it.  If not set, and if the -G option has
356             not been used, the default is "now".
357           </para>
358         </listitem>
359       </varlistentry>
360
361       <varlistentry>
362         <term>-A <replaceable class="parameter">date/offset</replaceable></term>
363         <listitem>
364           <para>
365             Sets the date on which the key is to be activated.  After that
366             date, the key will be included in the zone and used to sign
367             it.  If not set, and if the -G option has not been used, the
368             default is "now".
369           </para>
370         </listitem>
371       </varlistentry>
372
373       <varlistentry>
374         <term>-R <replaceable class="parameter">date/offset</replaceable></term>
375         <listitem>
376           <para>
377             Sets the date on which the key is to be revoked.  After that
378             date, the key will be flagged as revoked.  It will be included
379             in the zone and will be used to sign it.
380           </para>
381         </listitem>
382       </varlistentry>
383
384       <varlistentry>
385         <term>-I <replaceable class="parameter">date/offset</replaceable></term>
386         <listitem>
387           <para>
388             Sets the date on which the key is to be retired.  After that
389             date, the key will still be included in the zone, but it
390             will not be used to sign it.
391           </para>
392         </listitem>
393       </varlistentry>
394
395       <varlistentry>
396         <term>-D <replaceable class="parameter">date/offset</replaceable></term>
397         <listitem>
398           <para>
399             Sets the date on which the key is to be deleted.  After that
400             date, the key will no longer be included in the zone.  (It
401             may remain in the key repository, however.)
402           </para>
403         </listitem>
404       </varlistentry>
405
406       <varlistentry>
407         <term>-i <replaceable class="parameter">interval</replaceable></term>
408         <listitem>
409           <para>
410             Sets the prepublication interval for a key.  If set, then
411             the publication and activation dates must be separated by at least
412             this much time.  If the activation date is specified but the
413             publication date isn't, then the publication date will default
414             to this much time before the activation date; conversely, if
415             the publication date is specified but activation date isn't,
416             then activation will be set to this much time after publication.
417           </para>
418           <para>
419             If the key is being created as an explicit successor to another
420             key, then the default prepublication interval is 30 days; 
421             otherwise it is zero.
422           </para>
423           <para>
424             As with date offsets, if the argument is followed by one of
425             the suffixes 'y', 'mo', 'w', 'd', 'h', or 'mi', then the
426             interval is measured in years, months, weeks, days, hours,
427             or minutes, respectively.  Without a suffix, the interval is
428             measured in seconds.
429           </para>
430         </listitem>
431       </varlistentry>
432
433     </variablelist>
434   </refsect1>
435
436   <refsect1>
437     <title>GENERATED KEY FILES</title>
438     <para>
439       When <command>dnssec-keyfromlabel</command> completes
440       successfully,
441       it prints a string of the form <filename>Knnnn.+aaa+iiiii</filename>
442       to the standard output.  This is an identification string for
443       the key files it has generated.
444     </para>
445     <itemizedlist>
446       <listitem>
447         <para><filename>nnnn</filename> is the key name.
448         </para>
449       </listitem>
450       <listitem>
451         <para><filename>aaa</filename> is the numeric representation
452           of the algorithm.
453         </para>
454       </listitem>
455       <listitem>
456         <para><filename>iiiii</filename> is the key identifier (or
457           footprint).
458         </para>
459       </listitem>
460     </itemizedlist>
461     <para><command>dnssec-keyfromlabel</command> 
462       creates two files, with names based
463       on the printed string.  <filename>Knnnn.+aaa+iiiii.key</filename>
464       contains the public key, and
465       <filename>Knnnn.+aaa+iiiii.private</filename> contains the
466       private key.
467     </para>
468     <para>
469       The <filename>.key</filename> file contains a DNS KEY record
470       that
471       can be inserted into a zone file (directly or with a $INCLUDE
472       statement).
473     </para>
474     <para>
475       The <filename>.private</filename> file contains
476       algorithm-specific
477       fields.  For obvious security reasons, this file does not have
478       general read permission.
479     </para>
480   </refsect1>
481
482   <refsect1>
483     <title>SEE ALSO</title>
484     <para><citerefentry>
485         <refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
486       </citerefentry>,
487       <citerefentry>
488         <refentrytitle>dnssec-signzone</refentrytitle><manvolnum>8</manvolnum>
489       </citerefentry>,
490       <citetitle>BIND 9 Administrator Reference Manual</citetitle>,
491       <citetitle>RFC 4034</citetitle>.
492     </para>
493   </refsect1>
494
495   <refsect1>
496     <title>AUTHOR</title>
497     <para><corpauthor>Internet Systems Consortium</corpauthor>
498     </para>
499   </refsect1>
500
501 </refentry><!--
502  - Local variables:
503  - mode: sgml
504  - End:
505 -->