isc-hmac-fixup.html revision 33d0a7767d53cb366039fd0ac4f63cf8a9c351b0
1fdd2470b625a58b57d0b155e6caf8c4fc0afe8aAutomatic Updater - Copyright (C) 2010, 2013-2016 Internet Systems Consortium, Inc. ("ISC")
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - Permission to use, copy, modify, and/or distribute this software for any
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - purpose with or without fee is hereby granted, provided that the above
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - copyright notice and this permission notice appear in all copies.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - PERFORMANCE OF THIS SOFTWARE.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<a name="man.isc-hmac-fixup"></a><div class="titlepage"></div>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<p><span class="application">isc-hmac-fixup</span> — fixes HMAC keys generated by older versions of BIND</p>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<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>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Versions of BIND 9 up to and including BIND 9.6 had a bug causing
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein HMAC-SHA* TSIG keys which were longer than the digest length of the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein hash algorithm (i.e., SHA1 keys longer than 160 bits, SHA256 keys
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein longer than 256 bits, etc) to be used incorrectly, generating a
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein message authentication code that was incompatible with other DNS
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein implementations.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein This bug has been fixed in BIND 9.7. However, the fix may
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein cause incompatibility between older and newer versions of
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein BIND, when using long keys. <span class="command"><strong>isc-hmac-fixup</strong></span>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein modifies those keys to restore compatibility.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein To modify a key, run <span class="command"><strong>isc-hmac-fixup</strong></span> and
1fdd2470b625a58b57d0b155e6caf8c4fc0afe8aAutomatic Updater specify the key's algorithm and secret on the command line. If the
1fdd2470b625a58b57d0b155e6caf8c4fc0afe8aAutomatic Updater secret is longer than the digest length of the algorithm (64 bytes
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein for SHA1 through SHA256, or 128 bytes for SHA384 and SHA512), then a
1fdd2470b625a58b57d0b155e6caf8c4fc0afe8aAutomatic Updater new secret will be generated consisting of a hash digest of the old
1fdd2470b625a58b57d0b155e6caf8c4fc0afe8aAutomatic Updater secret. (If the secret did not require conversion, then it will be
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein printed without modification.)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<a name="id-1.8"></a><h2>SECURITY CONSIDERATIONS</h2>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Secrets that have been converted by <span class="command"><strong>isc-hmac-fixup</strong></span>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein 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
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein extra length would not significantly increase the function
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <em class="citetitle">BIND 9 Administrator Reference Manual</em>,