dnssec-keygen.html revision d6fa26d0adaec6c910115be34fe7a5a5f402c14f
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin - Copyright (C) 2000-2005, 2007-2012, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin - This Source Code Form is subject to the terms of the Mozilla Public
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin - License, v. 2.0. If a copy of the MPL was not distributed with this
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin - file, You can obtain one at http://mozilla.org/MPL/2.0/.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<a name="man.dnssec-keygen"></a><div class="titlepage"></div>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<p><span class="application">dnssec-keygen</span> — DNSSEC key generation tool</p>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<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">-D sync <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">-k</code>] [<code class="option">-L <em class="replaceable"><code>ttl</code></em></code>] [<code class="option">-P <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-P sync <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</code>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] [<code class="option">-z</code>] {name}</p></div>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<p><span class="command"><strong>dnssec-keygen</strong></span>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin generates keys for DNSSEC (Secure DNS), as defined in RFC 2535
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin and RFC 4034. It can also generate keys for use with
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin TSIG (Transaction Signatures) as defined in RFC 2845, or TKEY
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin (Transaction Key) as defined in RFC 2930.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin The <code class="option">name</code> of the key is specified on the command
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin line. For DNSSEC keys, this must match the name of the zone for
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin which the key is being generated.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin Selects the cryptographic algorithm. For DNSSEC keys, the value
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin of <code class="option">algorithm</code> must be one of RSAMD5, RSASHA1,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECCGOST,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin ECDSAP256SHA256 or ECDSAP384SHA384.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin be DH (Diffie Hellman), HMAC-MD5, HMAC-SHA1, HMAC-SHA224,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin HMAC-SHA256, HMAC-SHA384, or HMAC-SHA512. These values are
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin case insensitive.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin If no algorithm is specified, then RSASHA1 will be used by
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin default, unless the <code class="option">-3</code> option is specified,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin in which case NSEC3RSASHA1 will be used instead. (If
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <code class="option">-3</code> is used and an algorithm is specified,
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin that algorithm will be checked for compatibility with NSEC3.)
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin Note 1: that for DNSSEC, RSASHA1 is a mandatory to implement
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin algorithm, and DSA is recommended. For TSIG, HMAC-MD5 is
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin mandatory.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin Note 2: DH, HMAC-MD5, and HMAC-SHA1 through HMAC-SHA512
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin automatically set the -T KEY option.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<dt><span class="term">-b <em class="replaceable"><code>keysize</code></em></span></dt>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin Specifies the number of bits in the key. The choice of key
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin size depends on the algorithm used. RSA keys must be
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin between 512 and 2048 bits. Diffie Hellman keys must be between
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin 128 and 4096 bits. DSA keys must be between 512 and 1024
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin bits and an exact multiple of 64. HMAC keys must be
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin between 1 and 512 bits. Elliptic curve algorithms don't need
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin this parameter.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin The key size does not need to be specified if using a default
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin algorithm. The default key size is 1024 bits for zone signing
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin keys (ZSKs) and 2048 bits for key signing keys (KSKs,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin generated with <code class="option">-f KSK</code>). However, if an
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin algorithm is explicitly specified with the <code class="option">-a</code>,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin then there is no default key size, and the <code class="option">-b</code>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin must be used.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<dt><span class="term">-n <em class="replaceable"><code>nametype</code></em></span></dt>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin Specifies the owner type of the key. The value of
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <code class="option">nametype</code> must either be ZONE (for a DNSSEC
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin a host (KEY)),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin USER (for a key associated with a user(KEY)) or OTHER (DNSKEY).
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin These values are case insensitive. Defaults to ZONE for DNSKEY
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin generation.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin Use an NSEC3-capable algorithm to generate a DNSSEC key.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin If this option is used and no algorithm is explicitly
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin set on the command line, NSEC3RSASHA1 will be used by
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin default. Note that RSASHA256, RSASHA512, ECCGOST,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin ECDSAP256SHA256 and ECDSAP384SHA384 algorithms
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin are NSEC3-capable.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin Compatibility mode: generates an old-style key, without
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin any metadata. By default, <span class="command"><strong>dnssec-keygen</strong></span>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin will include the key's creation date in the metadata stored
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin with the private key, and other dates may be set there as well
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin (publication date, activation date, etc). Keys that include
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin this data may be incompatible with older versions of BIND; the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<dt><span class="term">-c <em class="replaceable"><code>class</code></em></span></dt>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin Indicates that the DNS record containing the key should have
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin the specified class. If not specified, class IN is used.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<dt><span class="term">-E <em class="replaceable"><code>engine</code></em></span></dt>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin Specifies the cryptographic hardware to use, when applicable.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin When BIND is built with OpenSSL PKCS#11 support, this defaults
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin to the string "pkcs11", which identifies an OpenSSL engine
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin that can drive a cryptographic accelerator or hardware service
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin module. When BIND is built with native PKCS#11 cryptography
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin (--enable-native-pkcs11), it defaults to the path of the PKCS#11