isc-hmac-fixup.html revision fdd80e9a55c70b36a3bf3e409b86897301c44ff8
fa9e4066f08beec538e775443c5be79dd423fcabahrens<!--
fa9e4066f08beec538e775443c5be79dd423fcabahrens - Copyright (C) 2010 Internet Systems Consortium, Inc. ("ISC")
fa9e4066f08beec538e775443c5be79dd423fcabahrens -
fa9e4066f08beec538e775443c5be79dd423fcabahrens - Permission to use, copy, modify, and/or distribute this software for any
ea8dc4b6d2251b437950c0056bc626b311c73c27eschrock - purpose with or without fee is hereby granted, provided that the above
ea8dc4b6d2251b437950c0056bc626b311c73c27eschrock - copyright notice and this permission notice appear in all copies.
fa9e4066f08beec538e775443c5be79dd423fcabahrens -
fa9e4066f08beec538e775443c5be79dd423fcabahrens - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
fa9e4066f08beec538e775443c5be79dd423fcabahrens - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
fa9e4066f08beec538e775443c5be79dd423fcabahrens - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
fa9e4066f08beec538e775443c5be79dd423fcabahrens - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
fa9e4066f08beec538e775443c5be79dd423fcabahrens - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
fa9e4066f08beec538e775443c5be79dd423fcabahrens - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
fa9e4066f08beec538e775443c5be79dd423fcabahrens - PERFORMANCE OF THIS SOFTWARE.
fa9e4066f08beec538e775443c5be79dd423fcabahrens-->
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens<!-- $Id: isc-hmac-fixup.html,v 1.3 2010/01/08 01:14:07 tbox Exp $ -->
fa9e4066f08beec538e775443c5be79dd423fcabahrens<html>
fa9e4066f08beec538e775443c5be79dd423fcabahrens<head>
fa9e4066f08beec538e775443c5be79dd423fcabahrens<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
fa9e4066f08beec538e775443c5be79dd423fcabahrens<title>isc-hmac-fixup</title>
3113f7cee6785cfe8d9e78c535cf9e2a79283275George Wilson<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
ad135b5d644628e791c3188a6ecbd9c257961ef8Christopher Siden</head>
fa9e4066f08beec538e775443c5be79dd423fcabahrens<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
fa9e4066f08beec538e775443c5be79dd423fcabahrens<a name="man.isc-hmac-fixup"></a><div class="titlepage"></div>
fa9e4066f08beec538e775443c5be79dd423fcabahrens<div class="refnamediv">
fa9e4066f08beec538e775443c5be79dd423fcabahrens<h2>Name</h2>
fa9e4066f08beec538e775443c5be79dd423fcabahrens<p><span class="application">isc-hmac-fixup</span> &#8212; fixes HMAC keys generated by older versions of BIND</p>
fa9e4066f08beec538e775443c5be79dd423fcabahrens</div>
fa9e4066f08beec538e775443c5be79dd423fcabahrens<div class="refsynopsisdiv">
fa9e4066f08beec538e775443c5be79dd423fcabahrens<h2>Synopsis</h2>
fa9e4066f08beec538e775443c5be79dd423fcabahrens<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>
088f389458728c464569a5506b58070254fa4f7dahrens</div>
88b7b0f29b20b808b9e06071885b1d6a3ddb6328Matthew Ahrens<div class="refsect1" lang="en">
bbfd46c40e81c7d954cec28db66453ec5ab44613Jeff Bonwick<a name="id2543351"></a><h2>DESCRIPTION</h2>
3f9d6ad73e45c6823b409f93b0c8d4f62861d2d5Lin Ling<p>
cde58dbc6a23d4d38db7c8866312be83221c765fMatthew Ahrens Versions of BIND 9 up to and including BIND 9.6 had a bug causing
ad135b5d644628e791c3188a6ecbd9c257961ef8Christopher Siden HMAC-SHA* TSIG keys which were longer than the digest length of the
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens hash algorithm (i.e., SHA1 keys longer than 160 bits, SHA256 keys
fa9e4066f08beec538e775443c5be79dd423fcabahrens longer than 256 bits, etc) to be used incorrectly, generating a
fa9e4066f08beec538e775443c5be79dd423fcabahrens message authentication code that was incompatible with other DNS
fa9e4066f08beec538e775443c5be79dd423fcabahrens implementations.
fa9e4066f08beec538e775443c5be79dd423fcabahrens </p>
fa9e4066f08beec538e775443c5be79dd423fcabahrens<p>
fa9e4066f08beec538e775443c5be79dd423fcabahrens This bug has been fixed in BIND 9.7. However, the fix may
fa9e4066f08beec538e775443c5be79dd423fcabahrens cause incompatibility between older and newer versions of
088f389458728c464569a5506b58070254fa4f7dahrens BIND, when using long keys. <span><strong class="command">isc-hmac-fixup</strong></span>
088f389458728c464569a5506b58070254fa4f7dahrens modifies those keys to restore compatibility.
088f389458728c464569a5506b58070254fa4f7dahrens </p>
3f9d6ad73e45c6823b409f93b0c8d4f62861d2d5Lin Ling<p>
088f389458728c464569a5506b58070254fa4f7dahrens To modify a key, run <span><strong class="command">isc-hmac-fixup</strong></span> and
88b7b0f29b20b808b9e06071885b1d6a3ddb6328Matthew Ahrens specify the key's algorithm and secret on the command line. If the
88b7b0f29b20b808b9e06071885b1d6a3ddb6328Matthew Ahrens secret is longer than the digest length of the algorithm (64 bytes
ad135b5d644628e791c3188a6ecbd9c257961ef8Christopher Siden for SHA1 through SHA256, or 128 bytes for SHA384 and SHA512), then a
ad135b5d644628e791c3188a6ecbd9c257961ef8Christopher Siden new secret will be generated consisting of a hash digest of the old
88b7b0f29b20b808b9e06071885b1d6a3ddb6328Matthew Ahrens secret. (If the secret did not require conversion, then it will be
88b7b0f29b20b808b9e06071885b1d6a3ddb6328Matthew Ahrens printed without modification.)
88b7b0f29b20b808b9e06071885b1d6a3ddb6328Matthew Ahrens </p>
88b7b0f29b20b808b9e06071885b1d6a3ddb6328Matthew Ahrens</div>
88b7b0f29b20b808b9e06071885b1d6a3ddb6328Matthew Ahrens<div class="refsect1" lang="en">
88b7b0f29b20b808b9e06071885b1d6a3ddb6328Matthew Ahrens<a name="id2543374"></a><h2>SECURITY CONSIDERATIONS</h2>
88b7b0f29b20b808b9e06071885b1d6a3ddb6328Matthew Ahrens<p>
88b7b0f29b20b808b9e06071885b1d6a3ddb6328Matthew Ahrens Secrets that have been converted by <span><strong class="command">isc-hmac-fixup</strong></span>
88b7b0f29b20b808b9e06071885b1d6a3ddb6328Matthew Ahrens are shortened, but as this is how the HMAC protocol works in
88b7b0f29b20b808b9e06071885b1d6a3ddb6328Matthew Ahrens operation anyway, it does not affect security. RFC 2104 notes,
88b7b0f29b20b808b9e06071885b1d6a3ddb6328Matthew Ahrens "Keys longer than [the digest length] are acceptable but the
88b7b0f29b20b808b9e06071885b1d6a3ddb6328Matthew Ahrens extra length would not significantly increase the function
88b7b0f29b20b808b9e06071885b1d6a3ddb6328Matthew Ahrens strength."
88b7b0f29b20b808b9e06071885b1d6a3ddb6328Matthew Ahrens </p>
88b7b0f29b20b808b9e06071885b1d6a3ddb6328Matthew Ahrens</div>
88b7b0f29b20b808b9e06071885b1d6a3ddb6328Matthew Ahrens<div class="refsect1" lang="en">
fa9e4066f08beec538e775443c5be79dd423fcabahrens<a name="id2543388"></a><h2>SEE ALSO</h2>
fa9e4066f08beec538e775443c5be79dd423fcabahrens<p>
fa9e4066f08beec538e775443c5be79dd423fcabahrens <em class="citetitle">BIND 9 Administrator Reference Manual</em>,
fa9e4066f08beec538e775443c5be79dd423fcabahrens <em class="citetitle">RFC 2104</em>.
fa9e4066f08beec538e775443c5be79dd423fcabahrens </p>
fa9e4066f08beec538e775443c5be79dd423fcabahrens</div>
fa9e4066f08beec538e775443c5be79dd423fcabahrens<div class="refsect1" lang="en">
cde58dbc6a23d4d38db7c8866312be83221c765fMatthew Ahrens<a name="id2543405"></a><h2>AUTHOR</h2>
088f389458728c464569a5506b58070254fa4f7dahrens<p><span class="corpauthor">Internet Systems Consortium</span>
fa9e4066f08beec538e775443c5be79dd423fcabahrens </p>
9d3574bff0b382b89dd380c1e23d742ebc156772Neil Perrin</div>
fa9e4066f08beec538e775443c5be79dd423fcabahrens</div></body>
fa9e4066f08beec538e775443c5be79dd423fcabahrens</html>
fa9e4066f08beec538e775443c5be79dd423fcabahrens