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) 2008-2012, 2014 Internet Systems Consortium, Inc. ("ISC")
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.
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.
20 <refentry id="man.dnssec-keyfromlabel">
22 <date>February 27, 2014</date>
26 <refentrytitle><application>dnssec-keyfromlabel</application></refentrytitle>
27 <manvolnum>8</manvolnum>
28 <refmiscinfo>BIND9</refmiscinfo>
32 <refname><application>dnssec-keyfromlabel</application></refname>
33 <refpurpose>DNSSEC key generation tool</refpurpose>
44 <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
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>
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
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
96 <title>OPTIONS</title>
100 <term>-a <replaceable class="parameter">algorithm</replaceable></term>
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.
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.)
117 Note 1: that for DNSSEC, RSASHA1 is a mandatory to implement
118 algorithm, and DSA is recommended.
121 Note 2: DH automatically sets the -k flag.
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
139 <term>-E <replaceable class="parameter">engine</replaceable></term>
142 Specifies the name of the crypto hardware (OpenSSL engine).
143 When compiled with PKCS#11 support it defaults to "pkcs11".
149 <term>-l <replaceable class="parameter">label</replaceable></term>
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".
160 <term>-n <replaceable class="parameter">nametype</replaceable></term>
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
167 USER (for a key associated with a user(KEY)) or OTHER (DNSKEY).
168 These values are case insensitive.
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.
189 <term>-c <replaceable class="parameter">class</replaceable></term>
192 Indicates that the DNS record containing the key should have
193 the specified class. If not specified, class IN is used.
199 <term>-f <replaceable class="parameter">flag</replaceable></term>
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.
212 Generate a key, but do not publish it or sign with it. This
213 option is incompatible with -P and -A.
222 Prints a short summary of the options and arguments to
223 <command>dnssec-keyfromlabel</command>.
229 <term>-K <replaceable class="parameter">directory</replaceable></term>
232 Sets the directory in which the key files are to be written.
241 Generate KEY records rather than DNSKEY records.
247 <term>-L <replaceable class="parameter">ttl</replaceable></term>
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.
261 <term>-p <replaceable class="parameter">protocol</replaceable></term>
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.
273 <term>-S <replaceable class="parameter">key</replaceable></term>
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
288 <term>-t <replaceable class="parameter">type</replaceable></term>
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.
300 <term>-v <replaceable class="parameter">level</replaceable></term>
303 Sets the debugging level.
312 Prints version information.
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.)
334 <title>TIMING OPTIONS</title>
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'.
350 <term>-P <replaceable class="parameter">date/offset</replaceable></term>
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".
362 <term>-A <replaceable class="parameter">date/offset</replaceable></term>
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
374 <term>-R <replaceable class="parameter">date/offset</replaceable></term>
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.
385 <term>-I <replaceable class="parameter">date/offset</replaceable></term>
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.
396 <term>-D <replaceable class="parameter">date/offset</replaceable></term>
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.)
407 <term>-i <replaceable class="parameter">interval</replaceable></term>
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.
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.
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
437 <title>GENERATED KEY FILES</title>
439 When <command>dnssec-keyfromlabel</command> completes
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.
447 <para><filename>nnnn</filename> is the key name.
451 <para><filename>aaa</filename> is the numeric representation
456 <para><filename>iiiii</filename> is the key identifier (or
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
469 The <filename>.key</filename> file contains a DNS KEY record
471 can be inserted into a zone file (directly or with a $INCLUDE
475 The <filename>.private</filename> file contains
477 fields. For obvious security reasons, this file does not have
478 general read permission.
483 <title>SEE ALSO</title>
485 <refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
488 <refentrytitle>dnssec-signzone</refentrytitle><manvolnum>8</manvolnum>
490 <citetitle>BIND 9 Administrator Reference Manual</citetitle>,
491 <citetitle>RFC 4034</citetitle>.
496 <title>AUTHOR</title>
497 <para><corpauthor>Internet Systems Consortium</corpauthor>