man.dnssec-keygen.html revision 04bbadfbcb8a755cb208c4034073a3c0eb96b9aa
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews - Copyright (C) 2004-2014 Internet Systems Consortium, Inc. ("ISC")
a7c412f37cc73d0332887a746e81220cbf09dd00Mark Andrews - Copyright (C) 2000-2003 Internet Software Consortium.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews - Permission to use, copy, modify, and/or distribute this software for any
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews - purpose with or without fee is hereby granted, provided that the above
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews - copyright notice and this permission notice appear in all copies.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews - PERFORMANCE OF THIS SOFTWARE.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<!-- $Id$ -->
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<link rel="up" href="Bv9ARM.ch10.html" title="Manual pages">
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<link rel="prev" href="man.dnssec-keyfromlabel.html" title="dnssec-keyfromlabel">
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<link rel="next" href="man.dnssec-revoke.html" title="dnssec-revoke">
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<table width="100%" summary="Navigation header">
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<tr><th colspan="3" align="center"><span class="application">dnssec-keygen</span></th></tr>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<a accesskey="p" href="man.dnssec-keyfromlabel.html">Prev</a>�</td>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<th width="60%" align="center">Manual pages</th>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<td width="20%" align="right">�<a accesskey="n" href="man.dnssec-revoke.html">Next</a>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<a name="man.dnssec-keygen"></a><div class="titlepage"></div>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<p><span class="application">dnssec-keygen</span> — DNSSEC key generation tool</p>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<div class="cmdsynopsis"><p><code class="command">dnssec-keygen</code> [<code class="option">-a <em class="replaceable"><code>algorithm</code></em></code>] [<code class="option">-b <em class="replaceable"><code>keysize</code></em></code>] [<code class="option">-n <em class="replaceable"><code>nametype</code></em></code>] [<code class="option">-3</code>] [<code class="option">-A <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-C</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">-g <em class="replaceable"><code>generator</code></em></code>] [<code class="option">-h</code>] [<code class="option">-I <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-i <em class="replaceable"><code>interval</code></em></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">-k</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">-q</code>] [<code class="option">-R <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-r <em class="replaceable"><code>randomdev</code></em></code>] [<code class="option">-S <em class="replaceable"><code>key</code></em></code>] [<code class="option">-s <em class="replaceable"><code>strength</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">-z</code>] {name}</p></div>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<p><span><strong class="command">dnssec-keygen</strong></span>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews generates keys for DNSSEC (Secure DNS), as defined in RFC 2535
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews and RFC 4034. It can also generate keys for use with
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews TSIG (Transaction Signatures) as defined in RFC 2845, or TKEY
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews (Transaction Key) as defined in RFC 2930.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews The <code class="option">name</code> of the key is specified on the command
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews line. For DNSSEC keys, this must match the name of the zone for
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews which the key is being generated.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Selects the cryptographic algorithm. For DNSSEC keys, the value
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews of <code class="option">algorithm</code> must be one of RSAMD5, RSASHA1,
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECCGOST,
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews ECDSAP256SHA256 or ECDSAP384SHA384.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews be DH (Diffie Hellman), HMAC-MD5, HMAC-SHA1, HMAC-SHA224,
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews HMAC-SHA256, HMAC-SHA384, or HMAC-SHA512. These values are
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews case insensitive.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews If no algorithm is specified, then RSASHA1 will be used by
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews default, unless the <code class="option">-3</code> option is specified,
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews in which case NSEC3RSASHA1 will be used instead. (If
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <code class="option">-3</code> is used and an algorithm is specified,
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews that algorithm will be checked for compatibility with NSEC3.)
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Note 1: that for DNSSEC, RSASHA1 is a mandatory to implement
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews algorithm, and DSA is recommended. For TSIG, HMAC-MD5 is
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Note 2: DH, HMAC-MD5, and HMAC-SHA1 through HMAC-SHA512
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews automatically set the -T KEY option.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<dt><span class="term">-b <em class="replaceable"><code>keysize</code></em></span></dt>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Specifies the number of bits in the key. The choice of key
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews size depends on the algorithm used. RSA keys must be
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews between 512 and 2048 bits. Diffie Hellman keys must be between
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews 128 and 4096 bits. DSA keys must be between 512 and 1024
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews bits and an exact multiple of 64. HMAC keys must be
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews between 1 and 512 bits. Elliptic curve algorithms don't need
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews this parameter.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews The key size does not need to be specified if using a default
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews algorithm. The default key size is 1024 bits for zone signing
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews keys (ZSK's) and 2048 bits for key signing keys (KSK's,
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews generated with <code class="option">-f KSK</code>). However, if an
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews algorithm is explicitly specified with the <code class="option">-a</code>,
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews then there is no default key size, and the <code class="option">-b</code>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews must be used.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<dt><span class="term">-n <em class="replaceable"><code>nametype</code></em></span></dt>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Specifies the owner type of the key. The value of
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <code class="option">nametype</code> must either be ZONE (for a DNSSEC
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews a host (KEY)),
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews USER (for a key associated with a user(KEY)) or OTHER (DNSKEY).
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews These values are case insensitive. Defaults to ZONE for DNSKEY
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Use an NSEC3-capable algorithm to generate a DNSSEC key.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews If this option is used and no algorithm is explicitly
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews set on the command line, NSEC3RSASHA1 will be used by
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews default. Note that RSASHA256, RSASHA512, ECCGOST,
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews ECDSAP256SHA256 and ECDSAP384SHA384 algorithms
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews are NSEC3-capable.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Compatibility mode: generates an old-style key, without
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews any metadata. By default, <span><strong class="command">dnssec-keygen</strong></span>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews will include the key's creation date in the metadata stored
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews with the private key, and other dates may be set there as well
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews (publication date, activation date, etc). Keys that include
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews this data may be incompatible with older versions of BIND; the
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <code class="option">-C</code> option suppresses them.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<dt><span class="term">-c <em class="replaceable"><code>class</code></em></span></dt>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Indicates that the DNS record containing the key should have
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews the specified class. If not specified, class IN is used.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<dt><span class="term">-E <em class="replaceable"><code>engine</code></em></span></dt>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Specifies the cryptographic hardware to use, when applicable.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews When BIND is built with OpenSSL PKCS#11 support, this defaults
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews to the string "pkcs11", which identifies an OpenSSL engine
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews that can drive a cryptographic accelerator or hardware service
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews module. When BIND is built with native PKCS#11 cryptography
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews (--enable-native-pkcs11), it defaults to the path of the PKCS#11
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews provider library specified via "--with-pkcs11".
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<dt><span class="term">-f <em class="replaceable"><code>flag</code></em></span></dt>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Set the specified flag in the flag field of the KEY/DNSKEY record.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews The only recognized flags are KSK (Key Signing Key) and REVOKE.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Generate a key, but do not publish it or sign with it. This
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews option is incompatible with -P and -A.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<dt><span class="term">-g <em class="replaceable"><code>generator</code></em></span></dt>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews If generating a Diffie Hellman key, use this generator.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Allowed values are 2 and 5. If no generator
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews is specified, a known prime from RFC 2539 will be used
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews if possible; otherwise the default is 2.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Prints a short summary of the options and arguments to
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <span><strong class="command">dnssec-keygen</strong></span>.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<dt><span class="term">-K <em class="replaceable"><code>directory</code></em></span></dt>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Sets the directory in which the key files are to be written.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Deprecated in favor of -T KEY.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<dt><span class="term">-L <em class="replaceable"><code>ttl</code></em></span></dt>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Sets the default TTL to use for this key when it is converted
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews into a DNSKEY RR. If the key is imported into a zone,
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews this is the TTL that will be used for it, unless there was
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews already a DNSKEY RRset in place, in which case the existing TTL
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews would take precedence. Setting the default TTL to
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <code class="literal">0</code> or <code class="literal">none</code> removes it.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<dt><span class="term">-p <em class="replaceable"><code>protocol</code></em></span></dt>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Sets the protocol value for the generated key. The protocol
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews is a number between 0 and 255. The default is 3 (DNSSEC).
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Other possible values for this argument are listed in
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews RFC 2535 and its successors.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Quiet mode: Suppresses unnecessary output, including
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews progress indication. Without this option, when
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <span><strong class="command">dnssec-keygen</strong></span> is run interactively
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews to generate an RSA or DSA key pair, it will print a string
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews of symbols to <code class="filename">stderr</code> indicating the
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews progress of the key generation. A '.' indicates that a
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews random number has been found which passed an initial
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews sieve test; '+' means a number has passed a single
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews round of the Miller-Rabin primality test; a space
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews means that the number has passed all the tests and is
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews a satisfactory key.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<dt><span class="term">-r <em class="replaceable"><code>randomdev</code></em></span></dt>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Specifies the source of randomness. If the operating
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews system does not provide a <code class="filename">/dev/random</code>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews or equivalent device, the default source of randomness
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews is keyboard input. <code class="filename">randomdev</code>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews the name of a character device or file containing random
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews data to be used instead of the default. The special value
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <code class="filename">keyboard</code> indicates that keyboard
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews input should be used.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<dt><span class="term">-S <em class="replaceable"><code>key</code></em></span></dt>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Create a new key which is an explicit successor to an
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews existing key. The name, algorithm, size, and type of the
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews key will be set to match the existing key. The activation
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews date of the new key will be set to the inactivation date of
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews the existing one. The publication date will be set to the
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews activation date minus the prepublication interval, which
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews defaults to 30 days.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<dt><span class="term">-s <em class="replaceable"><code>strength</code></em></span></dt>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Specifies the strength value of the key. The strength is
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews a number between 0 and 15, and currently has no defined
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews purpose in DNSSEC.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<dt><span class="term">-T <em class="replaceable"><code>rrtype</code></em></span></dt>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Specifies the resource record type to use for the key.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <code class="option">rrtype</code> must be either DNSKEY or KEY. The
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews default is DNSKEY when using a DNSSEC algorithm, but it can be
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews overridden to KEY for use with SIG(0).
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Using any TSIG algorithm (HMAC-* or DH) forces this option
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<dt><span class="term">-t <em class="replaceable"><code>type</code></em></span></dt>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Indicates the use of the key. <code class="option">type</code> must be
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF. The default
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews is AUTHCONF. AUTH refers to the ability to authenticate
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews data, and CONF the ability to encrypt data.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<dt><span class="term">-v <em class="replaceable"><code>level</code></em></span></dt>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Sets the debugging level.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Dates can be expressed in the format YYYYMMDD or YYYYMMDDHHMMSS.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews If the argument begins with a '+' or '-', it is interpreted as
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews an offset from the present time. For convenience, if such an offset
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews is followed by one of the suffixes 'y', 'mo', 'w', 'd', 'h', or 'mi',
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews then the offset is computed in years (defined as 365 24-hour days,
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews ignoring leap years), months (defined as 30 24-hour days), weeks,
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews days, hours, or minutes, respectively. Without a suffix, the offset
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews is computed in seconds.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<dt><span class="term">-P <em class="replaceable"><code>date/offset</code></em></span></dt>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Sets the date on which a key is to be published to the zone.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews After that date, the key will be included in the zone but will
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews not be used to sign it. If not set, and if the -G option has
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews not been used, the default is "now".
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<dt><span class="term">-A <em class="replaceable"><code>date/offset</code></em></span></dt>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Sets the date on which the key is to be activated. After that
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews date, the key will be included in the zone and used to sign
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews it. If not set, and if the -G option has not been used, the
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews default is "now".
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<dt><span class="term">-R <em class="replaceable"><code>date/offset</code></em></span></dt>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Sets the date on which the key is to be revoked. After that
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews date, the key will be flagged as revoked. It will be included
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews in the zone and will be used to sign it.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<dt><span class="term">-I <em class="replaceable"><code>date/offset</code></em></span></dt>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Sets the date on which the key is to be retired. After that
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews date, the key will still be included in the zone, but it
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews will not be used to sign it.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<dt><span class="term">-D <em class="replaceable"><code>date/offset</code></em></span></dt>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Sets the date on which the key is to be deleted. After that
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews date, the key will no longer be included in the zone. (It
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews may remain in the key repository, however.)
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<dt><span class="term">-i <em class="replaceable"><code>interval</code></em></span></dt>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Sets the prepublication interval for a key. If set, then
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews the publication and activation dates must be separated by at least
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews this much time. If the activation date is specified but the
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews publication date isn't, then the publication date will default
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews to this much time before the activation date; conversely, if
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews the publication date is specified but activation date isn't,
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews then activation will be set to this much time after publication.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews If the key is being created as an explicit successor to another
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews key, then the default prepublication interval is 30 days;
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews otherwise it is zero.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews As with date offsets, if the argument is followed by one of
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews the suffixes 'y', 'mo', 'w', 'd', 'h', or 'mi', then the
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews interval is measured in years, months, weeks, days, hours,
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews or minutes, respectively. Without a suffix, the interval is
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews measured in seconds.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews When <span><strong class="command">dnssec-keygen</strong></span> completes
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews successfully,
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews it prints a string of the form <code class="filename">Knnnn.+aaa+iiiii</code>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews to the standard output. This is an identification string for
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews the key it has generated.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<li><p><code class="filename">nnnn</code> is the key name.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<li><p><code class="filename">aaa</code> is the numeric representation
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<li><p><code class="filename">iiiii</code> is the key identifier (or
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<p><span><strong class="command">dnssec-keygen</strong></span>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews creates two files, with names based
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews on the printed string. <code class="filename">Knnnn.+aaa+iiiii.key</code>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews contains the public key, and
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <code class="filename">Knnnn.+aaa+iiiii.private</code> contains the
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews The <code class="filename">.key</code> file contains a DNS KEY record
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews can be inserted into a zone file (directly or with a $INCLUDE
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews The <code class="filename">.private</code> file contains
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews algorithm-specific
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews fields. For obvious security reasons, this file does not have
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews general read permission.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Both <code class="filename">.key</code> and <code class="filename">.private</code>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews files are generated for symmetric encryption algorithms such as
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews HMAC-MD5, even though the public and private key are equivalent.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews To generate a 768-bit DSA key for the domain
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <strong class="userinput"><code>example.com</code></strong>, the following command would be
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<p><strong class="userinput"><code>dnssec-keygen -a DSA -b 768 -n ZONE example.com</code></strong>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews The command would print a string of the form:
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<p><strong class="userinput"><code>Kexample.com.+003+26160</code></strong>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews In this example, <span><strong class="command">dnssec-keygen</strong></span> creates
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews the files <code class="filename">Kexample.com.+003+26160.key</code>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <code class="filename">Kexample.com.+003+26160.private</code>.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<p><span class="citerefentry"><span class="refentrytitle">dnssec-signzone</span>(8)</span>,
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <em class="citetitle">BIND 9 Administrator Reference Manual</em>,
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<p><span class="corpauthor">Internet Systems Consortium</span>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<table width="100%" summary="Navigation footer">
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<a accesskey="p" href="man.dnssec-keyfromlabel.html">Prev</a>�</td>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<td width="20%" align="center"><a accesskey="u" href="Bv9ARM.ch10.html">Up</a></td>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<td width="40%" align="right">�<a accesskey="n" href="man.dnssec-revoke.html">Next</a>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<span class="application">dnssec-keyfromlabel</span>�</td>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<td width="40%" align="right" valign="top">�<span class="application">dnssec-revoke</span>