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