1DNSSEC-KEYGEN(8)                     BIND9                    DNSSEC-KEYGEN(8)
2
3
4

NAME

6       dnssec-keygen - DNSSEC key generation tool
7

SYNOPSIS

9       dnssec-keygen {-a algorithm} {-b keysize} {-n nametype} [-c class] [-e]
10                     [-f flag] [-g generator] [-h] [-k] [-p protocol]
11                     [-r randomdev] [-s strength] [-t type] [-v level] {name}
12

DESCRIPTION

14       dnssec-keygen generates keys for DNSSEC (Secure DNS), as defined in RFC
15       2535 and RFC 4034. It can also generate keys for use with TSIG
16       (Transaction Signatures), as defined in RFC 2845.
17

OPTIONS

19       -a algorithm
20           Selects the cryptographic algorithm. The value of algorithm must be
21           one of RSAMD5 (RSA) or RSASHA1, DSA, DH (Diffie Hellman), or
22           HMAC-MD5. These values are case insensitive.
23
24           Note 1: that for DNSSEC, RSASHA1 is a mandatory to implement
25           algorithm, and DSA is recommended. For TSIG, HMAC-MD5 is mandatory.
26
27           Note 2: HMAC-MD5 and DH automatically set the -k flag.
28
29       -b keysize
30           Specifies the number of bits in the key. The choice of key size
31           depends on the algorithm used. RSAMD5 / RSASHA1 keys must be
32           between 512 and 2048 bits. Diffie Hellman keys must be between 128
33           and 4096 bits. DSA keys must be between 512 and 1024 bits and an
34           exact multiple of 64. HMAC-MD5 keys must be between 1 and 512 bits.
35
36       -n nametype
37           Specifies the owner type of the key. The value of nametype must
38           either be ZONE (for a DNSSEC zone key (KEY/DNSKEY)), HOST or ENTITY
39           (for a key associated with a host (KEY)), USER (for a key
40           associated with a user(KEY)) or OTHER (DNSKEY). These values are
41           case insensitive.
42
43       -c class
44           Indicates that the DNS record containing the key should have the
45           specified class. If not specified, class IN is used.
46
47       -e
48           If generating an RSAMD5/RSASHA1 key, use a large exponent.
49
50       -f flag
51           Set the specified flag in the flag field of the KEY/DNSKEY record.
52           The only recognized flag is KSK (Key Signing Key) DNSKEY.
53
54       -g generator
55           If generating a Diffie Hellman key, use this generator. Allowed
56           values are 2 and 5. If no generator is specified, a known prime
57           from RFC 2539 will be used if possible; otherwise the default is 2.
58
59       -h
60           Prints a short summary of the options and arguments to
61           dnssec-keygen.
62
63       -k
64           Generate KEY records rather than DNSKEY records.
65
66       -p protocol
67           Sets the protocol value for the generated key. The protocol is a
68           number between 0 and 255. The default is 3 (DNSSEC). Other possible
69           values for this argument are listed in RFC 2535 and its successors.
70
71       -r randomdev
72           Specifies the source of randomness. If the operating system does
73           not provide a /dev/random or equivalent device, the default source
74           of randomness is keyboard input.  randomdev specifies the name of a
75           character device or file containing random data to be used instead
76           of the default. The special value keyboard indicates that keyboard
77           input should be used.
78
79       -s strength
80           Specifies the strength value of the key. The strength is a number
81           between 0 and 15, and currently has no defined purpose in DNSSEC.
82
83       -t type
84           Indicates the use of the key.  type must be one of AUTHCONF,
85           NOAUTHCONF, NOAUTH, or NOCONF. The default is AUTHCONF. AUTH refers
86           to the ability to authenticate data, and CONF the ability to
87           encrypt data.
88
89       -v level
90           Sets the debugging level.
91

GENERATED KEYS

93       When dnssec-keygen completes successfully, it prints a string of the
94       form Knnnn.+aaa+iiiii to the standard output. This is an identification
95       string for the key it has generated.
96
97       ·   nnnn is the key name.
98
99       ·   aaa is the numeric representation of the algorithm.
100
101       ·   iiiii is the key identifier (or footprint).
102
103       dnssec-keygen creates two files, with names based on the printed
104       string.  Knnnn.+aaa+iiiii.key contains the public key, and
105       Knnnn.+aaa+iiiii.private contains the private key.
106
107       The .key file contains a DNS KEY record that can be inserted into a
108       zone file (directly or with a $INCLUDE statement).
109
110       The .private file contains algorithm-specific fields. For obvious
111       security reasons, this file does not have general read permission.
112
113       Both .key and .private files are generated for symmetric encryption
114       algorithms such as HMAC-MD5, even though the public and private key are
115       equivalent.
116

EXAMPLE

118       To generate a 768-bit DSA key for the domain example.com, the following
119       command would be issued:
120
121       dnssec-keygen -a DSA -b 768 -n ZONE example.com
122
123       The command would print a string of the form:
124
125       Kexample.com.+003+26160
126
127       In this example, dnssec-keygen creates the files
128       Kexample.com.+003+26160.key and Kexample.com.+003+26160.private.
129

SEE ALSO

131       dnssec-signzone(8), BIND 9 Administrator Reference Manual, RFC 2535,
132       RFC 2845, RFC 2539.
133

AUTHOR

135       Internet Systems Consortium
136
138       Copyright © 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
139       Copyright © 2000-2003 Internet Software Consortium.
140
141
142
143BIND9                            June 30, 2000                DNSSEC-KEYGEN(8)
Impressum