OPSAWG | J. Merkle, Ed. |
Internet-Draft | Secunet Security Networks |
Obsoletes: 7630 (if approved) | M. Lochter |
Intended status: Standards Track | BSI |
Expires: April 23, 2016 | October 21, 2015 |
HMAC-SHA-2 Authentication Protocols in USM for SNMPv3
draft-ietf-opsawg-hmac-sha-2-usm-snmp-new-01
This memo specifies new HMAC-SHA-2 authentication protocols for the User-based Security Model (USM) for SNMPv3 defined in RFC 3414.
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on April 23, 2016.
Copyright (c) 2015 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
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 the Simple Network Management Protocol version 3 (SNMPv3) specified in RFC 3414 [RFC3414].
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 HMAC-SHA-2 authentication protocols for USM using a Hashed Message Authentication Code (HMAC) based on the SHA-2 family of hash functions [SHA] and truncated to 128 bits for SHA-224, to 192 bits for SHA-256, to 256 bits for SHA‑384, 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.
This document obsoletes RFC 7630, in which the MIB MODULE-IDENTITY value was incorrectly specified.
For a detailed overview of the documents that describe the current Internet-Standard Management Framework, please refer to section 7 of RFC 3410 [RFC3410].
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 [RFC2578], STD 58, RFC 2579 [RFC2579] and STD 58, RFC 2580 [RFC2580].
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 [RFC2119].
This section describes the HMAC-SHA-2 authentication protocols, which use the SHA-2 hash functions (described in FIPS PUB 180-4 [SHA] and RFC 6234 [RFC6234]) in the HMAC mode (described in RFC 2104 [RFC2104] and RFC 6234), truncating the output to 128 bits for SHA-224, 192 bits for SHA-256, 256 bits for SHA-384, and 384 bits for SHA-512. RFC 6234 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.
The following protocols are defined:
Implementations conforming to this specification MUST support usmHMAC192SHA256AuthProtocol and SHOULD support usmHMAC384SHA512AuthProtocol. The protocols usmHMAC128SHA224AuthProtocol and usmHMAC256SHA384AuthProtocol are OPTIONAL.
All the HMAC-SHA-2 authentication protocols are straightforward adaptations of the HMAC-MD5-96 and HMAC-SHA-96 authentication protocols. Specifically, they differ from the HMAC-MD5-96 and HMAC-SHA-96 authentication protocols in the following aspects:
as opposed to the truncation to 12 octets in HMAC-MD5-96 and HMAC-SHA-96.
as opposed to the keys being 16 and 20 octets long in HMAC-MD5-96 and HMAC-SHA-96, respectively.
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 with the deviations listed in Section 4.1.
Values of constants M (the length of the secret key in octets) and N (the length of the Message Authentication Code (MAC) output in octets), and the hash function H used below are:
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. Values of the constants M and N, and the hash function H are as defined in Section 4.2 and are selected based on which authentication protocol is configured for the given USM usmUser Table entry.
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. Values of the constants M and N, and the hash function H are as defined in Section 4.2 and are selected based on which authentication protocol is configured for the given USM usmUser Table entry.
For any of the protocols defined in Section 4, key localization and key change SHALL be performed according to RFC 3414 [RFC3414] using the same SHA-2 hash function as in the HMAC-SHA-2 authentication protocol.
The MIB module specified in this memo does not define any managed objects, subtrees, notifications, or tables; rather, it only defines object identities (for authentication protocols) under a subtree of an existing MIB.
RFC 3414 specifies the MIB module for 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 [SHA]. The use of the HMAC-SHA2 authentication protocols requires the usage of the objects defined in the SNMP-USER-BASED-SM-MIB.
RFC 3411 [RFC3411] specifies the SNMP-FRAMEWORK-MIB, which defines a subtree snmpAuthProtocols for SNMP authentication protocols. The following MIB module defines new authentication protocols in the snmpAuthProtocols subtree.
The following MIB module IMPORTS definitions from SNMPv2-SMI [RFC2578] and SNMP-FRAMEWORK-MIB [RFC3411].
SNMP-USM-HMAC-SHA2-MIB DEFINITIONS ::= BEGIN IMPORTS MODULE-IDENTITY, OBJECT-IDENTITY, mib-2 FROM SNMPv2-SMI -- [RFC2578] snmpAuthProtocols FROM SNMP-FRAMEWORK-MIB; -- [RFC3411] snmpUsmHmacSha2MIB MODULE-IDENTITY LAST-UPDATED "201510210000Z" -- 21 October 2015, midnight ORGANIZATION "SNMPv3 Working Group" CONTACT-INFO "WG email: OPSAWG@ietf.org Subscribe: https://www.ietf.org/mailman/listinfo/opsawg Editor: Johannes Merkle secunet Security Networks Postal: Mergenthaler Allee 77 D-65760 Eschborn Germany Phone: +49 20154543091 Email: johannes.merkle@secunet.com Co-Editor: Manfred Lochter Bundesamt fuer Sicherheit in der Informationstechnik (BSI) Postal: Postfach 200363 D-53133 Bonn Germany Phone: +49 228 9582 5643 Email: manfred.lochter@bsi.bund.de" DESCRIPTION "Definitions of Object Identities needed for the use of HMAC-SHA2 by SNMP's User-based Security Model. Copyright (c) 2015 IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Simplified BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info)." REVISION "201510210000Z" -- 21 October 2015, midnight DESCRIPTION "Version correcting the MODULE-IDENTITY value, published as RFC TBD" -- RFC Ed.: replace TBD with actual RFC number & remove this line REVISION "201508130000Z" -- 13 August 2015, midnight DESCRIPTION "Initial version, published as RFC 7630" ::= { mib-2 235 } usmHMAC128SHA224AuthProtocol OBJECT-IDENTITY STATUS current DESCRIPTION "The Authentication Protocol usmHMAC128SHA224AuthProtocol 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 4 } usmHMAC192SHA256AuthProtocol OBJECT-IDENTITY STATUS current DESCRIPTION "The Authentication Protocol usmHMAC192SHA256AuthProtocol 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 5 } usmHMAC256SHA384AuthProtocol OBJECT-IDENTITY STATUS current DESCRIPTION "The Authentication Protocol usmHMAC256SHA384AuthProtocol 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 6 } usmHMAC384SHA512AuthProtocol OBJECT-IDENTITY STATUS current DESCRIPTION "The Authentication Protocol usmHMAC384SHA512AuthProtocol 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 7 } END
The security considerations of RFC 3414 [RFC3414] also apply to the HMAC-SHA-2 authentication protocols defined in this document.
At the time of publication of this document, 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 (if the key has maximum entropy), 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).
Protocol | Key length | Size of internal state | MAC length |
---|---|---|---|
usmHMAC128SHA224AuthProtocol | 224 | 256 | 128 |
usmHMAC192SHA256AuthProtocol | 256 | 256 | 192 |
usmHMAC256SHA384AuthProtocol | 384 | 512 | 256 |
usmHMAC384SHA512AuthProtocol | 512 | 512 | 384 |
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.
The role of the truncated output length is more complicated: according to [BCK], there is a trade-off in that
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. RFC 2104 and [BCK] allow truncation to any length that is not less than half the size of the internal state.
Further discussion of the security of the HMAC construction is given in RFC 2104.
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:
The SNMP-USM-HMAC-SHA2-MIB module defines OBJECT IDENTIFIER values for use in other MIB modules. It does not define any objects that can be accessed. As such, the SNMP-USM-HMAC-SHA2-MIB does not, by itself, have any effect on the security of the Internet.
The values defined in this module are expected to be used with the usmUserTable defined in the SNMP-USER-BASED-SM-MIB [RFC3414]. The considerations in Section 11.5 of RFC 3414 should be taken into account.
IANA has assigned an OID for the MIB as follows.
Descriptor | OBJECT IDENTIFIER value |
---|---|
snmpUsmHmacSha2MIB | { mib-2 235 } |
Furthermore, IANA has assigned a value in the SnmpAuthProtocols registry for each of the following protocols.
Description | Value | Reference |
---|---|---|
usmHMAC128SHA224AuthProtocol | 4 | RFC 7630 |
usmHMAC192SHA256AuthProtocol | 5 | RFC 7630 |
usmHMAC256SHA384AuthProtocol | 6 | RFC 7630 |
usmHMAC384SHA512AuthProtocol | 7 | RFC 7630 |
[RFC1321] | Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321, DOI 10.17487/RFC1321, April 1992. |
[RFC3410] | Case, J., Mundy, R., Partain, D. and B. Stewart, "Introduction and Applicability Statements for Internet-Standard Management Framework", RFC 3410, DOI 10.17487/RFC3410, December 2002. |
[RFC3411] | Harrington, D., Presuhn, R. and B. Wijnen, "An Architecture for Describing Simple Network Management Protocol (SNMP) Management Frameworks", STD 62, RFC 3411, DOI 10.17487/RFC3411, December 2002. |
[RFC3417] | Presuhn, R., "Transport Mappings for the Simple Network Management Protocol (SNMP)", STD 62, RFC 3417, DOI 10.17487/RFC3417, December 2002. |
[BCK] | Bellare, M., Canetti, R. and H. Krawczyk, "Keyed Hash Functions for Message Authentication", Advances in Cryptology - CRYPTO 96, Lecture Notes in Computer Science 1109, Springer-Verlag Berlin Heidelberg, DOI 10.1007/3-540-68697-5_1, 1996. |