/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.docbook

https://bitbucket.org/freebsd/freebsd-head/ · Unknown · 429 lines · 394 code · 35 blank · 0 comment · 0 complexity · 63034904a3d2d9faf86445bc211b4345 MD5 · raw file

  1. <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  2. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
  3. [<!ENTITY mdash "&#8212;">]>
  4. <!--
  5. - Copyright (C) 2008-2011 Internet Systems Consortium, Inc. ("ISC")
  6. -
  7. - Permission to use, copy, modify, and/or distribute this software for any
  8. - purpose with or without fee is hereby granted, provided that the above
  9. - copyright notice and this permission notice appear in all copies.
  10. -
  11. - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
  12. - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  13. - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
  14. - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  15. - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  16. - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  17. - PERFORMANCE OF THIS SOFTWARE.
  18. -->
  19. <!-- $Id: dnssec-keyfromlabel.docbook,v 1.18.14.2 2011/02/28 01:19:58 tbox Exp $ -->
  20. <refentry id="man.dnssec-keyfromlabel">
  21. <refentryinfo>
  22. <date>February 8, 2008</date>
  23. </refentryinfo>
  24. <refmeta>
  25. <refentrytitle><application>dnssec-keyfromlabel</application></refentrytitle>
  26. <manvolnum>8</manvolnum>
  27. <refmiscinfo>BIND9</refmiscinfo>
  28. </refmeta>
  29. <refnamediv>
  30. <refname><application>dnssec-keyfromlabel</application></refname>
  31. <refpurpose>DNSSEC key generation tool</refpurpose>
  32. </refnamediv>
  33. <docinfo>
  34. <copyright>
  35. <year>2008</year>
  36. <year>2009</year>
  37. <year>2010</year>
  38. <year>2011</year>
  39. <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
  40. </copyright>
  41. </docinfo>
  42. <refsynopsisdiv>
  43. <cmdsynopsis>
  44. <command>dnssec-keyfromlabel</command>
  45. <arg choice="req">-l <replaceable class="parameter">label</replaceable></arg>
  46. <arg><option>-3</option></arg>
  47. <arg><option>-a <replaceable class="parameter">algorithm</replaceable></option></arg>
  48. <arg><option>-A <replaceable class="parameter">date/offset</replaceable></option></arg>
  49. <arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
  50. <arg><option>-D <replaceable class="parameter">date/offset</replaceable></option></arg>
  51. <arg><option>-E <replaceable class="parameter">engine</replaceable></option></arg>
  52. <arg><option>-f <replaceable class="parameter">flag</replaceable></option></arg>
  53. <arg><option>-G</option></arg>
  54. <arg><option>-I <replaceable class="parameter">date/offset</replaceable></option></arg>
  55. <arg><option>-k</option></arg>
  56. <arg><option>-K <replaceable class="parameter">directory</replaceable></option></arg>
  57. <arg><option>-n <replaceable class="parameter">nametype</replaceable></option></arg>
  58. <arg><option>-P <replaceable class="parameter">date/offset</replaceable></option></arg>
  59. <arg><option>-p <replaceable class="parameter">protocol</replaceable></option></arg>
  60. <arg><option>-R <replaceable class="parameter">date/offset</replaceable></option></arg>
  61. <arg><option>-t <replaceable class="parameter">type</replaceable></option></arg>
  62. <arg><option>-v <replaceable class="parameter">level</replaceable></option></arg>
  63. <arg><option>-y</option></arg>
  64. <arg choice="req">name</arg>
  65. </cmdsynopsis>
  66. </refsynopsisdiv>
  67. <refsect1>
  68. <title>DESCRIPTION</title>
  69. <para><command>dnssec-keyfromlabel</command>
  70. gets keys with the given label from a crypto hardware and builds
  71. key files for DNSSEC (Secure DNS), as defined in RFC 2535
  72. and RFC 4034.
  73. </para>
  74. <para>
  75. The <option>name</option> of the key is specified on the command
  76. line. This must match the name of the zone for which the key is
  77. being generated.
  78. </para>
  79. </refsect1>
  80. <refsect1>
  81. <title>OPTIONS</title>
  82. <variablelist>
  83. <varlistentry>
  84. <term>-a <replaceable class="parameter">algorithm</replaceable></term>
  85. <listitem>
  86. <para>
  87. Selects the cryptographic algorithm. The value of
  88. <option>algorithm</option> must be one of RSAMD5, RSASHA1,
  89. DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512 or ECCGOST.
  90. These values are case insensitive.
  91. </para>
  92. <para>
  93. If no algorithm is specified, then RSASHA1 will be used by
  94. default, unless the <option>-3</option> option is specified,
  95. in which case NSEC3RSASHA1 will be used instead. (If
  96. <option>-3</option> is used and an algorithm is specified,
  97. that algorithm will be checked for compatibility with NSEC3.)
  98. </para>
  99. <para>
  100. Note 1: that for DNSSEC, RSASHA1 is a mandatory to implement
  101. algorithm, and DSA is recommended.
  102. </para>
  103. <para>
  104. Note 2: DH automatically sets the -k flag.
  105. </para>
  106. </listitem>
  107. </varlistentry>
  108. <varlistentry>
  109. <term>-3</term>
  110. <listitem>
  111. <para>
  112. Use an NSEC3-capable algorithm to generate a DNSSEC key.
  113. If this option is used and no algorithm is explicitly
  114. set on the command line, NSEC3RSASHA1 will be used by
  115. default.
  116. </para>
  117. </listitem>
  118. </varlistentry>
  119. <varlistentry>
  120. <term>-E <replaceable class="parameter">engine</replaceable></term>
  121. <listitem>
  122. <para>
  123. Specifies the name of the crypto hardware (OpenSSL engine).
  124. When compiled with PKCS#11 support it defaults to "pkcs11".
  125. </para>
  126. </listitem>
  127. </varlistentry>
  128. <varlistentry>
  129. <term>-l <replaceable class="parameter">label</replaceable></term>
  130. <listitem>
  131. <para>
  132. Specifies the label of the key pair in the crypto hardware.
  133. The label may be preceded by an optional OpenSSL engine name,
  134. separated by a colon, as in "pkcs11:keylabel".
  135. </para>
  136. </listitem>
  137. </varlistentry>
  138. <varlistentry>
  139. <term>-n <replaceable class="parameter">nametype</replaceable></term>
  140. <listitem>
  141. <para>
  142. Specifies the owner type of the key. The value of
  143. <option>nametype</option> must either be ZONE (for a DNSSEC
  144. zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with
  145. a host (KEY)),
  146. USER (for a key associated with a user(KEY)) or OTHER (DNSKEY).
  147. These values are case insensitive.
  148. </para>
  149. </listitem>
  150. </varlistentry>
  151. <varlistentry>
  152. <term>-C</term>
  153. <listitem>
  154. <para>
  155. Compatibility mode: generates an old-style key, without
  156. any metadata. By default, <command>dnssec-keyfromlabel</command>
  157. will include the key's creation date in the metadata stored
  158. with the private key, and other dates may be set there as well
  159. (publication date, activation date, etc). Keys that include
  160. this data may be incompatible with older versions of BIND; the
  161. <option>-C</option> option suppresses them.
  162. </para>
  163. </listitem>
  164. </varlistentry>
  165. <varlistentry>
  166. <term>-c <replaceable class="parameter">class</replaceable></term>
  167. <listitem>
  168. <para>
  169. Indicates that the DNS record containing the key should have
  170. the specified class. If not specified, class IN is used.
  171. </para>
  172. </listitem>
  173. </varlistentry>
  174. <varlistentry>
  175. <term>-f <replaceable class="parameter">flag</replaceable></term>
  176. <listitem>
  177. <para>
  178. Set the specified flag in the flag field of the KEY/DNSKEY record.
  179. The only recognized flags are KSK (Key Signing Key) and REVOKE.
  180. </para>
  181. </listitem>
  182. </varlistentry>
  183. <varlistentry>
  184. <term>-G</term>
  185. <listitem>
  186. <para>
  187. Generate a key, but do not publish it or sign with it. This
  188. option is incompatible with -P and -A.
  189. </para>
  190. </listitem>
  191. </varlistentry>
  192. <varlistentry>
  193. <term>-h</term>
  194. <listitem>
  195. <para>
  196. Prints a short summary of the options and arguments to
  197. <command>dnssec-keyfromlabel</command>.
  198. </para>
  199. </listitem>
  200. </varlistentry>
  201. <varlistentry>
  202. <term>-K <replaceable class="parameter">directory</replaceable></term>
  203. <listitem>
  204. <para>
  205. Sets the directory in which the key files are to be written.
  206. </para>
  207. </listitem>
  208. </varlistentry>
  209. <varlistentry>
  210. <term>-k</term>
  211. <listitem>
  212. <para>
  213. Generate KEY records rather than DNSKEY records.
  214. </para>
  215. </listitem>
  216. </varlistentry>
  217. <varlistentry>
  218. <term>-p <replaceable class="parameter">protocol</replaceable></term>
  219. <listitem>
  220. <para>
  221. Sets the protocol value for the key. The protocol
  222. is a number between 0 and 255. The default is 3 (DNSSEC).
  223. Other possible values for this argument are listed in
  224. RFC 2535 and its successors.
  225. </para>
  226. </listitem>
  227. </varlistentry>
  228. <varlistentry>
  229. <term>-t <replaceable class="parameter">type</replaceable></term>
  230. <listitem>
  231. <para>
  232. Indicates the use of the key. <option>type</option> must be
  233. one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF. The default
  234. is AUTHCONF. AUTH refers to the ability to authenticate
  235. data, and CONF the ability to encrypt data.
  236. </para>
  237. </listitem>
  238. </varlistentry>
  239. <varlistentry>
  240. <term>-v <replaceable class="parameter">level</replaceable></term>
  241. <listitem>
  242. <para>
  243. Sets the debugging level.
  244. </para>
  245. </listitem>
  246. </varlistentry>
  247. <varlistentry>
  248. <term>-y</term>
  249. <listitem>
  250. <para>
  251. Allows DNSSEC key files to be generated even if the key ID
  252. would collide with that of an existing key, in the event of
  253. either key being revoked. (This is only safe to use if you
  254. are sure you won't be using RFC 5011 trust anchor maintenance
  255. with either of the keys involved.)
  256. </para>
  257. </listitem>
  258. </varlistentry>
  259. </variablelist>
  260. </refsect1>
  261. <refsect1>
  262. <title>TIMING OPTIONS</title>
  263. <para>
  264. Dates can be expressed in the format YYYYMMDD or YYYYMMDDHHMMSS.
  265. If the argument begins with a '+' or '-', it is interpreted as
  266. an offset from the present time. For convenience, if such an offset
  267. is followed by one of the suffixes 'y', 'mo', 'w', 'd', 'h', or 'mi',
  268. then the offset is computed in years (defined as 365 24-hour days,
  269. ignoring leap years), months (defined as 30 24-hour days), weeks,
  270. days, hours, or minutes, respectively. Without a suffix, the offset
  271. is computed in seconds.
  272. </para>
  273. <variablelist>
  274. <varlistentry>
  275. <term>-P <replaceable class="parameter">date/offset</replaceable></term>
  276. <listitem>
  277. <para>
  278. Sets the date on which a key is to be published to the zone.
  279. After that date, the key will be included in the zone but will
  280. not be used to sign it. If not set, and if the -G option has
  281. not been used, the default is "now".
  282. </para>
  283. </listitem>
  284. </varlistentry>
  285. <varlistentry>
  286. <term>-A <replaceable class="parameter">date/offset</replaceable></term>
  287. <listitem>
  288. <para>
  289. Sets the date on which the key is to be activated. After that
  290. date, the key will be included in the zone and used to sign
  291. it. If not set, and if the -G option has not been used, the
  292. default is "now".
  293. </para>
  294. </listitem>
  295. </varlistentry>
  296. <varlistentry>
  297. <term>-R <replaceable class="parameter">date/offset</replaceable></term>
  298. <listitem>
  299. <para>
  300. Sets the date on which the key is to be revoked. After that
  301. date, the key will be flagged as revoked. It will be included
  302. in the zone and will be used to sign it.
  303. </para>
  304. </listitem>
  305. </varlistentry>
  306. <varlistentry>
  307. <term>-I <replaceable class="parameter">date/offset</replaceable></term>
  308. <listitem>
  309. <para>
  310. Sets the date on which the key is to be retired. After that
  311. date, the key will still be included in the zone, but it
  312. will not be used to sign it.
  313. </para>
  314. </listitem>
  315. </varlistentry>
  316. <varlistentry>
  317. <term>-D <replaceable class="parameter">date/offset</replaceable></term>
  318. <listitem>
  319. <para>
  320. Sets the date on which the key is to be deleted. After that
  321. date, the key will no longer be included in the zone. (It
  322. may remain in the key repository, however.)
  323. </para>
  324. </listitem>
  325. </varlistentry>
  326. </variablelist>
  327. </refsect1>
  328. <refsect1>
  329. <title>GENERATED KEY FILES</title>
  330. <para>
  331. When <command>dnssec-keyfromlabel</command> completes
  332. successfully,
  333. it prints a string of the form <filename>Knnnn.+aaa+iiiii</filename>
  334. to the standard output. This is an identification string for
  335. the key files it has generated.
  336. </para>
  337. <itemizedlist>
  338. <listitem>
  339. <para><filename>nnnn</filename> is the key name.
  340. </para>
  341. </listitem>
  342. <listitem>
  343. <para><filename>aaa</filename> is the numeric representation
  344. of the algorithm.
  345. </para>
  346. </listitem>
  347. <listitem>
  348. <para><filename>iiiii</filename> is the key identifier (or
  349. footprint).
  350. </para>
  351. </listitem>
  352. </itemizedlist>
  353. <para><command>dnssec-keyfromlabel</command>
  354. creates two files, with names based
  355. on the printed string. <filename>Knnnn.+aaa+iiiii.key</filename>
  356. contains the public key, and
  357. <filename>Knnnn.+aaa+iiiii.private</filename> contains the
  358. private key.
  359. </para>
  360. <para>
  361. The <filename>.key</filename> file contains a DNS KEY record
  362. that
  363. can be inserted into a zone file (directly or with a $INCLUDE
  364. statement).
  365. </para>
  366. <para>
  367. The <filename>.private</filename> file contains
  368. algorithm-specific
  369. fields. For obvious security reasons, this file does not have
  370. general read permission.
  371. </para>
  372. </refsect1>
  373. <refsect1>
  374. <title>SEE ALSO</title>
  375. <para><citerefentry>
  376. <refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
  377. </citerefentry>,
  378. <citerefentry>
  379. <refentrytitle>dnssec-signzone</refentrytitle><manvolnum>8</manvolnum>
  380. </citerefentry>,
  381. <citetitle>BIND 9 Administrator Reference Manual</citetitle>,
  382. <citetitle>RFC 4034</citetitle>.
  383. </para>
  384. </refsect1>
  385. <refsect1>
  386. <title>AUTHOR</title>
  387. <para><corpauthor>Internet Systems Consortium</corpauthor>
  388. </para>
  389. </refsect1>
  390. </refentry><!--
  391. - Local variables:
  392. - mode: sgml
  393. - End:
  394. -->