man.isc-hmac-fixup.html revision e1263b4b9c16f5ecd7640be046b1e1a5c592c1e0
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<!--
3b4098640dd85040270f39b9a5ee5e22de99d3d6Mark Andrews - Copyright (C) 2010 Internet Systems Consortium, Inc. ("ISC")
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews -
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - Permission to use, copy, modify, and/or distribute this software for any
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - purpose with or without fee is hereby granted, provided that the above
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - copyright notice and this permission notice appear in all copies.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews -
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - PERFORMANCE OF THIS SOFTWARE.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews-->
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
4abdfc917e6635a7c81d1f931a0c79227e72d025Mark Andrews<!-- $Id: man.isc-hmac-fixup.html,v 1.12 2010/05/18 01:14:20 tbox Exp $ -->
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<html>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<head>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<title>isc-hmac-fixup</title>
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<link rel="up" href="Bv9ARM.ch10.html" title="Manual pages">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<link rel="prev" href="man.genrandom.html" title="genrandom">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<link rel="next" href="man.nsec3hash.html" title="nsec3hash">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</head>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<div class="navheader">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<table width="100%" summary="Navigation header">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<tr><th colspan="3" align="center"><span class="application">isc-hmac-fixup</span></th></tr>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<tr>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<td width="20%" align="left">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<a accesskey="p" href="man.genrandom.html">Prev</a>�</td>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<th width="60%" align="center">Manual pages</th>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<td width="20%" align="right">�<a accesskey="n" href="man.nsec3hash.html">Next</a>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</td>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</tr>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</table>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<hr>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</div>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<div class="refentry" lang="en">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<a name="man.isc-hmac-fixup"></a><div class="titlepage"></div>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<div class="refnamediv">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<h2>Name</h2>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<p><span class="application">isc-hmac-fixup</span> &#8212; fixes HMAC keys generated by older versions of BIND</p>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</div>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<div class="refsynopsisdiv">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<h2>Synopsis</h2>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<div class="cmdsynopsis"><p><code class="command">isc-hmac-fixup</code> {<em class="replaceable"><code>algorithm</code></em>} {<em class="replaceable"><code>secret</code></em>}</p></div>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</div>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<div class="refsect1" lang="en">
4abdfc917e6635a7c81d1f931a0c79227e72d025Mark Andrews<a name="id2615147"></a><h2>DESCRIPTION</h2>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<p>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews Versions of BIND 9 up to and including BIND 9.6 had a bug causing
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews HMAC-SHA* TSIG keys which were longer than the digest length of the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews hash algorithm (i.e., SHA1 keys longer than 160 bits, SHA256 keys
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews longer than 256 bits, etc) to be used incorrectly, generating a
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews message authentication code that was incompatible with other DNS
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews implementations.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </p>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<p>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews This bug has been fixed in BIND 9.7. However, the fix may
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews cause incompatibility between older and newer versions of
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews BIND, when using long keys. <span><strong class="command">isc-hmac-fixup</strong></span>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews modifies those keys to restore compatibility.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </p>
4abdfc917e6635a7c81d1f931a0c79227e72d025Mark Andrews<p>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews To modify a key, run <span><strong class="command">isc-hmac-fixup</strong></span> and
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews specify the key's algorithm and secret on the command line. If the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews secret is longer than the digest length of the algorithm (64 bytes
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews for SHA1 through SHA256, or 128 bytes for SHA384 and SHA512), then a
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews new secret will be generated consisting of a hash digest of the old
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews secret. (If the secret did not require conversion, then it will be
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews printed without modification.)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </p>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</div>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<div class="refsect1" lang="en">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<a name="id2648353"></a><h2>SECURITY CONSIDERATIONS</h2>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<p>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews Secrets that have been converted by <span><strong class="command">isc-hmac-fixup</strong></span>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews are shortened, but as this is how the HMAC protocol works in
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews operation anyway, it does not affect security. RFC 2104 notes,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews "Keys longer than [the digest length] are acceptable but the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews extra length would not significantly increase the function
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews strength."
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </p>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</div>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<div class="refsect1" lang="en">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<a name="id2648369"></a><h2>SEE ALSO</h2>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<p>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <em class="citetitle">BIND 9 Administrator Reference Manual</em>,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <em class="citetitle">RFC 2104</em>.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </p>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</div>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<div class="refsect1" lang="en">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<a name="id2648386"></a><h2>AUTHOR</h2>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<p><span class="corpauthor">Internet Systems Consortium</span>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </p>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</div>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</div>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<div class="navfooter">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<hr>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<table width="100%" summary="Navigation footer">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<tr>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<td width="40%" align="left">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<a accesskey="p" href="man.genrandom.html">Prev</a>�</td>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<td width="20%" align="center"><a accesskey="u" href="Bv9ARM.ch10.html">Up</a></td>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<td width="40%" align="right">�<a accesskey="n" href="man.nsec3hash.html">Next</a>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</td>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</tr>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<tr>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<td width="40%" align="left" valign="top">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<span class="application">genrandom</span>�</td>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<td width="40%" align="right" valign="top">�<span class="application">nsec3hash</span>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</td>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</tr>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</table>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</div>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</body>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</html>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews