isc-hmac-fixup.docbook revision 9a769d8b16eb4e3d088ba1e5bd6ccb65504e1c9e
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<!--
b7b6b01a0d0622181a4c28dd60401f0ab2480d00Mark Andrews - Copyright (C) 2010, 2013-2017 Internet Systems Consortium, Inc. ("ISC")
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews -
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence - This Source Code Form is subject to the terms of the Mozilla Public
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson - License, v. 2.0. If a copy of the MPL was not distributed with this
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson - file, You can obtain one at http://mozilla.org/MPL/2.0/.
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson-->
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews<!-- Converted by db4-upgrade version 1.0 -->
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.isc-hmac-fixup">
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews <info>
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews <date>2013-04-28</date>
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews </info>
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews <refentryinfo>
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews <corpname>ISC</corpname>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson </refentryinfo>
261a6a1f7d95eaf0cd882f3123dcfd775517a54fMark Andrews
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein <refmeta>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein <refentrytitle><application>isc-hmac-fixup</application></refentrytitle>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson <manvolnum>8</manvolnum>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson <refmiscinfo>BIND9</refmiscinfo>
f80ea74e1984e0b1dbe48dd86ecdd3a2380393cbBob Halley </refmeta>
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence <refnamediv>
fc8a6561cbb0a1fea849950a3217aacd3b8f1eacDavid Lawrence <refname><application>isc-hmac-fixup</application></refname>
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence <refpurpose>fixes HMAC keys generated by older versions of BIND</refpurpose>
ed04318ef686581fc9a20965a5be02abfb4f1bd5Andreas Gustafsson </refnamediv>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson <docinfo>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson <copyright>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson <year>2010</year>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson <year>2013</year>
261a6a1f7d95eaf0cd882f3123dcfd775517a54fMark Andrews <year>2014</year>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson <year>2015</year>
f0e246e271f84c6fe960a3c36703a56d1067431cBrian Wellington <year>2016</year>
6c8abf481df85a67c3f32f5f107b554d3ff5a3edMark Andrews <year>2017</year>
6c8abf481df85a67c3f32f5f107b554d3ff5a3edMark Andrews <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
6c8abf481df85a67c3f32f5f107b554d3ff5a3edMark Andrews </copyright>
09f22ac5b09e70bc526015f37168ba33e21ea91fDavid Lawrence </docinfo>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson
92ef1a9b9dbd48ecb507b42ac62c15afefdaf838David Lawrence <refsynopsisdiv>
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence <cmdsynopsis sepchar=" ">
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson <command>isc-hmac-fixup</command>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein <arg choice="req" rep="norepeat"><replaceable class="parameter">algorithm</replaceable></arg>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein <arg choice="req" rep="norepeat"><replaceable class="parameter">secret</replaceable></arg>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </cmdsynopsis>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </refsynopsisdiv>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein <refsection><info><title>DESCRIPTION</title></info>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein <para>
f991461dc144794d80ff8d85e430fd8a6e6113f3David Lawrence Versions of BIND 9 up to and including BIND 9.6 had a bug causing
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein HMAC-SHA* TSIG keys which were longer than the digest length of the
f991461dc144794d80ff8d85e430fd8a6e6113f3David Lawrence hash algorithm (i.e., SHA1 keys longer than 160 bits, SHA256 keys
261a6a1f7d95eaf0cd882f3123dcfd775517a54fMark Andrews longer than 256 bits, etc) to be used incorrectly, generating a
f991461dc144794d80ff8d85e430fd8a6e6113f3David Lawrence message authentication code that was incompatible with other DNS
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson implementations.
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson </para>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson <para>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson This bug was fixed in BIND 9.7. However, the fix may
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson cause incompatibility between older and newer versions of
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson BIND, when using long keys. <command>isc-hmac-fixup</command>
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence modifies those keys to restore compatibility.
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson </para>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson <para>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson To modify a key, run <command>isc-hmac-fixup</command> and
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson specify the key's algorithm and secret on the command line. If the
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson secret is longer than the digest length of the algorithm (64 bytes
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein for SHA1 through SHA256, or 128 bytes for SHA384 and SHA512), then a
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein new secret will be generated consisting of a hash digest of the old
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein secret. (If the secret did not require conversion, then it will be
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson printed without modification.)
a928d619170d61da40c3bff29800ff73709140daAndreas Gustafsson </para>
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence </refsection>
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence <refsection><info><title>SECURITY CONSIDERATIONS</title></info>
a928d619170d61da40c3bff29800ff73709140daAndreas Gustafsson
78838d3e0cd62423c23de5503910e01884d2104bBrian Wellington <para>
a928d619170d61da40c3bff29800ff73709140daAndreas Gustafsson Secrets that have been converted by <command>isc-hmac-fixup</command>
a928d619170d61da40c3bff29800ff73709140daAndreas Gustafsson are shortened, but as this is how the HMAC protocol works in
78838d3e0cd62423c23de5503910e01884d2104bBrian Wellington operation anyway, it does not affect security. RFC 2104 notes,
a928d619170d61da40c3bff29800ff73709140daAndreas Gustafsson "Keys longer than [the digest length] are acceptable but the
a928d619170d61da40c3bff29800ff73709140daAndreas Gustafsson extra length would not significantly increase the function
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein strength."
f991461dc144794d80ff8d85e430fd8a6e6113f3David Lawrence </para>
f991461dc144794d80ff8d85e430fd8a6e6113f3David Lawrence </refsection>
f991461dc144794d80ff8d85e430fd8a6e6113f3David Lawrence
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson <refsection><info><title>SEE ALSO</title></info>
ce3c351d815569455892c30dc78d8c2e85ec1076Andreas Gustafsson
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein <para>
ce3c351d815569455892c30dc78d8c2e85ec1076Andreas Gustafsson <citetitle>BIND 9 Administrator Reference Manual</citetitle>,
ce3c351d815569455892c30dc78d8c2e85ec1076Andreas Gustafsson <citetitle>RFC 2104</citetitle>.
ce3c351d815569455892c30dc78d8c2e85ec1076Andreas Gustafsson </para>
ce3c351d815569455892c30dc78d8c2e85ec1076Andreas Gustafsson </refsection>
ce3c351d815569455892c30dc78d8c2e85ec1076Andreas Gustafsson
ce3c351d815569455892c30dc78d8c2e85ec1076Andreas Gustafsson</refentry>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson