isc-hmac-fixup.docbook revision 0f66aced2640d964aeb6db41210711ba0640d7f2
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Bosch<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Bosch "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Bosch [<!ENTITY mdash "—">]>
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Bosch - Copyright (C) 2010 Internet Systems Consortium, Inc. ("ISC")
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Bosch - Permission to use, copy, modify, and/or distribute this software for any
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Bosch - purpose with or without fee is hereby granted, provided that the above
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Bosch - copyright notice and this permission notice appear in all copies.
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Bosch - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Bosch - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Bosch - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Bosch - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Bosch - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
debbc09b5fd4e89e67529dfac88620373ee12425Stephan Bosch - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
debbc09b5fd4e89e67529dfac88620373ee12425Stephan Bosch - PERFORMANCE OF THIS SOFTWARE.
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Bosch<!-- $Id: isc-hmac-fixup.docbook,v 1.2 2010/01/07 21:52:11 each Exp $ -->
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Bosch <refentryinfo>
bc8908662f8bbf027cc8e92b92b4e30dcd921552Stephan Bosch </refentryinfo>
bc8908662f8bbf027cc8e92b92b4e30dcd921552Stephan Bosch <refentrytitle><application>isc-hmac-fixup</application></refentrytitle>
bc8908662f8bbf027cc8e92b92b4e30dcd921552Stephan Bosch <refname><application>isc-hmac-fixup</application></refname>
47fee1a942e4797548b1232354f6676b8ff809f4Stephan Bosch <refpurpose>fixes HMAC keys generated by older versions of BIND</refpurpose>
47fee1a942e4797548b1232354f6676b8ff809f4Stephan Bosch </refnamediv>
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Bosch <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
debbc09b5fd4e89e67529dfac88620373ee12425Stephan Bosch <refsynopsisdiv>
debbc09b5fd4e89e67529dfac88620373ee12425Stephan Bosch <cmdsynopsis>
bc8908662f8bbf027cc8e92b92b4e30dcd921552Stephan Bosch <arg choice="req"><replaceable class="parameter">algorithm</replaceable></arg>
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Bosch <arg choice="req"><replaceable class="parameter">secret</replaceable></arg>
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Bosch </cmdsynopsis>
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Bosch </refsynopsisdiv>
debbc09b5fd4e89e67529dfac88620373ee12425Stephan Bosch Versions of BIND 9 up to and including BIND 9.6 had a bug causing
bbda51eb33c1c38f6a5350e543333dc4c1751b41Timo Sirainen HMAC-SHA* TSIG keys which were longer than the digest length of the
debbc09b5fd4e89e67529dfac88620373ee12425Stephan Bosch hash algorithm (i.e., SHA1 keys longer than 160 bits, SHA256 keys
debbc09b5fd4e89e67529dfac88620373ee12425Stephan Bosch longer than 256 bits, etc) to be used incorrectly, generating a
debbc09b5fd4e89e67529dfac88620373ee12425Stephan Bosch message authentication code that was incompatible with other DNS
debbc09b5fd4e89e67529dfac88620373ee12425Stephan Bosch implementations.
bc8908662f8bbf027cc8e92b92b4e30dcd921552Stephan Bosch This bug has been fixed in BIND 9.7. However, the fix may
bc8908662f8bbf027cc8e92b92b4e30dcd921552Stephan Bosch cause incompatibility between older and newer versions of
debbc09b5fd4e89e67529dfac88620373ee12425Stephan Bosch BIND, when using long keys. <command>isc-hmac-fixup</command>
debbc09b5fd4e89e67529dfac88620373ee12425Stephan Bosch modifies those keys to restore compatibility.
debbc09b5fd4e89e67529dfac88620373ee12425Stephan Bosch To modify a key, run <command>isc-hmac-fixup</command> and
bc8908662f8bbf027cc8e92b92b4e30dcd921552Stephan Bosch specify the key's algorithm and secret on the command line. If the
bc8908662f8bbf027cc8e92b92b4e30dcd921552Stephan Bosch secret is longer than the digest length of the algorithm (64 bytes
bc8908662f8bbf027cc8e92b92b4e30dcd921552Stephan Bosch for SHA1 through SHA256, or 128 bytes for SHA384 and SHA512), then a
debbc09b5fd4e89e67529dfac88620373ee12425Stephan Bosch new secret will be generated consisting of a hash digest of the old
debbc09b5fd4e89e67529dfac88620373ee12425Stephan Bosch secret. (If the secret did not require conversion, then it will be
bc8908662f8bbf027cc8e92b92b4e30dcd921552Stephan Bosch printed without modification.)
bc8908662f8bbf027cc8e92b92b4e30dcd921552Stephan Bosch Secrets that have been converted by <command>isc-hmac-fixup</command>
bc8908662f8bbf027cc8e92b92b4e30dcd921552Stephan Bosch are shortened, but as this is how the HMAC protocol works in
debbc09b5fd4e89e67529dfac88620373ee12425Stephan Bosch operation anyway, it does not affect security. RFC 2104 notes,
debbc09b5fd4e89e67529dfac88620373ee12425Stephan Bosch "Keys longer than [the digest length] are acceptable but the
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Bosch extra length would not significantly increase the function
debbc09b5fd4e89e67529dfac88620373ee12425Stephan Bosch <citetitle>BIND 9 Administrator Reference Manual</citetitle>,
debbc09b5fd4e89e67529dfac88620373ee12425Stephan Bosch <para><corpauthor>Internet Systems Consortium</corpauthor>
bc8908662f8bbf027cc8e92b92b4e30dcd921552Stephan Bosch - Local variables: