man.dnssec-keyfromlabel.html revision ea94d370123a5892f6c47a97f21d1b28d44bb168
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams - Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC")
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams - Copyright (C) 2000-2003 Internet Software Consortium.
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams - Permission to use, copy, modify, and/or distribute this software for any
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams - purpose with or without fee is hereby granted, provided that the above
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams - copyright notice and this permission notice appear in all copies.
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac - PERFORMANCE OF THIS SOFTWARE.
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac<!-- $Id$ -->
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<link rel="up" href="Bv9ARM.ch10.html" title="Manual pages">
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<link rel="prev" href="man.dnssec-dsfromkey.html" title="dnssec-dsfromkey">
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<link rel="next" href="man.dnssec-keygen.html" title="dnssec-keygen">
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<table width="100%" summary="Navigation header">
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<tr><th colspan="3" align="center"><span class="application">dnssec-keyfromlabel</span></th></tr>
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<a accesskey="p" href="man.dnssec-dsfromkey.html">Prev</a>�</td>
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<th width="60%" align="center">Manual pages</th>
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<td width="20%" align="right">�<a accesskey="n" href="man.dnssec-keygen.html">Next</a>
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<a name="man.dnssec-keyfromlabel"></a><div class="titlepage"></div>
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<p><span class="application">dnssec-keyfromlabel</span> — DNSSEC key generation tool</p>
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<div class="cmdsynopsis"><p><code class="command">dnssec-keyfromlabel</code> {-l <em class="replaceable"><code>label</code></em>} [<code class="option">-3</code>] [<code class="option">-a <em class="replaceable"><code>algorithm</code></em></code>] [<code class="option">-A <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-D <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-E <em class="replaceable"><code>engine</code></em></code>] [<code class="option">-f <em class="replaceable"><code>flag</code></em></code>] [<code class="option">-G</code>] [<code class="option">-I <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-k</code>] [<code class="option">-K <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-L <em class="replaceable"><code>ttl</code></em></code>] [<code class="option">-n <em class="replaceable"><code>nametype</code></em></code>] [<code class="option">-P <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-p <em class="replaceable"><code>protocol</code></em></code>] [<code class="option">-R <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-t <em class="replaceable"><code>type</code></em></code>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] [<code class="option">-y</code>] {name}</p></div>
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<p><span><strong class="command">dnssec-keyfromlabel</strong></span>
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams gets keys with the given label from a crypto hardware and builds
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams key files for DNSSEC (Secure DNS), as defined in RFC 2535
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams and RFC 4034.
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams The <code class="option">name</code> of the key is specified on the command
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams line. This must match the name of the zone for which the key is
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams being generated.
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams Selects the cryptographic algorithm. The value of
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams <code class="option">algorithm</code> must be one of RSAMD5, RSASHA1,
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512 or ECCGOST.
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams These values are case insensitive.
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams If no algorithm is specified, then RSASHA1 will be used by
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams default, unless the <code class="option">-3</code> option is specified,
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams in which case NSEC3RSASHA1 will be used instead. (If
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams <code class="option">-3</code> is used and an algorithm is specified,
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams that algorithm will be checked for compatibility with NSEC3.)
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams Note 1: that for DNSSEC, RSASHA1 is a mandatory to implement
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams algorithm, and DSA is recommended.
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams Note 2: DH automatically sets the -k flag.
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams Use an NSEC3-capable algorithm to generate a DNSSEC key.
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams If this option is used and no algorithm is explicitly
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams set on the command line, NSEC3RSASHA1 will be used by
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<dt><span class="term">-E <em class="replaceable"><code>engine</code></em></span></dt>
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams Specifies the name of the crypto hardware (OpenSSL engine).
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams When compiled with PKCS#11 support it defaults to "pkcs11".
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<dt><span class="term">-l <em class="replaceable"><code>label</code></em></span></dt>
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams Specifies the label of the key pair in the crypto hardware.
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams The label may be preceded by an optional OpenSSL engine name,
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams separated by a colon, as in "pkcs11:keylabel".
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<dt><span class="term">-n <em class="replaceable"><code>nametype</code></em></span></dt>
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams Specifies the owner type of the key. The value of
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams <code class="option">nametype</code> must either be ZONE (for a DNSSEC
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams a host (KEY)),
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams USER (for a key associated with a user(KEY)) or OTHER (DNSKEY).
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams These values are case insensitive.
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams Compatibility mode: generates an old-style key, without
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams any metadata. By default, <span><strong class="command">dnssec-keyfromlabel</strong></span>
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams will include the key's creation date in the metadata stored
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams with the private key, and other dates may be set there as well
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams (publication date, activation date, etc). Keys that include
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams this data may be incompatible with older versions of BIND; the
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams <code class="option">-C</code> option suppresses them.
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<dt><span class="term">-c <em class="replaceable"><code>class</code></em></span></dt>
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams Indicates that the DNS record containing the key should have
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams the specified class. If not specified, class IN is used.
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<dt><span class="term">-f <em class="replaceable"><code>flag</code></em></span></dt>
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams Set the specified flag in the flag field of the KEY/DNSKEY record.
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams The only recognized flags are KSK (Key Signing Key) and REVOKE.
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams Generate a key, but do not publish it or sign with it. This
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams option is incompatible with -P and -A.
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams Prints a short summary of the options and arguments to
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams <span><strong class="command">dnssec-keyfromlabel</strong></span>.
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<dt><span class="term">-K <em class="replaceable"><code>directory</code></em></span></dt>
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams Sets the directory in which the key files are to be written.
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams Generate KEY records rather than DNSKEY records.
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<dt><span class="term">-L <em class="replaceable"><code>ttl</code></em></span></dt>
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams Sets the default TTL to use for this key when it is converted
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams into a DNSKEY RR. If the key is imported into a zone,
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams this is the TTL that will be used for it, unless there was
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams already a DNSKEY RRset in place, in which case the existing TTL
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams would take precedence. Setting the default TTL to
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams <code class="literal">0</code> or <code class="literal">none</code> removes it.
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<dt><span class="term">-p <em class="replaceable"><code>protocol</code></em></span></dt>
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams Sets the protocol value for the key. The protocol
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams is a number between 0 and 255. The default is 3 (DNSSEC).
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams Other possible values for this argument are listed in
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams RFC 2535 and its successors.
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<dt><span class="term">-t <em class="replaceable"><code>type</code></em></span></dt>
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams Indicates the use of the key. <code class="option">type</code> must be
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF. The default
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams is AUTHCONF. AUTH refers to the ability to authenticate
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams data, and CONF the ability to encrypt data.
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<dt><span class="term">-v <em class="replaceable"><code>level</code></em></span></dt>
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams Sets the debugging level.
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams Allows DNSSEC key files to be generated even if the key ID
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams would collide with that of an existing key, in the event of
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams either key being revoked. (This is only safe to use if you
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams are sure you won't be using RFC 5011 trust anchor maintenance
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams with either of the keys involved.)
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<a name="id2616884"></a><h2>TIMING OPTIONS</h2>
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams Dates can be expressed in the format YYYYMMDD or YYYYMMDDHHMMSS.
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams If the argument begins with a '+' or '-', it is interpreted as
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams an offset from the present time. For convenience, if such an offset
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams is followed by one of the suffixes 'y', 'mo', 'w', 'd', 'h', or 'mi',
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams then the offset is computed in years (defined as 365 24-hour days,
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams ignoring leap years), months (defined as 30 24-hour days), weeks,
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams days, hours, or minutes, respectively. Without a suffix, the offset
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams is computed in seconds.
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<dt><span class="term">-P <em class="replaceable"><code>date/offset</code></em></span></dt>
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams Sets the date on which a key is to be published to the zone.
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams After that date, the key will be included in the zone but will
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams not be used to sign it. If not set, and if the -G option has
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams not been used, the default is "now".
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<dt><span class="term">-A <em class="replaceable"><code>date/offset</code></em></span></dt>
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams Sets the date on which the key is to be activated. After that
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams date, the key will be included in the zone and used to sign
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams it. If not set, and if the -G option has not been used, the
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams default is "now".
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<dt><span class="term">-R <em class="replaceable"><code>date/offset</code></em></span></dt>
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams Sets the date on which the key is to be revoked. After that
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams date, the key will be flagged as revoked. It will be included
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams in the zone and will be used to sign it.
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<dt><span class="term">-I <em class="replaceable"><code>date/offset</code></em></span></dt>
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams Sets the date on which the key is to be retired. After that
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams date, the key will still be included in the zone, but it
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams will not be used to sign it.
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<dt><span class="term">-D <em class="replaceable"><code>date/offset</code></em></span></dt>
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams Sets the date on which the key is to be deleted. After that
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams date, the key will no longer be included in the zone. (It
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams may remain in the key repository, however.)
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<a name="id2617118"></a><h2>GENERATED KEY FILES</h2>
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams When <span><strong class="command">dnssec-keyfromlabel</strong></span> completes
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams successfully,
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams it prints a string of the form <code class="filename">Knnnn.+aaa+iiiii</code>
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams to the standard output. This is an identification string for
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams the key files it has generated.
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<li><p><code class="filename">nnnn</code> is the key name.
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<li><p><code class="filename">aaa</code> is the numeric representation
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams of the algorithm.
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<li><p><code class="filename">iiiii</code> is the key identifier (or
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams<p><span><strong class="command">dnssec-keyfromlabel</strong></span>
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams creates two files, with names based
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams on the printed string. <code class="filename">Knnnn.+aaa+iiiii.key</code>
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams contains the public key, and
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams <code class="filename">Knnnn.+aaa+iiiii.private</code> contains the
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams The <code class="filename">.key</code> file contains a DNS KEY record
2c379b9a5f7b4dc665dfdc4673c7b051e7005da1gary.williams can be inserted into a zone file (directly or with a $INCLUDE