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