dnssec-keygen.html revision 7865ea9545f28f12f046b32d24c989e8441b9812
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User - Copyright (C) 2004, 2005, 2007-2012 Internet Systems Consortium, Inc. ("ISC")
f0aad5341752aefe5059832f6cf3abc3283c6e16Tinderbox User - Copyright (C) 2000-2003 Internet Software Consortium.
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User - Permission to use, copy, modify, and/or distribute this software for any
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User - purpose with or without fee is hereby granted, provided that the above
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User - copyright notice and this permission notice appear in all copies.
d6fa26d0adaec6c910115be34fe7a5a5f402c14fMark Andrews - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User - PERFORMANCE OF THIS SOFTWARE.
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User<a name="man.dnssec-keygen"></a><div class="titlepage"></div>
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User<p><span class="application">dnssec-keygen</span> — DNSSEC key generation tool</p>
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User<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>
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User<p><span><strong class="command">dnssec-keygen</strong></span>
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User generates keys for DNSSEC (Secure DNS), as defined in RFC 2535
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User and RFC 4034. It can also generate keys for use with
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User TSIG (Transaction Signatures) as defined in RFC 2845, or TKEY
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User (Transaction Key) as defined in RFC 2930.
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User The <code class="option">name</code> of the key is specified on the command
7e71f05d8643aca84914437c900cb716444507e4Tinderbox User line. For DNSSEC keys, this must match the name of the zone for
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User which the key is being generated.
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User<dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User Selects the cryptographic algorithm. For DNSSEC keys, the value
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User of <code class="option">algorithm</code> must be one of RSAMD5, RSASHA1,
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECCGOST,
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User ECDSAP256SHA256 or ECDSAP384SHA384.
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User be DH (Diffie Hellman), HMAC-MD5, HMAC-SHA1, HMAC-SHA224,
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User HMAC-SHA256, HMAC-SHA384, or HMAC-SHA512. These values are
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User case insensitive.
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User If no algorithm is specified, then RSASHA1 will be used by
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User default, unless the <code class="option">-3</code> option is specified,
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User in which case NSEC3RSASHA1 will be used instead. (If
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User <code class="option">-3</code> is used and an algorithm is specified,
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User that algorithm will be checked for compatibility with NSEC3.)
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User Note 1: that for DNSSEC, RSASHA1 is a mandatory to implement
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User algorithm, and DSA is recommended. For TSIG, HMAC-MD5 is
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User Note 2: DH, HMAC-MD5, and HMAC-SHA1 through HMAC-SHA512
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User automatically set the -T KEY option.
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User<dt><span class="term">-b <em class="replaceable"><code>keysize</code></em></span></dt>
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User Specifies the number of bits in the key. The choice of key
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User size depends on the algorithm used. RSA keys must be
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User between 512 and 2048 bits. Diffie Hellman keys must be between
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User 128 and 4096 bits. DSA keys must be between 512 and 1024
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User bits and an exact multiple of 64. HMAC keys must be
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User between 1 and 512 bits. Elliptic curve algorithms don't need
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User this parameter.
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User The key size does not need to be specified if using a default
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User algorithm. The default key size is 1024 bits for zone signing
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User keys (ZSK's) and 2048 bits for key signing keys (KSK's,
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User generated with <code class="option">-f KSK</code>). However, if an
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User algorithm is explicitly specified with the <code class="option">-a</code>,
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User then there is no default key size, and the <code class="option">-b</code>
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User must be used.
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User<dt><span class="term">-n <em class="replaceable"><code>nametype</code></em></span></dt>
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User Specifies the owner type of the key. The value of
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User <code class="option">nametype</code> must either be ZONE (for a DNSSEC
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User a host (KEY)),
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User USER (for a key associated with a user(KEY)) or OTHER (DNSKEY).
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User These values are case insensitive. Defaults to ZONE for DNSKEY
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User Use an NSEC3-capable algorithm to generate a DNSSEC key.
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User If this option is used and no algorithm is explicitly
7e71f05d8643aca84914437c900cb716444507e4Tinderbox User set on the command line, NSEC3RSASHA1 will be used by
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User default. Note that RSASHA256, RSASHA512, ECCGOST,
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User ECDSAP256SHA256 and ECDSAP384SHA384 algorithms
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User are NSEC3-capable.
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User Compatibility mode: generates an old-style key, without
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User any metadata. By default, <span><strong class="command">dnssec-keygen</strong></span>
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User will include the key's creation date in the metadata stored
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User with the private key, and other dates may be set there as well
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User (publication date, activation date, etc). Keys that include
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User this data may be incompatible with older versions of BIND; the
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User <code class="option">-C</code> option suppresses them.
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User<dt><span class="term">-c <em class="replaceable"><code>class</code></em></span></dt>
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User Indicates that the DNS record containing the key should have
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User the specified class. If not specified, class IN is used.
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User<dt><span class="term">-E <em class="replaceable"><code>engine</code></em></span></dt>
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User Uses a crypto hardware (OpenSSL engine) for random number
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User and, when supported, key generation. When compiled with PKCS#11
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User support it defaults to pkcs11; the empty name resets it to
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User<dt><span class="term">-f <em class="replaceable"><code>flag</code></em></span></dt>
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User Set the specified flag in the flag field of the KEY/DNSKEY record.
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User The only recognized flags are KSK (Key Signing Key) and REVOKE.