<?xml version="1.0" encoding="US-ASCII"?>
<!-- change the "txt" on the previous line to "xml" to make this a valid XML2RFC template -->
<!-- this is version 5 of this xml2rfc template -->
<!--
DOCTYPE processing

To use this XML template, the rfc2629.dtd from the xml2rfc distribution should
be in the local directory. The xml2rfc distribution is available from
http://xml.resource.org/

The ENTITY clauses create an include of the named XML files, which
contains references written in xml2rfc format.

XML2RFC offers an include feature described in the XML2RFC README
file.  That syntax, however, contradicts the DTD requirements to
have <reference> elements within the <references> element, so an
XML parser is likely to find your XML file invalid.  It may be
possible that XML2RFC will change their DTD so that the XML file
remains valid when their style of include is used.

Some editors, such as XXE, resolve the ENTITY clauses before displaying the
document to be edited.
-->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY rfc2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY rfc2223 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2223.xml">
<!ENTITY rfc2578 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2578.xml">
<!ENTITY rfc2579 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2579.xml">
<!ENTITY rfc2580 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2580.xml">
<!ENTITY rfc2629 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2629.xml">
<!ENTITY rfc3410 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3410.xml">
<!ENTITY rfc4181 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4181.xml">
]>
<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc strict="no"?>
<?rfc rfcedstyle="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>

<!-- Document  section

Specify the category attribute per RFC2026
options are info, std, bcp, or exp.

docname is the name of the output document. This is optional;
the default is to use the base portion of the XML filename.

For Internet-drafts, indicate which intellectual property notice
to use per the rules of RFC3978. The value (as of this template) can be:
trust200902 -
noModificationTrust200902 -
noDerivativesTrust200902 -
pre5378Trust200902 -

The Intellectual Property section will be generated automatically by
XML2RFC, based on the ipr attribute in the rfc element.

If this document obsoletes an RFC, specify the RFC in the "obsoletes" attribute
If this document updates an RFC, specify the RFC in the "updates" attribute
-->
<!-- used to be ipr="trust200902" -->
<rfc category="info" docName="draft-hmac-sha-2-usm-snmp-01" ipr="trust200902">
	<front>
		<!--
Enter the full document title and an abbreviated version
to use in the page header.
-->

		<title abbrev="HMAC-SHA-2_Auth_USM">HMAC-SHA-2 Authentication
			Protocols in USM for SNMP</title>

		<!-- copy the author block as many times as needed, one for each author.-->

		<!-- If the author is acting as editor, use the <role=editor> attribute-->

		<!-- see RFC2223 for guidelines regarding author names -->

		<author fullname="Johannes Merkle" initials="J.M."
				surname="Merkle" role="editor">
			<organization>Secunet Security Networks</organization>
			<address>
				<postal>
					<street>Mergenthaler Allee 77</street>
					<city>65760 Eschborn</city>
					<country>Germany</country>
				</postal>
				<phone>+49 201 5454 3091</phone>
				<email>johannes.merkle@secunet.com</email>
			</address>
		</author>

		<author fullname="Manfred Lochter" initials="M.L."
				surname="Lochter">
			<organization>BSI</organization>
			<address>
				<postal>
					<street>Postfach 200363</street>
					<city>53133 Bonn</city>
					<country>Germany</country>
				</postal>
				<phone>+49 228 9582 5643</phone>
				<email>manfred.lochter@bsi.bund.de</email>
			</address>
		</author>

		<!--
<author fullname="Uri Blumenthal" initials="U.B."
surname="Blumenthal">
<organization>MIT</organization>
<address>
<postal>
<street>14 Plain Rd</street>
<city>Westford</city>
<region>MA</region>
<code>01886</code>
<country>USA</country>
</postal>
<email>uri@mit.edu</email>
</address>
</author> -->

		<!-- month and day will be generated automatically by XML2RFC;
make sure the year is current.-->

		<date  year="2014" />

		<!-- IETF area is optional -->

		<!--  <area>Operations &amp; Management Area</area> -->

		<!--WG name at the upperleft corner of the doc,
IETF is fine for non-WG IETF submissions -->

		<!--   <workgroup>Operations and Management Area Working Group</workgroup>  -->
		<keyword>Network Management</keyword>

		<keyword>SNMP</keyword>

		<keyword>USM</keyword>

		<keyword>HMAC</keyword>

		<keyword>SHA-2</keyword>

		<!--add additional keywords here for IETF website search engine -->
		<abstract>
			<t> This memo specifies new optional HMAC-SHA-2 authentication
				protocols for the User-based Security   Model (USM) for SNMPv3
				defined in RFC 3414.</t>
		</abstract>
	</front>

	<middle>

		<section title="Introduction">

			<t>This memo defines a portion of the Management Information Base (MIB)
				for use with network management protocols. In particular it defines
				additional authentication protocols for the User-based
				Security   Model (USM) for  version 3 of the Simple Network Management
				Protocol (SNMPv3) specified in RFC 3414 <xref target="RFC3414"/>.</t>

			<t>In RFC 3414, two different authentication protocols, HMAC-MD5-96 and
				HMAC-SHA-96, are defined based on the hash functions MD5 and SHA-1,
				respectively. This memo specifies new optional HMAC-SHA-2 authentication
				protocols for USM using an
				HMAC based on the SHA-2 family of hash functions <xref target="SHA"/>
				and truncated to 128 bits for SHA-224 and SHA-256, to 192 bits for SHA-256,
				to 256 bits for SHA-384 and SHA-512, and to 384 bits for SHA-512.
				These protocols are straightforward adaptations of the authentication
				protocols HMAC-MD5-96 and HMAC-SHA-96 to the SHA-2 based HMAC.</t>

		</section>

		<section title="The Internet-Standard Management Framework">

			<t>For a detailed overview of the documents that describe the current
				Internet-Standard Management Framework, please refer to section 7 of RFC
				3410 <xref target="RFC3410"/>.</t>

			<t>Managed objects are accessed via a virtual information store, termed
				the Management Information Base or MIB. MIB objects are generally
				accessed through the Simple Network Management Protocol (SNMP). Objects
				in the MIB are defined using the mechanisms defined in the Structure of
				Management Information (SMI). This memo specifies a MIB module that is
				compliant to the SMIv2, which is described in STD 58, RFC 2578 <xref
						target="RFC2578">
				</xref>, STD 58, RFC 2579 <xref
						target="RFC2579">
				</xref> and STD 58, RFC 2580 <xref
						target="RFC2580">
				</xref>.</t>
		</section>

		<section title="Conventions">
			<t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
				"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
				document are to be interpreted as described in BCP 14, RFC 2119 <xref
						target="RFC2119">
				</xref>.</t>

		</section>

		<!-- ********************************************* -->


		<section anchor="protocol" title="The HMAC-SHA-2 Authentication Protocols">

			<t>This section describes the HMAC-SHA-2 authentication protocols. They
				use the SHA-2 hash functions, which are described in
				<xref target="SHA"/> and <xref target="RFC6234"/>,
				in HMAC mode described in <xref target="RFC2104"/> and
				<xref target="RFC6234"/>, truncating the output to 128
				bits for SHA-224 and SHA-256, 192 bits for SHA-256,
				256 bits for SHA-384 and SHA-512, and 384 bits for SHA-512.
				<xref target="RFC6234"/> also provides source code for all the
				SHA-2 algorithms and
				HMAC (without truncation). It also includes test harness and standard
				test vectors for all the defined hash functions and HMAC examples.</t>

			<t>The following protocols are defined:</t>
			<t>
				<list>
					<t>usmHMAC128SHA224AuthProtocol: uses SHA-224
						and truncates the output to 128 bits (16 octets);</t>
					<t>usmHMAC128SHA256AuthProtocol: uses SHA-256
						and truncates the output to 128 bits (16 octets);</t>
					<t>usmHMAC192SHA256AuthProtocol: uses SHA-256
						and truncates the output to 192 bits (24 octets);</t>
					<t>usmHMAC256SHA384AuthProtocol: uses SHA-384
						and truncates the output to 256 bits (32 octets);</t>
					<t>usmHMAC256SHA512AuthProtocol: uses SHA-512
						and truncates the output to 256 bits (32 octets);</t>
					<t>usmHMAC384SHA512AuthProtocol: uses SHA-512
						and truncates the output to 384 bits (48 octets).</t>
				</list>
			</t>

			<t>Implementations conforming to this specification MUST support usmHMAC192SHA256AuthProtocol
				and SHOULD support usmHMAC256SHA512AuthProtocol. All other protocols specified above are OPTIONAL.</t>

			<section anchor="differences" title="Deviations from the HMAC-SHA-96
				Authentication Protocol">

				<t>All the HMAC-SHA-2 authentication protocols are straightforward
					adaptations of the HMAC-MD5-96 and HMAC-SHA-96 authentication protocols.
					Precisely, they differ from the HMAC-MD5-96 and HMAC-SHA-96
					authentication protocols in the following aspects:</t>

				<t>
					<list style="symbols">
						<t> The SHA-2 hash function is used to compute the message digest in the
							HMAC computation according to <xref target="RFC2104"/>, as opposed to
							the MD5 hash function <xref target="RFC1321"/> and SHA-1 hash
							function <xref target="SHA"/> used in HMAC-MD5-96 and HMAC-SHA-96,
							respectively.

							Consequently, the length of the message digest prior to truncation
							is 224 bits for SHA-224 based protocol, 256 bits for SHA-256 based
							protocol, 384 bits for SHA-384 based protocol, and 512 bits
							for SHA-512 based protocol.</t>
						<t> The resulting message digest (output of HMAC) is truncated to
							<list>
								<t>16 octets for usm128HMACSHA224AuthProtocol and usmHMAC128SHA256AuthProtocol</t>
								<t>24 octets for usm192HMACSHA256AuthProtocol</t>
								<t>32 octets for usm256HMACSHA384AuthProtocol and usmHMAC256SHA512AuthProtocol</t>
								<t>48 octets for usm384HMACSHA512AuthProtocol</t>
							</list>
							as opposed to the truncation to 12 octets in HMAC-MD5-96 and HMAC-SHA-96.</t>
						<t>The user's secret key to be used when calculating a digest MUST be:
							<list>
								<t>28 octets long and derived with SHA-224 for the SHA-224 based protocol  usmHMAC128SHA224AuthProtocol</t>
								<t>32 octets long and derived with SHA-256 for the SHA-256 based protocols usmHMAC128SHA256AuthProtocol and usmHMAC192SHA256AuthProtocol</t>
								<t>48 octets long and derived with SHA-384 for the SHA-384 based protocol  usmHMAC256SHA384AuthProtocol</t>
								<t>64 octets long and derived with SHA-512 for the SHA-512 based protocols usmHMAC256SHA512AuthProtocol and usmHMAC384SHA512AuthProtocol</t>
							</list>
							as opposed to the keys being 16 and 20 octets long in
							HMAC-MD5-96 and HMAC-SHA-96, respectively. </t>
					</list>
				</t>

			</section>

			<section anchor="Procedure" title="Processing">

				<t>This section describes the procedures for the HMAC-SHA-2
					authentication protocols.
					The descriptions are based on the definition of services and data
					elements defined for HMAC-SHA-96 in RFC 3414 <xref target="RFC3414"/>
					with the deviations listed in <xref target="differences" />.</t>

				<section anchor="Procedure_Out" title="Processing an Outgoing Message">

					<t>Values of constants M (the length of the secret key) and N (the length of the MAC output) used below, are:
						<list>
							<t>usmHMAC128SHA224AuthProtocol: M=28, N=16;</t>
							<t>usmHMAC128SHA256AuthProtocol: M=32, N=16;</t>
							<t>usmHMAC192SHA256AuthProtocol: M=32, N=24;</t>
							<t>usmHMAC256SHA384AuthProtocol: M=48, N=32;</t>
							<t>usmHMAC256SHA512AuthProtocol: M=64, N=32;</t>
							<t>usmHMAC384SHA512AuthProtocol: M=64, N=48.</t>
						</list>
						correspondingly.
					</t>

					<t>This section describes the procedure followed by an SNMP engine
						whenever it must authenticate an outgoing message using one of the
						authentication protocols defined above. </t>

					<t>
						<list style="numbers">
							<t>The msgAuthenticationParameters field is set to serialization,
								according to the rules in <xref target="RFC3417"/>, of an
								OCTET STRING containing N zero octets.</t>

							<t>From the secret authKey of M octets, calculate the HMAC-SHA-2 digest
								over it according to HMAC <xref target="RFC6234"/>.
								Take the first N octets of the
								final digest - this is the Message Authentication Code (MAC).</t>

							<t>Replace the msgAuthenticationParameters field with the MAC obtained in
								the previous step.</t>

							<t>The authenticatedWholeMsg is then returned to the caller together
								with statusInformation indicating success.</t>
						</list>
					</t>
				</section>

				<section anchor="Procedure_In" title="Processing an Incoming Message">
					<t> Values of the constants M and N are the same as in
						<xref target="Procedure_Out"/>, and are selected based
						on which authentication protocol is configured for the given
						USM usmUserTable entry.</t>

					<t>This section describes the procedure followed by an SNMP engine
						whenever it must authenticate an incoming message using one of the
						HMAC-SHA-2 authentication protocols.</t>

					<t>
						<list style="format %d." counter="my_count">
							<t>If the digest received in the msgAuthenticationParameters field is
								not N octets long, then an failure and an errorIndication
								(authenticationError) is returned to the calling module.</t>

							<t>The MAC received in the msgAuthenticationParameters field is
								saved.</t>

							<t>The digest in the msgAuthenticationParameters field is replaced by
								the N zero octets.</t>

							<t>Using the secret authKey, the HMAC is calculated over the wholeMsg.</t>

							<t>N first octets of the above HMAC are taken as the computed MAC value.</t>

							<t>The msgAuthenticationParameters field is replaced with the MAC
								value that was saved in step 2.</t>

							<t>The newly calculated MAC is compared with the MAC saved in
								step 2.  If they do not match, then a failure and an
								errorIndication (authenticationFailure) are returned to the
								calling module.</t>

							<t>The authenticatedWholeMsg and statusInformation indicating success
								are then returned to the caller.</t>
						</list>
					</t>
				</section>
			</section>
		</section>

		<section title="Key Localization and Key Change">
			<t>For any of the protocols defined in <xref target='protocol' />, key localization 
				and key change SHALL be performed according	to RFC 3414 <xref target="RFC3414"/> 
				using the SHA-2 hash function applied in the respective protocol.</t>
		</section>

		<section title="Structure of the MIB Module">

			<t>The MIB module specified in this memo does not define any managed objects, subtrees, notifications or tables, but only 
				object identities (for authentication protocols) under a subtree of an existing MIB.</t>

		</section>

		<section title="Relationship to Other MIB Modules">
			<section title="Relationship to SNMP-USER-BASED-SM-MIB">
				<t>RFC 3414 <xref target="RFC3414"/> specifies the MIB for the User-based Security Model (USM) for SNMPv3 (SNMP-USER-BASED-SM-MIB), which defines 
					authentication protocols for USM based on the hash functions MD5 and SHA-1, respectively. The following MIB module defines new HMAC-SHA2 authentication protocols 
					for USM based on the SHA-2 hash functions <xref target="SHA"/>. The use of the HMAC-SHA2 authentication protocols requires the usage of the objects defined
					in the SNMP-USER-BASED-SM-MIB. </t>
			</section>

			<section title="Relationship to SNMP-FRAMEWORK-MIB">
				<t>RFC 3411 <xref target="RFC3411"/> specifies the The SNMP Management Architecture MIB (SNMP-FRAMEWORK-MIB), which defines 
					a subtree snmpAuthProtocols for SNMP authentication protocols. The following MIB module defines new authentication protocols in the snmpAuthProtocols subtree. 
					Therefore, the use of the HMAC-SHA2 authentication protocols requires the usage of the objects defined
					in the SNMP-FRAMEWORK-MIB. </t>
			</section>

			<section title="MIB modules required for IMPORTS">
				<t>The following MIB module IMPORTS objects from SNMPv2-SMI <xref target="RFC2578"/> and SNMP-FRAMEWORK-MIB <xref target="RFC3411"/>.</t>
			</section>
		</section>

		<section anchor="definitions" title="Definitions">

			<figure>
				<artwork>
					<![CDATA[

SNMP-USM-HMAC-SHA2-MIB DEFINITIONS ::= BEGIN
	IMPORTS
		MODULE-IDENTITY, OBJECT-IDENTITY,
	snmpModules             FROM SNMPv2-SMI          -- [RFC2578]
	snmpAuthProtocols       FROM SNMP-FRAMEWORK-MIB; -- [RFC3411]

snmpUsmHmacSha2MIB MODULE-IDENTITY
	LAST-UPDATED "201403060000Z"               -- 16 Jan 2014, midnight
	CONTACT-INFO "Johannes Merkle
				Secunet Security Networks
				Mergenthaler Allee 77
				65760 Eschborn
				Germany
				Phone: +49 201 5454 3091
				EMail: johannes.merkle@secunet.com

				Manfred Lochter
				Bundesamt fuer Sicherheit in der
				Informationstechnik (BSI)
				Postfach 200363
				53133 Bonn,
				Germany
				Phone: +49 228 9582 5643
				EMail: manfred.lochter@bsi.bund.de"

	DESCRIPTION  "Definitions of Object Identities needed
				for the use of the HMAC-SHA2 authentication protocols by SNMP's User-based
Security Model.

Copyright (C) The Internet Society (2004).

This version of this MIB module is part of RFC TBD;
see the RFC itself for full legal notices.
Supplementary information may be available on
http://www.ietf.org/copyrights/ianamib.html."

-- RFC Ed.: replace TBD with actual RFC number & remove this line
REVISION     "201403060000Z"
DESCRIPTION  "Initial version, published as RFC TBD"
-- RFC Ed.: replace TBD with actual RFC number & remove this line

::= { snmpModules nn }        -- nn to be assigned by IANA
-- RFC Ed.: replace nn with actual number assigned by IANA & remove this line

usmHmac128Sha224Protocol OBJECT-IDENTITY
STATUS        current
DESCRIPTION  "The HMAC-SHA-224-128 Authentication Protocol.
				Uses HMAC-SHA-224 and truncates output to 128 bits."
REFERENCE    "- Krawczyk, H., Bellare, M., and R. Canetti, HMAC:
				Keyed-Hashing for Message Authentication", RFC 2104.
- National Institute of Standards and Technology,
Secure Hash Standard (SHS), FIPS PUB 180-4, 2012."
	::= { snmpAuthProtocols aa }  -- aa to be assigned by IANA
	-- RFC Ed.: replace aa with actual number assigned by IANA & remove this line

usmHmac128Sha256Protocol OBJECT-IDENTITY
	STATUS        current
	DESCRIPTION  "The HMAC-SHA-256-128 Authentication Protocol.
Uses HMAC-SHA-256 and truncates output to 128 bits."
	REFERENCE    "- Krawczyk, H., Bellare, M., and R. Canetti, HMAC:
Keyed-Hashing for Message Authentication", RFC 2104.

				- National Institute of Standards and Technology,
				Secure Hash Standard (SHS), FIPS PUB 180-4, 2012."
::= { snmpAuthProtocols bb }  -- bb to be assigned by IANA
-- RFC Ed.: replace bb with actual number assigned by IANA & remove this line

usmHmac192Sha256Protocol OBJECT-IDENTITY
STATUS        current
DESCRIPTION  "The HMAC-SHA-256-192 Authentication Protocol.
				Uses HMAC-SHA-256 and truncates output to 192 bits."
REFERENCE    "- Krawczyk, H., Bellare, M., and R. Canetti, HMAC:
				Keyed-Hashing for Message Authentication", RFC 2104.

- National Institute of Standards and Technology,
Secure Hash Standard (SHS), FIPS PUB 180-4, 2012."
	::= { snmpAuthProtocols cc }  -- cc to be assigned by IANA
	-- RFC Ed.: replace cc with actual number assigned by IANA & remove this line

usmHmac256Sha384Protocol OBJECT-IDENTITY
	STATUS        current
	DESCRIPTION  "The HMAC-SHA-384-256 Authentication Protocol.
Uses HMAC-SHA-384 and truncates output to 256 bits."
	REFERENCE    "- Krawczyk, H., Bellare, M., and R. Canetti, HMAC:
Keyed-Hashing for Message Authentication", RFC 2104.
				- National Institute of Standards and Technology,
				Secure Hash Standard (SHS), FIPS PUB 180-4, 2012."
::= { snmpAuthProtocols dd }  -- dd to be assigned by IANA
-- RFC Ed.: replace dd with actual number assigned by IANA & remove this line

usmHmac256Sha512Protocol OBJECT-IDENTITY
STATUS        current
DESCRIPTION  "The HMAC-SHA-512-256 Authentication Protocol.
				Uses HMAC-SHA-512 and truncates output to 256 bits."
REFERENCE    "- Krawczyk, H., Bellare, M., and R. Canetti, HMAC:
				Keyed-Hashing for Message Authentication", RFC 2104.
- National Institute of Standards and Technology,
Secure Hash Standard (SHS), FIPS PUB 180-4, 2012."
	::= { snmpAuthProtocols ee }  -- ee to be assigned by IANA
	-- RFC Ed.: replace ee with actual number assigned by IANA & remove this line

usmHmac384Sha512Protocol OBJECT-IDENTITY
	STATUS        current
	DESCRIPTION  "The HMAC-SHA-512-384 Authentication Protocol.
Uses HMAC-SHA-512 and truncates output to 384 bits."
	REFERENCE    "- Krawczyk, H., Bellare, M., and R. Canetti, HMAC:
Keyed-Hashing for Message Authentication", RFC 2104.
				- National Institute of Standards and Technology,
				Secure Hash Standard (SHS), FIPS PUB 180-4, 2012."
::= { snmpAuthProtocols ff }  -- ff to be assigned by IANA
-- RFC Ed.: replace ff with actual number assigned by IANA & remove this line

END



]]>
				</artwork>
			</figure>
		</section>


		<section title="Security Considerations">
			<section title="Use of the HMAC-SHA-2 authentication protocols in USM">

				<t>The security considerations of  <xref target="RFC3414"/> also apply
					the use of all the HMAC-SHA-2 authentication protocols in USM.</t>
			</section>
			<section title="Cryptographic strength of the authentication protocols">

				<t>At the time of this writing, all of the HMAC-SHA-2 authentication protocols provide a
					very high level of security.
					The security of each HMAC-SHA-2 authentication protocol depends on the parameters
					used in the corresponding HMAC computation, which are the length of the key, the size of the
					hash function's internal state, and the length of the truncated MAC. For the HMAC-SHA-2
					authentication protocols these values are as follows (values are given in bits). </t>

				<texttable anchor='Parameters' title='HMAC parameters of the HMAC-SHA-2 authentication protocols'>
					<preamble/>

					<ttcol align='center'>Protocol</ttcol>
					<ttcol align='center'>Key length</ttcol>
					<ttcol align='center'>Size of internal state</ttcol>
					<ttcol align='center'>MAC length</ttcol>

					<c>usmHMAC128SHA224AuthProtocol</c>
					<c>224</c>
					<c>256</c>
					<c>128</c>

					<c>usmHMAC128SHA256AuthProtocol</c>
					<c>256</c>
					<c>256</c>
					<c>128</c>

					<c>usmHMAC192SHA256AuthProtocol</c>
					<c>256</c>
					<c>256</c>
					<c>192</c>

					<c>usmHMAC256SHA384AuthProtocol</c>
					<c>384</c>
					<c>512</c>
					<c>256</c>

					<c>usmHMAC256SHA512AuthProtocol</c>
					<c>512</c>
					<c>512</c>
					<c>256</c>

					<c>usmHMAC384SHA512AuthProtocol</c>
					<c>512</c>
					<c>512</c>
					<c>384</c>

					<postamble/>
				</texttable>

				<t>The security of the HMAC scales with both the key length and the size of the
					internal state: longer keys render key guessing attacks more difficult,
					and a larger internal state decreases the success probability of MAC
					forgeries based on internal collisions of the hash function.</t>

				<t>The role of the truncated output length is more complicated:
					according to <xref target="BCK"/>, there is a trade-off in that
					"by outputting less bits the attacker has less bits to
					predict in a MAC forgery but, on the other hand, the attacker also learns less about
					the output of the compression function from seeing the authentication tags computed
					by legitimate parties"; thus, truncation weakens the HMAC against forgery
					by guessing, but at the same time strengthens it against chosen message attacks
					aiming at MAC forgery based on internal collisions or at key guessing.
					<xref target="RFC2104"/> and <xref target="BCK"/> allow truncation
					to any length that is not less than half the size of the internal state. In order to
					provide some flexibility in the case of future results on optimal HMAC truncation,
					this specification provides multiple choices.</t>

				<t>Further discussion of the security of the HMAC construction is given
					in <xref target="RFC2104"/>.</t>
			</section>
			<section title="Derivation of keys from passwords">
				<t> If secret keys to be used for HMAC-SHA-2 authentication protocols are derived from 
					passwords, the derivation SHOULD be performed using the password-to-key algorithm 
					from Appendix A.1 of RFC 3414 with MD5 being replaced by the SHA-2 hash function H
					used in the HMAC-SHA-2 authentication protocol. Specifically, the password is converted 
					into the required secret key by the following steps: </t>
				<t><list style="symbols"> 
					<t>forming a string of length 1,048,576 octets by repeating the
						value of the password as often as necessary, truncating
						accordingly, and using the resulting string as the input to the
						hash function H. The resulting digest, termed "digest1", is used in the next step.</t>
					<t>a second string is formed by concatenating digest1, the SNMP
						engine's snmpEngineID value, and digest1.  This string is used
						as input to the hash function H.</t>
				</list></t>

			</section>
			<section title="Access to the SNMP-USM-HMAC-SHA2-MIB">

				<t>None of the objects defined in SNMP-USM-HMAC-SHA2-MIB is writable, 
					and the information they represent is
					not deemed to be particularly sensitive.  However, if they are deemed
					sensitive in a particular environment, access to them should be
					restricted through the use of appropriately configured Security and
					Access Control models.</t>	
			</section>
		</section>

		<section title="IANA Considerations">
			<t>IANA is requested to assign an OID for</t>
			<texttable anchor='OID-MIB' title='OID of MIB'>
				<preamble/>
				<ttcol align='center'>Descriptor</ttcol>
				<ttcol align='center'>OBJECT IDENTIFIER value</ttcol>
				<c>snmpUsmHmacSha2MIB</c>
				<c>{ snmpModules nn }</c>
				<postamble/>
			</texttable>
			<t>with nn appearing in the MIB module definition in <xref target='definitions'/>. </t>


			<t>Furthermore, IANA is requested to assign a value in the SnmpAuthProtocols registry
				for each of the following protocols.</t>
			<texttable anchor='OID-Protocols' title='Code points assigned to HMAC-SHA-2 authentication protocols'>
				<preamble/>

				<ttcol align='center'>Description</ttcol>
				<ttcol align='center'>Value</ttcol>
				<ttcol align='center'>Reference</ttcol>

				<c>usmHMAC128SHA224AuthProtocol</c>
				<c>aa</c>
				<c>RFC YYYY</c>

				<c>usmHMAC128SHA256AuthProtocol</c>
				<c>bb</c>
				<c>RFC YYYY</c>

				<c>usmHMAC192SHA256AuthProtocol</c>
				<c>cc</c>
				<c>RFC YYYY</c>

				<c>usmHMAC256SHA384AuthProtocol</c>
				<c>dd</c>
				<c>RFC YYYY</c>

				<c>usmHMAC256SHA512AuthProtocol</c>
				<c>ee</c>
				<c>RFC YYYY</c>

				<c>usmHMAC384SHA512AuthProtocol</c>
				<c>ff</c>
				<c>RFC YYYY</c>

				<postamble/>
			</texttable>

			<t> -- RFC Ed.: replace YYYY with actual RFC number and remove this line</t>
			<t>with aa, bb, cc, etc. appearing in the MIB module definition in <xref target='definitions'/>.</t>

		</section>


	</middle>

	<back>



		<references title="Normative References">


			<reference anchor='RFC2104'>
				<front>
					<title abbrev='HMAC'>HMAC: Keyed-Hashing for Message Authentication</title>
					<author initials='H.' surname='Krawczyk' fullname='Hugo Krawczyk'>
						<organization>IBM, T.J. Watson Research Center</organization>
						<address>
							<postal>
								<street>P.O.Box 704</street>
								<city>Yorktown Heights</city>
								<region>NY</region>
								<code>10598</code>
								<country>US</country>
							</postal>
							<email>hugo@watson.ibm.com</email>
						</address>
					</author>
					<author initials='M.' surname='Bellare' fullname='Mihir Bellare'>
						<organization>University of California at San Diego, Dept of Computer Science and Engineering</organization>
						<address>
							<postal>
								<street>9500 Gilman Drive</street>
								<street>Mail Code 0114</street>
								<city>La Jolla</city>
								<region>CA</region>
								<code>92093</code>
								<country>US</country>
							</postal>
							<email>mihir@cs.ucsd.edu</email>
						</address>
					</author>
					<author initials='R.' surname='Canetti' fullname='Ran Canetti'>
						<organization>IBM T.J. Watson Research Center</organization>
						<address>
							<postal>
								<street>P.O.Box 704</street>
								<city>Yorktown Heights</city>
								<region>NY</region>
								<code>10598</code>
								<country>US</country>
							</postal>
							<email>canetti@watson.ibm.com</email>
						</address>
					</author>
					<date year='1997' month='February' />
				</front>
				<seriesInfo name='RFC' value='2104' />
				<format type='TXT' octets='22297' target='http://www.rfc-editor.org/rfc/rfc2104.txt' />
			</reference>


			<reference anchor='RFC2119'>
				<front>
					<title>Key words for use in RFCs to Indicate Requirement Levels</title>
					<author initials='S.' surname='Bradner' fullname='Scott Bradner'>
						<organization>Harvard University</organization>
					</author>
					<date year='1997' month='March' />
				</front>
				<seriesInfo name='BCP' value='14' />
				<seriesInfo name='RFC' value='2119' />
			</reference>


			<reference anchor='RFC2578'>
				<front>
					<title abbrev='SMIv2'>Structure of Management Information Version 2 (SMIv2)</title>
					<author initials='K.' surname='McCloghrie' fullname='Keith McCloghrie' role='editor'>
						<organization>Cisco Systems, Inc.</organization>
						<address>
							<postal>
								<street>170 West Tasman Drive</street>
								<city>San Jose</city>
								<region>CA</region>
								<code>95134-1706</code>
								<country>US</country>
							</postal>
							<phone>+1 408 526 5260</phone>
							<email>kzm@cisco.com</email>
						</address>
					</author>
					<author initials='D.' surname='Perkins' fullname='David Perkins' role='editor'>
						<organization>SNMPinfo</organization>
						<address>
							<postal>
								<street>3763 Benton Street</street>
								<city>Santa Clara</city>
								<region>CA</region>
								<code>95051</code>
								<country>US</country>
							</postal>
							<phone>+1 408 221 8702</phone>
							<email>dperkins@snmpinfo.com</email>
						</address>
					</author>
					<author initials='J.' surname='Schoenwaelder' fullname='Juergen Schoenwaelder' role='editor'>
						<organization>TU Braunschweig</organization>
						<address>
							<postal>
								<street>Bueltenweg 74/75</street>
								<street>38106 Braunschweig</street>
								<country>DE</country>
							</postal>
							<phone>+49 531 3913283</phone>
							<email>schoenw@ibr.cs.tu-bs.de</email>
						</address>
					</author>
					<date year='1999' month='April' />
				</front>

				<seriesInfo name='STD' value='58' />
				<seriesInfo name='RFC' value='2578' />
				<format type='TXT' octets='89712' target='http://www.rfc-editor.org/rfc/rfc2578.txt' />
			</reference>


			<reference anchor='RFC2579'>
				<front>
					<title>Textual Conventions for SMIv2</title>
					<author initials='K.' surname='McCloghrie' fullname='Keith McCloghrie' role='editor'>
						<organization>Cisco Systems, Inc.</organization>
						<address>
							<postal>
								<street>170 West Tasman Drive</street>
								<city>San Jose</city>
								<region>CA</region>
								<code>95134-1706</code>
								<country>US</country>
							</postal>
							<phone>+1 408 526 5260</phone>
							<email>kzm@cisco.com</email>
						</address>
					</author>
					<author initials='D.' surname='Perkins' fullname='David Perkins' role='editor'>
						<organization>SNMPinfo</organization>
						<address>
							<postal>
								<street>3763 Benton Street</street>
								<city>Santa Clara</city>
								<region>CA</region>
								<code>95051</code>
								<country>US</country>
							</postal>
							<phone>+1 408 221 8702</phone>
							<email>dperkins@snmpinfo.com</email>
						</address>
					</author>
					<author initials='J.' surname='Schoenwaelder' fullname='Juergen Schoenwaelder' role='editor'>
						<organization>TU Braunschweig</organization>
						<address>
							<postal>
								<street>Bueltenweg 74/75</street>
								<street>38106 Braunschweig</street>
								<country>DE</country>
							</postal>
							<phone>+49 531 3913283</phone>
							<email>schoenw@ibr.cs.tu-bs.de</email>
						</address>
					</author>
					<date year='1999' month='April' />
				</front>
				<seriesInfo name='STD' value='58' />
				<seriesInfo name='RFC' value='2579' />
				<format type='TXT' octets='59039' target='http://www.rfc-editor.org/rfc/rfc2579.txt' />
			</reference>

			<reference anchor='RFC2580'>
				<front>
					<title>Conformance Statements for SMIv2</title>
					<author initials='K.' surname='McCloghrie' fullname='Keith McCloghrie'>
						<organization>Cisco Systems, Inc.</organization>
						<address>
							<postal>
								<street>170 West Tasman Drive</street>
								<city>San Jose</city>
								<region>CA</region>
								<code>95134-1706</code>
								<country>US</country>
							</postal>
							<phone>+1 408 526 5260</phone>
							<email>kzm@cisco.com</email>
						</address>
					</author>
					<author initials='D.' surname='Perkins' fullname='David Perkins'>
						<organization>SNMPinfo</organization>
						<address>
							<postal>
								<street>3763 Benton Street</street>
								<city>Santa Clara</city>
								<region>CA</region>
								<code>95051</code>
								<country>US</country>
							</postal>
							<phone>+1 408 221 8702</phone>
							<email>dperkins@snmpinfo.com</email>
						</address>
					</author>
					<author initials='J.' surname='Schoenwaelder' fullname='Juergen Schoenwaelder'>
						<organization>TU Braunschweig</organization>
						<address>
							<postal>
								<street>Bueltenweg 74/75</street>
								<city>Braunschweig</city>
								<code>38106</code>
								<country>DE</country>
							</postal>
							<phone>+49 531 3913283</phone>
							<email>schoenw@ibr.cs.tu-bs.de</email>
						</address>
					</author>
					<date year='1999' month='April' />
				</front>

				<seriesInfo name='STD' value='58' />
				<seriesInfo name='RFC' value='2580' />
				<format type='TXT' octets='54253' target='http://www.rfc-editor.org/rfc/rfc2580.txt' />
			</reference>



			<reference anchor='RFC3414'>
				<front>
					<title>User-based Security Model (USM) for version 3 of the Simple Network Management Protocol (SNMPv3)</title>
					<author initials='U.' surname='Blumenthal' fullname='U. Blumenthal'>
						<organization />
					</author>
					<author initials='B.' surname='Wijnen' fullname='B. Wijnen'>
						<organization />
					</author>
					<date year='2002' month='December' />
				</front>
				<seriesInfo name='STD' value='62' />
				<seriesInfo name='RFC' value='3414' />
				<format type='TXT' octets='193558' target='http://www.rfc-editor.org/rfc/rfc3414.txt' />
			</reference>


			<reference anchor="SHA">
				<front>
					<title>Secure Hash Standard (SHS)</title>
					<author>
						<organization>National Institute of Standards and Technology</organization>
					</author>
					<date month="March" year="2012" />
				</front>
				<seriesInfo name="FIPS" value="PUB 180-4" />
			</reference>

		</references>


		<!--  ****************************************************************************
************************************************************************************
-->


		<references title="Informative References">



			<reference anchor='RFC1321'>

				<front>
					<title abbrev='MD5 Message-Digest Algorithm'>The MD5 Message-Digest Algorithm</title>
					<author initials='R.' surname='Rivest' fullname='Ronald L. Rivest'>
						<organization>Massachusetts Institute of Technology, (MIT) Laboratory for Computer Science</organization>
						<address>
							<postal>
								<street>545 Technology Square</street>
								<street>NE43-324</street>
								<city>Cambridge</city>
								<region>MA</region>
								<code>02139-1986</code>
								<country>US</country>
							</postal>
							<phone>+1 617 253 5880</phone>
							<email>rivest@theory.lcs.mit.edu</email>
						</address>
					</author>
					<date year='1992' month='April' />
				</front>

				<seriesInfo name='RFC' value='1321' />
				<format type='TXT' octets='35222' target='http://www.rfc-editor.org/rfc/rfc1321.txt' />
			</reference>


			<reference anchor='RFC2898'>
				<front>
					<title>PKCS #5: Password-Based Cryptography Specification Version 2.0</title>
					<author initials='B.' surname='Kaliski' fullname='B. Kaliski'>
						<organization />
					</author>
					<date year='2000' month='September' />
					<abstract>
						<t>This document provides recommendations for the implementation of password-based cryptography, covering key derivation functions, encryption schemes, message-authentication schemes, and ASN.1 syntax identifying the techniques.  This memo provides information for the Internet community.</t>
					</abstract>
				</front>

				<seriesInfo name='RFC' value='2898' />
				<format type='TXT' octets='68692' target='http://www.rfc-editor.org/rfc/rfc2898.txt' />
			</reference>



			<reference anchor='RFC3410'>

				<front>
					<title>Introduction and Applicability Statements for Internet-Standard Management Framework</title>
					<author initials='J.' surname='Case' fullname='J. Case'>
						<organization />
					</author>
					<author initials='R.' surname='Mundy' fullname='R. Mundy'>
						<organization />
					</author>
					<author initials='D.' surname='Partain' fullname='D. Partain'>
						<organization />
					</author>
					<author initials='B.' surname='Stewart' fullname='B. Stewart'>
						<organization />
					</author>
					<date year='2002' month='December' />
				</front>

				<seriesInfo name='RFC' value='3410' />
				<format type='TXT' octets='61461' target='http://www.rfc-editor.org/rfc/rfc3410.txt' />
			</reference>



			<reference anchor='RFC3411'>
				<front>
					<title>An Architecture for Describing Simple Network Management Protocol (SNMP) Management Frameworks</title>
					<author initials='D.' surname='Harrington' fullname='D. Harrington'>
						<organization />
					</author>
					<author initials='R.' surname='Presuhn' fullname='R. Presuhn'>
						<organization />
					</author>
					<author initials='B.' surname='Wijnen' fullname='B. Wijnen'>
						<organization />
					</author>
					<date year='2002' month='December' />
				</front>

				<seriesInfo name='STD' value='62' />
				<seriesInfo name='RFC' value='3411' />
				<format type='TXT' octets='140096' target='http://www.rfc-editor.org/rfc/rfc3411.txt' />
			</reference>

			<reference anchor='RFC3412'>
				<front>
					<title>Message Processing and Dispatching for the Simple Network Management Protocol (SNMP)</title>
					<author initials='J.' surname='Case' fullname='J. Case'>
						<organization />
					</author>
					<author initials='D.' surname='Harrington' fullname='D. Harrington'>
						<organization />
					</author>
					<author initials='R.' surname='Presuhn' fullname='R. Presuhn'>
						<organization />
					</author>
					<author initials='B.' surname='Wijnen' fullname='B. Wijnen'>
						<organization />
					</author>
					<date year='2002' month='December' />
				</front>
				<seriesInfo name='STD' value='62' />
				<seriesInfo name='RFC' value='3412' />
				<format type='TXT' octets='95710' target='http://www.rfc-editor.org/rfc/rfc3412.txt' />
			</reference>

			<reference anchor='RFC3417'>

				<front>
					<title>Transport Mappings for the Simple Network Management Protocol (SNMP)</title>
					<author initials='R.' surname='Presuhn' fullname='R. Presuhn'>
						<organization />
					</author>
					<date year='2002' month='December' />
				</front>
				<seriesInfo name='STD' value='62' />
				<seriesInfo name='RFC' value='3417' />
				<format type='TXT' octets='38650' target='http://www.rfc-editor.org/rfc/rfc3417.txt' />
			</reference>


			<reference anchor='RFC4231'>
				<front>
					<title>Identifiers and Test Vectors for HMAC-SHA-224, HMAC-SHA-256, HMAC-SHA-384,
						and HMAC-SHA-512</title>
					<author initials='M.' surname='Nystrom' fullname='M. Nystrom'>
						<organization />
					</author>
					<date year='2005' month='December' />
				</front>
				<seriesInfo name='RFC' value='4231' />
				<format type='TXT' octets='17725' target='http://www.rfc-editor.org/rfc/rfc4231.txt' />
			</reference>

			<!--
<reference anchor='RFC4634'>
<front>
<title>US Secure Hash Algorithms (SHA and HMAC-SHA)</title>
<author initials='D.' surname='Eastlake' fullname='D. Eastlake'>
<organization /></author>
<author initials='T.' surname='Hansen' fullname='T. Hansen'>
<organization /></author>
<date year='2006' month='July' />
<abstract>
<t>The United States of America has adopted a suite of Secure Hash Algorithms (SHAs),
including four beyond SHA-1, as part of a Federal Information Processing Standard
(FIPS), specifically SHA-224 (RFC 3874), SHA-256, SHA-384, and SHA-512.
The purpose of this document is to make source code performing these hash
functions conveniently available to the Internet community. The sample code supports
input strings of arbitrary bit length. SHA-1's sample code from RFC 3174 has also
been updated to handle input strings of arbitrary bit length. Most of the text
herein was adapted by the authors from FIPS 180-2.
Code to perform SHA-based HMACs, with arbitrary bit length text, is also included.
This memo provides information for the Internet community.</t></abstract></front>
<seriesInfo name='RFC' value='4634' />
<format type='TXT' octets='197147' target='http://www.rfc-editor.org/rfc/rfc4634.txt' />
</reference>


<reference anchor='RFC4868'>
<front>
<title>Using HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512 with IPsec</title>
<author initials='S.' surname='Kelly' fullname='S. Kelly'>
<organization /></author>
<author initials='S.' surname='Frankel' fullname='S. Frankel'>
<organization /></author>
<date year='2007' month='May' />
<abstract>
<t>This specification describes the use of Hashed Message Authentication Mode (HMAC) in
conjunction with the SHA-256, SHA-384, and SHA-512 algorithms in IPsec.
These algorithms may be used as the basis for data origin authentication and integrity
verification mechanisms for the Authentication Header (AH), Encapsulating Security
Payload (ESP), Internet Key Exchange Protocol (IKE), and IKEv2 protocols, and also
as Pseudo-Random Functions (PRFs) for IKE and IKEv2.  Truncated output lengths
are specified for the authentication-related variants, with the corresponding
algorithms designated as HMAC-SHA-256-128, HMAC-SHA-384-192, and HMAC-SHA-512-256.
The PRF variants are not truncated, and are called PRF-HMAC-SHA-256, PRF-HMAC-SHA-384,
and PRF-HMAC-SHA-512. [STANDARDS-TRACK]</t></abstract></front>
<seriesInfo name='RFC' value='4868' />
<format type='TXT' octets='41432' target='http://www.rfc-editor.org/rfc/rfc4868.txt' />
</reference>

-->




			<reference anchor='RFC6234'>
				<front>
					<title>US Secure Hash Algorithms
						(SHA and SHA-based HMAC and HKDF)</title>
					<author initials='D.' surname='Eastlate 3rd' fullname='D. Eastlake 3rd'>
						<organization>Hoawei</organization>
					</author>
					<author initials='T.' surname='Hansen' fullname='T. Hansen'>
						<organization>AT&amp;T Labs</organization>
					</author>
					<date year='2011' month='May' />
				</front>
				<seriesInfo name='RFC' value="6234" />
				<format type="TXT" octets="23653" target="http://tools.ietf.org/rfc/rfc6234.txt" />
			</reference>


			<!--
<reference anchor='RFC6151'>
<front>
<title>Updated Security Considerations for the MD5 Message-Digest and the HMAC-MD5 Algorithms</title>
<author initials='S.' surname='Turner' fullname='S. Turner'>
<organization /></author>
<author initials='L.' surname='Chen' fullname='L. Chen'>
<organization /></author>
<date year='2011' month='March' />
<abstract>
<t>This document updates the security considerations for the MD5 message digest algorithm.
It also updates the security considerations for HMAC-MD5.  This document is not an
Internet Standards Track specification; it is published for informational
purposes.</t></abstract></front>
<seriesInfo name='RFC' value='6151' />
<format type='TXT' octets='14662' target='http://www.rfc-editor.org/rfc/rfc6151.txt' />
</reference>

<reference anchor="NIST">
<front>
<title>Recommendation for Applications Using Approved Hash Algorithms</title>
<author>
<organization>National Institute of Standards and Technology</organization>
</author>
<date month="August" year="2012" />
</front>
<seriesInfo name="NIST Special Publication" value="800-107 Revision 1" />
</reference>

<reference anchor="PV">
<front>
<title>Building Fast MACs From Hash Functions</title>
<author initials="B" surname="Preneel">
<organization></organization>
</author>
<author initials="P" surname="van Oorschot">
<organization></organization>
</author>
<date year="1995" />
</front>
<seriesInfo name="Advances in Cryptology - CRYPTO" value="95" />
<seriesInfo name="Lecture Notes in Computer Science" value="963" />
<seriesInfo name="Springer" value="Verlag" />
</reference>
-->



			<reference anchor="BCK">
				<front>
					<title>Keyed Hash Functions for Message Authentication</title>
					<author initials="M" surname="Bellare">
						<organization/>
					</author>
					<author initials="R" surname="Canetti">
						<organization/>
					</author>
					<author initials="H" surname="Krawczyk">
						<organization/>
					</author>
					<date year="1996" />
				</front>
				<seriesInfo name="Advances in Cryptology - CRYPTO" value="99" />
				<seriesInfo name="Lecture Notes in Computer Science" value="1109" />
				<seriesInfo name="Springer" value="Verlag" />
			</reference>

		</references>


		<!--
<section anchor="appendix" title="Appendix A">
<t>You can add appendices just as regular sections, the only
difference is that they go under "back" element, and get letters
instead of numbers</t>
</section>
-->



		<!--
$Id: mib-doc-template.xml,v 1.5 2008/04/08 17:39:56 H73653 Exp $

-->
	</back>
</rfc>
